-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add built-in font(s) #1017
Comments
This may be relevant. http://www.oxfordshireweb.com/smallest-file-size-google-web-fonts/ |
For https://github.com/nicopap/bevy-debug-text-overlay/ I made a special font derived from Adobe Pro (SIL) with only the ASCII range. You can get very small file sizes with this trick. What would be ideal thought for a font is something with a C00 or public domain license. Then our users wouldn't have to worry about licensing issues, even in the case where the font is just really meant to be used in dev and not distributed with the final binary. |
I would really prefer to support defaulting to a system font (#1325) than using a limited to ascii font |
@mockersf Though with this approach, you wouldn't be able to use the system fonts on web target. I think a (feature-flag disableable) built-in font for debugging purpose is still useful, even considering access to system fonts. |
I haven't looked into it at all, but shouldn't it be possible to load fronts from the browser on web target? |
I think that would require drawing every character to a canvas in the size as you want to use them and then get bitmaps from the canvas. That would lose character sizes, kerning information and ligatures (essential for arabic) though. You could also draw the full text to a canvas and then create a single texture for it. |
What problem does this solve or what need does it fill?
It would be nice if we were able to have at least one built-in font. Even better if we had the option to fall-back to this default when a font is unable to be found.
Describe the solution would you like?
Add support for one or more common fonts. Optionally allow setting of a "fall-back" font to an item when the expected font is not found.
The text was updated successfully, but these errors were encountered: