Loading core/jni/android/graphics/TypefaceImpl.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -146,10 +146,14 @@ TypefaceImpl* TypefaceImpl_createFromFamilies(const jlong* families, size_t size const FontStyle defaultStyle; FontFamily* firstFamily = reinterpret_cast<FontFamily*>(families[0]); MinikinFont* mf = firstFamily->getClosestMatch(defaultStyle).font; if (mf != NULL) { SkTypeface* skTypeface = reinterpret_cast<MinikinFontSkia*>(mf)->GetSkTypeface(); // TODO: probably better to query more precise style from family, will be important // when we open up API to access 100..900 weights result->fStyle = styleFromSkiaStyle(skTypeface->style()); } else { result->fStyle = defaultStyle; } } return result; } Loading Loading
core/jni/android/graphics/TypefaceImpl.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -146,10 +146,14 @@ TypefaceImpl* TypefaceImpl_createFromFamilies(const jlong* families, size_t size const FontStyle defaultStyle; FontFamily* firstFamily = reinterpret_cast<FontFamily*>(families[0]); MinikinFont* mf = firstFamily->getClosestMatch(defaultStyle).font; if (mf != NULL) { SkTypeface* skTypeface = reinterpret_cast<MinikinFontSkia*>(mf)->GetSkTypeface(); // TODO: probably better to query more precise style from family, will be important // when we open up API to access 100..900 weights result->fStyle = styleFromSkiaStyle(skTypeface->style()); } else { result->fStyle = defaultStyle; } } return result; } Loading