mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 20:44:05 +09:00
font face can't have fallback font family
This commit is contained in:
1 parent
02f74bade0
commit
bb1e58b46b
2 files changed
+3
-3
No files matched your search
@@ -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')",
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user