Skip to content

Commit 27ccfff

Browse files
committed
fix(532): fontFamily get on css rules
1 parent 43a2e27 commit 27ccfff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/embed-webfonts.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ export async function getWebFontCSS<T extends HTMLElement>(
234234
const cssTexts = await Promise.all(
235235
rules
236236
.filter((rule) =>
237-
usedFonts.has(normalizeFontFamily(rule.style.fontFamily)),
237+
usedFonts.has(
238+
normalizeFontFamily(
239+
rule.style.fontFamily || rule.style.getPropertyValue('fontFamily'),
240+
),
241+
),
238242
)
239243
.map((rule) => {
240244
const baseUrl = rule.parentStyleSheet

0 commit comments

Comments
 (0)