mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibGfx: Use Android functions when compiling for Android in TypefaceSkia
This commit is contained in:
parent
bf84a681a5
commit
a7a136f30a
Notes:
github-actions[bot]
2024-09-03 06:19:02 +00:00
Author: https://github.com/Olekoop Commit: https://github.com/LadybirdBrowser/ladybird/commit/a7a136f30a2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1006 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/AtkinsSJ
1 changed files with 9 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue