mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
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:
parent
8543b8ad6a
commit
aef85a83bd
Notes:
github-actions[bot]
2024-09-21 06:58:48 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/aef85a83bd5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1465
3 changed files with 9 additions and 2 deletions
BIN
Base/res/fonts/NotoEmoji.ttf
Normal file
BIN
Base/res/fonts/NotoEmoji.ttf
Normal file
Binary file not shown.
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
set(FONTS
|
||||
NotoEmoji.ttf
|
||||
SerenitySans-Regular.ttf
|
||||
)
|
||||
list(TRANSFORM FONTS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/fonts/")
|
||||
|
|
Loading…
Reference in a new issue