-
-
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
Improved glyph coverage with system-provided fonts (v1.8 has downloadable fonts) #195
Comments
Missing CJK glyphs is a known issue at the moment. It's happening because Lagrange only uses fonts from its own resources. For better CJK coverage, system-provided fonts should be used. I'm hesistant to package a large number of CJK fonts with the app because font data is already taking 20+ MB in the distribution, which is a lot compared to the app itself. |
What about arabic characters? Currently, Lagrange does not seem to display them at all, I get question marks (other programs on my system can do it, even xterm). |
Arabic is fundamentally the same problem, although there’s also the RTL text rendering challenge. I’ve been thinking about this. When it comes to using system fonts, it is actually not a great solution for Lagrange. Font/text APIs either require platform-specific code or addition of new libraries like FreeType. While I may adopt FreeType at some point, this doesn’t solve the issue that the user may not have all the needed fonts installed on their system. A better solution than bundling 50-100 MB of fonts with the app could be to add a mechanism to download additional fonts from a manually curated collection. The UI could offer to do this automatically when encountering missing glyphs. This would work with any platform Lagrange runs on without additional dependencies. |
Technically FreeType can be bundled together with Lagrange, it's not that much of the effort. Same comes to harfbuzz, which implements the text shaping engine missing in FreeType. |
Indeed, but my concern is the addition of new dependencies and therefore increased complexity, which need to be managed both in source code and in distribution over time, across all platforms. My goal is to keep things minimal in this regard, if at all possible. |
That's a nice goal actually for such a Unix-like app actually! |
Added a font for Arabic, making the glyphs available for rendering. Of course, this doesn't solve Arabic text rendering yet. There is still the RTL direction to work out and possibly some missing glyph combining rules. IssueID #195
4756b0a is a small step forward here. I've previously also added a Simplified Chinese variant of Noto Sans CJK. |
Version 1.8 now has full support for downloadable and local TrueType fonts (as long as they are single-color, non-bitmap, and unhinted). The Noto fonts have quite good Unicode coverage for a wide selection of languages, and a more complete version of Noto Sans CJK is also available. |
As you can see below, there are heavy issues with rendering Chinese characters and slightly less issues with Korean characters.
The text was updated successfully, but these errors were encountered: