Replies: 2 comments
-
From my awareness, you can choose between this library, Parley or my own kas-text. I believe all are vaguely similar in terms of feature support (shaping, bidi, fallback, synthesis, hinting); Parley may be the most advanced though the projects don't have exactly the same scope.
For Kas I found the best solution was to move rastering and rendering control out of the text library. See e.g.
I believe all three mentioned text libraries use a global font DB and OS lookup. For a small number of target languages shipping your own fonts should be a viable alternative but you might still want to use OS fonts for additional glyph fallback.
Italic/bold text may use a special font or may use font synthesis, hence the controlling mechanism is non-trivial in a well-featured text library. |
Beta Was this translation helpful? Give feedback.
-
|
You could also take a look at how |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! It is very cool to see text libraries in Rust. Swash/HarfRust are only shaping, and having something higher level and easier to use would be very handy. Personally, i find text very frustrating, and i feel like this library could be a game changer.
However, it is unclear on how to integrate cosmic-text into custom rendering pipelines (and source code is not written in a way i can personally understand - every part is clear, but i fail to disassemble and reassemble it with changes).
As a consumer, i would like to see something among the lines of "here is data to rasterize, do it how you want and give us back some handle", for bitmaps / aliased maps/ different distance field solutions at once. And, for rendering, something among the lines of "hey here is per-text data, required for rendering; here is also vec/slice/iter over all the per-character data you need to render, do whatever you want with it and return us a handle for 'prepared state' " (maybe not handle, and just some generic T)
My text currently sucks, and i would love to make my life easier by delegating this work to a library. I am possibly reading the docs & src wrong, but the examples dont make it clear for me.
Also, for gamedev, some components are redundant - e.g. global OS font data lookup (i would just ship font along the game), or caching shaping (most of it wont change). Or (this problem would not exist in custom renderer) gpu-cpu image writes sync and immediate nature of those.
In other words, what would be very cool to be able to reuse separately: attributes on text (sizes, italic/bold, character/word spacing), breaking text into lines by char/word, [generating or getting cached] glyph gpu data - all those mechanisms.
Sorry if this is off-topic or does not align with library design goals.
Beta Was this translation helpful? Give feedback.
All reactions