-
-
Notifications
You must be signed in to change notification settings - Fork 66
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 the ability to use custom fonts + "fallback" fonts. #273
Comments
Related issue: #195
The (current) implementation could be characterized as "aggressively platform agnostic". The text renderer does not rely on any external libraries or system APIs. This allows it to work the same way on any platform for maximum portability. Font and text APIs are quite different depending on the platform, so adding support for system fonts comes with a relatively high implementation cost. The best choice would probably be FreeType, but each new dependency adds to the maintenance burden. I think the most likely next step here is to add support for user-provided TrueType fonts that need to be copied under the ~/.config/lagrange directory. |
Ah, sorry, I hadn't seen that other issue. I wasn't meaning that you should use the system font renderer, I mean that it should be possible to select a font installed on the system. In Windows this is really simple, fonts are all just dumped in |
Hmm yes, it should be possible to look in there as well as a Windows-specific behavior, in addition to Lagrange's own runtime directory. |
You could do the same on Linux/OSX and look in a few standard font directories (~/.config/fonts and /usr/local/share/fonts/, maybe?). I think on all systems this is probably going to have some side-effects as I am sure there is more to the standard installed fonts than applications just looking for the TTF files themselves, but it might be close enough that many users will not notice. |
Closing this since version 1.8 now has downloadable fonts and support for custom TrueType fonts. The aspect of using system fonts will be covered in issue #195. |
As far as I can tell, Lagrange currently comes with the supported fonts bundled with the program (

res/fonts
), and the only options are to pick from these. I'm not sure how Lagrange's font system works, but hardcoding the usable fonts seems a bit weird.It would be very nice if we could use fonts that are installed on our systems, either by a freeform box or a dropdown (or a mix like notepad).
It would also be nice if we could set a list of "fallback" fonts (I'm not sure what these are actually called).

For example in VSCode I can set a list of fonts like this, and if the character isn't in the first font, it grabs it from the next one along. The replacement character is only shown if it's not in any of the fonts.
This is very useful for more rare characters, and private use ones.
The text was updated successfully, but these errors were encountered: