From 7957d11b5d8ffff1475a08f449d18bd0415f80ef Mon Sep 17 00:00:00 2001 From: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:51:38 +0200 Subject: [PATCH] ohos: Add fallback font for serif (#32555) The fallback behavior seems to have changed recently. Now we need to explicitly add a fallback for `serif` otherwise no font is selected. Signed-off-by: Jonathan Schwender --- components/fonts/platform/freetype/ohos/font_list.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/fonts/platform/freetype/ohos/font_list.rs b/components/fonts/platform/freetype/ohos/font_list.rs index 75eef136189..f4d9ec6200a 100644 --- a/components/fonts/platform/freetype/ohos/font_list.rs +++ b/components/fonts/platform/freetype/ohos/font_list.rs @@ -80,6 +80,8 @@ impl FontList { let alternatives = [ ("HarmonyOS Sans", "HarmonyOS_Sans_SC_Regular.ttf"), ("sans-serif", "HarmonyOS_Sans_SC_Regular.ttf"), + // Todo: It's unclear what font should be used, but we need to use something + ("serif", "HarmonyOS_Sans_SC_Regular.ttf"), ]; alternatives