Skip to content

Font not rendering in some cases #96

Closed
@HakkyuKim

Description

@HakkyuKim

Font not rendering issues were noticed in:

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

image
image

On other targets, it works fine.

TV device:

image

Mobile device:

image

Wearable emulator:

image
image

TV emulator:

image

Mobile emulator:

image

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:

image
image

TV device:

For some reason, the TV device I have can't run the app at the moment.

mobile device:

image

Wearable emulator:

image
image

TV emulator:

image

Mobile emulator:

image

Let me know if you need more details, or want to test with the app in the image.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions