We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80b2cab commit 15c5ec7Copy full SHA for 15c5ec7
package/cpp/rnskia/dom/props/FontProp.h
@@ -31,8 +31,10 @@ class FontProp : public DerivedProp<SkFont> {
31
"Expected SkFont object or null/undefined for the Font property.");
32
}
33
} else {
34
- auto font = std::make_shared<SkFont>(SkFont());
35
- font->setSize(14);
+ auto fm = SkFontMgr::RefDefault();
+ sk_sp<SkTypeface> typeface = fm->legacyMakeTypeface(nullptr, SkFontStyle());
36
+ auto font = std::make_shared<SkFont>(SkFont(typeface));
37
+ font->setSize(14);
38
setDerivedValue(font);
39
40
0 commit comments