-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Primary font ignores the fontconfig's charset property. #30
Comments
Ah, I understand what you mean now. Seems like you're right and we do indeed not check the charset for the primary font. We check the char index to make sure the character is contained at all, but that's it. It seems like the charset also isn't read for fallback fonts that have been loaded already (see the Generally once a font is loaded, we only have access to FreeType things iirc. So at that point we don't check anything fontconfig anymore. But the charset would have to be checked every time a glyph load is attempted, we'd likely have to persist it from fontconfig after loading. Curious if @kchibisov is aware of/has an opinion on this, since he did do a bunch of freetype/fontconfig stuff in the past. |
@huyuehui would you mind providing example fontconfig configuration? I'm not into its syntax wrt charsets so it could help. |
@kchibisov
|
Ok, I'll try to take a look when I have time... |
I reported an issue several days ago. Maybe at that time I didn't make myself clear. I guess that the following source blocks cause this issue.
In src/ft/mod.rs :
In my case, the function load_face_with_glyph(...) has never been called. Because in face_for_glyph(...), it always returns early inside the 'if let' block.
In the get_face(...) function, the 'coverage' of the 'Fallbacklist' struct doesn't include the charset of the primary font. So setting the charset property of the first matched font (the primary font) in fonts.conf doesn't work if no fallback is happened.
The text was updated successfully, but these errors were encountered: