Skip to content

Commit

Permalink
Remove last occurence of SkFontMgr::RefDefault() (#2169)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed Jan 24, 2024
1 parent b288355 commit 92e6bc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/cpp/api/JsiSkTypefaceFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class JsiSkTypefaceFactory : public JsiSkHostObject {
public:
JSI_HOST_FUNCTION(MakeFreeTypeFaceFromData) {
auto data = JsiSkData::fromValue(runtime, arguments[0]);
auto typeface = SkFontMgr::RefDefault()->makeFromData(std::move(data));
auto fontMgr = JsiSkFontMgrFactory::getFontMgr(getContext());
auto typeface = fontMgr->makeFromData(std::move(data));
if (typeface == nullptr) {
return jsi::Value::null();
}
Expand Down

0 comments on commit 92e6bc9

Please sign in to comment.