Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

chore: faster font weight detection (#4211)

Oleg Isonen3d98a692d427
diff --git a/apps/builder/app/canvas/shared/font-weight-support.ts b/apps/builder/app/canvas/shared/font-weight-support.ts
index 50570d19da..d9bdb61d0f 100644
--- a/apps/builder/app/canvas/shared/font-weight-support.ts
+++ b/apps/builder/app/canvas/shared/font-weight-support.ts
@@ -18,7 +18,7 @@ const testFontWeights = (fontFamily: string) => {
const canvas = document.createElement("canvas");
canvas.width = 200;
canvas.height = 20;
- const context = canvas.getContext("2d");
+ const context = canvas.getContext("2d", { willReadFrequently: true });
const supportedWeights: Array<FontWeight> = ["400"];
if (context === null) {