Skip to content

Commit aef85a8

Browse files
trflynn89awesomekling
authored andcommitted
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.
1 parent 8543b8a commit aef85a8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Base/res/fonts/NotoEmoji.ttf

1.91 MB
Binary file not shown.

Ladybird/FontPlugin.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,17 @@ Gfx::Font& FontPlugin::default_fixed_width_font()
5757

5858
RefPtr<Gfx::Font> FontPlugin::default_emoji_font(float point_size)
5959
{
60+
FlyString default_emoji_font_name;
61+
62+
if (m_is_layout_test_mode) {
63+
default_emoji_font_name = "Noto Emoji"_fly_string;
64+
} else {
6065
#ifdef AK_OS_MACOS
61-
auto default_emoji_font_name = "Apple Color Emoji"_fly_string;
66+
default_emoji_font_name = "Apple Color Emoji"_fly_string;
6267
#else
63-
auto default_emoji_font_name = "Noto Color Emoji"_fly_string;
68+
default_emoji_font_name = "Noto Color Emoji"_fly_string;
6469
#endif
70+
}
6571

6672
return Gfx::FontDatabase::the().get(default_emoji_font_name, point_size, 400, Gfx::FontWidth::Normal, 0);
6773
}

Ladybird/cmake/ResourceFiles.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(FONTS
2+
NotoEmoji.ttf
23
SerenitySans-Regular.ttf
34
)
45
list(TRANSFORM FONTS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/fonts/")

0 commit comments

Comments
 (0)