Base: Import the Noto Emoji font for LibWeb tests only

The Noto Emoji font is licensed under the Open Font License. Let's use
it for LibWeb tests, to ensure we use the same emoji font across all
platforms.
This commit is contained in:
Timothy Flynn 2024-09-20 18:39:33 -04:00 committed by Andreas Kling
parent 8543b8ad6a
commit aef85a83bd
Notes: github-actions[bot] 2024-09-21 06:58:48 +00:00
3 changed files with 9 additions and 2 deletions

Binary file not shown.

View file

@ -57,11 +57,17 @@ Gfx::Font& FontPlugin::default_fixed_width_font()
RefPtr<Gfx::Font> FontPlugin::default_emoji_font(float point_size)
{
FlyString default_emoji_font_name;
if (m_is_layout_test_mode) {
default_emoji_font_name = "Noto Emoji"_fly_string;
} else {
#ifdef AK_OS_MACOS
auto default_emoji_font_name = "Apple Color Emoji"_fly_string;
default_emoji_font_name = "Apple Color Emoji"_fly_string;
#else
auto default_emoji_font_name = "Noto Color Emoji"_fly_string;
default_emoji_font_name = "Noto Color Emoji"_fly_string;
#endif
}
return Gfx::FontDatabase::the().get(default_emoji_font_name, point_size, 400, Gfx::FontWidth::Normal, 0);
}

View file

@ -1,4 +1,5 @@
set(FONTS
NotoEmoji.ttf
SerenitySans-Regular.ttf
)
list(TRANSFORM FONTS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/fonts/")