-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ttc fonts supported #5210
base: develop
Are you sure you want to change the base?
ttc fonts supported #5210
Conversation
theme.CheckFontParsable added font.ParseTTC replaces font.ParseTTF. The first font of the collection is taken.
theme.CheckFontParsable added font.ParseTTC replaces font.ParseTTF. The first font of the collection is taken.
You do realise that this will parse the entire font collection and then return only the first font? Could be quite a bad performance drop. Also, why all the nil checks added? Having font rendering need to worry about nil seems bad - because we cannot possible render a string if the font is nil. Unless I misunderstood the change this seems like a bad thing. |
Yes, this certainly isn't really solving TTC support. TTC support means loading all the fonts in the collection when needed to display specific glyphs. The point of TTC is usually achieving larger glyph coverage than any single TTF can support on its own |
as I commented in #4053 (comment), |
Thanks for this, some thoughts:
The font lib was switched out a couple of releases ago, there is no future plans to change font loading.
If there is a crash we should fix that directly - no Fyne API call or render should ever panic.
As noted above APIs should not be part of a temporary fix but have clear utility and purpose. I get the feeling that this has been added to avoid a crash - which is not how we do things as the panic itself should be resolved. |
theme.CheckFontParsable added
font.ParseTTC replaces font.ParseTTF. The first font of the collection is taken.
Description:
Fixes #4053,#3799,#2761
Checklist:
Where applicable: