LibGfx: Use Android functions when compiling for Android in TypefaceSkia

This commit is contained in:
Olekoop 2024-08-20 20:43:43 +02:00 committed by Andrew Kaster
parent bf84a681a5
commit a7a136f30a
Notes: github-actions[bot] 2024-09-03 06:19:02 +00:00

View file

@ -12,7 +12,11 @@
#include <core/SkData.h>
#include <core/SkFontMgr.h>
#include <core/SkTypeface.h>
#include <ports/SkFontMgr_fontconfig.h>
#ifndef AK_OS_ANDROID
# include <ports/SkFontMgr_fontconfig.h>
#else
# include <ports/SkFontMgr_android.h>
#endif
#ifdef AK_OS_MACOS
# include <ports/SkFontMgr_mac_ct.h>
@ -29,8 +33,12 @@ RefPtr<SkTypeface> const& Typeface::skia_typeface() const
if (!Gfx::FontDatabase::the().should_force_fontconfig())
s_font_manager = SkFontMgr_New_CoreText(nullptr);
#endif
#ifndef AK_OS_ANDROID
if (!s_font_manager)
s_font_manager = SkFontMgr_New_FontConfig(nullptr);
#else
s_font_manager = SkFontMgr_New_Android(nullptr);
#endif
}
if (!m_skia_typeface) {