Skip to content

Commit 15c5ec7

Browse files
committed
💚
1 parent 80b2cab commit 15c5ec7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

package/cpp/rnskia/dom/props/FontProp.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ class FontProp : public DerivedProp<SkFont> {
3131
"Expected SkFont object or null/undefined for the Font property.");
3232
}
3333
} else {
34-
auto font = std::make_shared<SkFont>(SkFont());
35-
font->setSize(14);
34+
auto fm = SkFontMgr::RefDefault();
35+
sk_sp<SkTypeface> typeface = fm->legacyMakeTypeface(nullptr, SkFontStyle());
36+
auto font = std::make_shared<SkFont>(SkFont(typeface));
37+
font->setSize(14);
3638
setDerivedValue(font);
3739
}
3840
}

0 commit comments

Comments
 (0)