examples/gkurve: improve unicode handling (fallback fonts, combining unicode characters, etc.) #331

Closed
opened 2022-06-05 16:00:25 +00:00 by emidoots · 0 comments
emidoots commented 2022-06-05 16:00:25 +00:00 (Migrated from github.com)

Right now after @PiergiorgioZagaria's work, gkurve tooling can render UTF32 fonts. What we would need to do to improve Unicode handling further is:

  1. Add HarfBuzz bindings to our freetype bindings. I also heard MasterQ32 say he wants these.
  2. Handle fallback fonts, e.g. try rendering with the desired font and then fallback to say Noto+Emoji font if the glyph is not found. In practice this means end user should provide a list of fonts, rather than just one, that we consume.
  3. Verify we can render combining characters after hooking all this together. e.g. 👪 which is four UTF32 values.

Note many frameworks do not have this level of unicode support, e.g. Pygame doesn't either https://github.com/pygame/pygame/issues/1436 - we should do better & have Unicode as a first-class concern.

Right now after @PiergiorgioZagaria's work, gkurve tooling can render UTF32 fonts. What we would need to do to improve Unicode handling further is: 1. [x] Add HarfBuzz bindings to our freetype bindings. I also heard MasterQ32 say he wants these. 2. [ ] Handle fallback fonts, e.g. try rendering with the desired font and then fallback to say Noto+Emoji font if the glyph is not found. In practice this means end user should provide a list of fonts, rather than just one, that we consume. 3. [ ] Verify we can render combining characters after hooking all this together. e.g. 👪 which is four UTF32 values. Note many frameworks do not have this level of unicode support, e.g. Pygame doesn't either https://github.com/pygame/pygame/issues/1436 - we should do better & have Unicode as a first-class concern.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#331
No description provided.