Skip to content

Commit 73f7cf0

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/embed-webfonts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ 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(rule.style.getPropertyValue('fontFamily')),
239+
),
238240
)
239241
.map((rule) => {
240242
const baseUrl = rule.parentStyleSheet

0 commit comments

Comments
 (0)