Description
Font not rendering issues were noticed in:
- Unicode and CJK are not displayed correctly. #39
- Text not rendering on samsung galaxy active watch 2 flutter-tizen#72
Even with some patches, the problem is not fully fixed. I tried to solve the problem, but I'm kind of stuck. I hope someone could give me some advice. Or, you could try to fix it if you're interested.
Using fontconfig
Problem: Using fontconfig matches wrong font style for English language on wearable devices.
On wearable devices, English text is matched to some other language font that doesn't contain glyphs for Latin characters. Skia doesn't get the font information from running fontconfig executables, it uses fontconfig apis to parse the configuration file itself. The problem happens only when system font is set to "default"(SamsungOneUI).
Fontconfig configuration file is in read-only file system: /etc/fonts
, so maybe I shouldn't be changing this file directly, but change the skia code that parses it?
Wearable device:
# English text should be matched to "SamsungOneUI", but it gets matched to some other font in this list:
Fonts selected by "SamsungOneUI", 15 styles selected.
I/ConsoleMessage( 2451): family name for font is...: BreezeSansMyanmar
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUISCN
I/ConsoleMessage( 2451): family name for font is...: BreezeColorEmoji
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUIEthiopic
I/ConsoleMessage( 2451): family name for font is...: BreezeSansGeorgian
I/ConsoleMessage( 2451): family name for font is...: BreezeSansJapanese
I/ConsoleMessage( 2451): family name for font is...: BreezeSansKhmer
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUITCN
I/ConsoleMessage( 2451): family name for font is...: SECEmoji
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUIEthiopic
I/ConsoleMessage( 2451): family name for font is...: BreezeSansGeorgian
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUIKorean
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUI
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUIKorean
I/ConsoleMessage( 2451): family name for font is...: SamsungOneUI
On other targets, it works fine.
TV device:
Mobile device:
Wearable emulator:
TV emulator:
Mobile emulator:
Not using fontconfig
If we don't use fontconfig(the current engine build), characters that use custom fonts can't use system fallback fonts if those characters don't have matching glyphs in the custom font files.
Wearable device:
TV device:
For some reason, the TV device I have can't run the app at the moment.
mobile device:
Wearable emulator:
TV emulator:
Mobile emulator:
Let me know if you need more details, or want to test with the app in the image.