-
-
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
Support loading TrueType fonts for use in Canvas objects #808
Comments
I don't think we can rely on magic places, or even filesystem in general if this should work on mobile. It doesn't, however, have the usual font caching or fallback to the latin characters if a lookup fails... I guess that is OK for this purpose though, as the developer has full control over the font they load? |
Yes, I agree the fyne.Resource is a better choice. |
I don't know exactly how this should be done - but as we review text handling in 2.0 it's a good time to discuss |
Seems good to me |
Does it now support custom font size for widgets? Generally important information in the design may be different in font size and color. If the widget does not support separate font definition, then it cannot be used. |
Widgets use the standard size and colours set by the theme. The
I agree, but this is controlled by widget APIs, not customisation. For example the |
Remember, if the standard widgets don't do what you want you can insert your own code or just |
Thank you very much. Canvas.NewText is really easy to use. |
This should be covered by the Rich Text proposal at https://github.com/fyne-io/proposals/pull/3/files#diff-eb10bfb4b3ec7c6895fe11638107950db8201a985453fa98eac3c5c0eb6fc674R90 |
I think we can close this issue as the original request seems to have been resolved. |
In addition to this |
Is your feature request related to a problem? Please describe:
it would be useful to apply an arbitrary font to Text objects rendered on the fyne Canvas
Is it possible to construct a solution with the existing API?
No.
Describe the solution you'd like to see:
Add a field to the fyne/canvas.Text object that points to font resource. The default value can be the sans-serif font used by the current theme.
The text was updated successfully, but these errors were encountered: