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.

font face can't have fallback font family

Oleg Isonenbb1e58b46b35
diff --git a/packages/fonts/src/__snapshots__/get-font-faces.test.ts.snap b/packages/fonts/src/__snapshots__/get-font-faces.test.ts.snap
index 74717e4639..b102e6f728 100644
--- a/packages/fonts/src/__snapshots__/get-font-faces.test.ts.snap
+++ b/packages/fonts/src/__snapshots__/get-font-faces.test.ts.snap
@@ -4,7 +4,7 @@ exports[`getFontFaces() same family, but different formats 1`] = `
Array [
Object {
"fontDisplay": "swap",
- "fontFamily": "Roboto, sans-serif",
+ "fontFamily": "Roboto",
"fontStyle": "normal",
"fontWeight": 400,
"src": "url('/fonts/roboto.woff') format('woff'), url('/fonts/roboto.ttf') format('truetype')",
diff --git a/packages/fonts/src/get-font-faces.ts b/packages/fonts/src/get-font-faces.ts
index a946615838..f1c3c81040 100644
--- a/packages/fonts/src/get-font-faces.ts
+++ b/packages/fonts/src/get-font-faces.ts
@@ -1,4 +1,4 @@
-import { FONT_FORMATS, DEFAULT_FONT_FALLBACK } from "./constants";
+import { FONT_FORMATS } from "./constants";
import type { FontMeta } from "./schema";
import type { FontFormat } from "./types";
@@ -16,7 +16,7 @@ export const getFontFaces = (assets: Array<PartialFontAsset>) => {
if (face === undefined) {
faces.set(asset.meta.family, {
- fontFamily: `${asset.meta.family}, ${DEFAULT_FONT_FALLBACK}`,
+ fontFamily: asset.meta.family,
fontStyle: asset.meta.style,
fontWeight: asset.meta.weight,
fontDisplay: "swap" as const,