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 <jonathan.schwender@huawei.com>
This commit is contained in:
Jonathan Schwender 2024-06-20 08:51:38 +02:00 committed by GitHub
parent cc1c31ef3f
commit 7957d11b5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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