3 ms·
I'm currently trying to get text layout working in a game and the /only/ text control provided by the engine is one that "can" be editable, since it's assumed f
by boondaburrah 5y ago
I'm currently trying to get text layout working in a game and the /only/ text control provided by the engine is one that "can" be editable, since it's assumed for non-editable text you'd just use graphics. However, this game has a lot of dialogue and must be translated into multiple languages so that's not a realistic option.
It's a fucking nightmare. It turns out it uses Cairo internally so that's not bad, but I /need/ to know where the last glyph is and answering questions about how your text actually is going to be laid out in the end is next to impossible everywhere I look.
Since, again, this has to work in multiple languages including CJK I am loathe to code my own text control but I may have to.
- skinpop 5y agoHave you looked into harfbuzz? afaik it's designed to solve that problem, for all languages. https://harfbuzz.github.io/ https://harfbuzz.github.io/
- boondaburrah 5y agoI'll keep it in mind, but right now I'm trying to only use the classes that are provided by the engine or my own code as much as possible, since adding a dependency becomes a whole /thing/ in cross-platform game engines sometimes.
- deleted 5y ago[deleted]
- danielvaughn 5y agoCheck out slug if you haven't already: https://sluglibrary.com/ https://sluglibrary.com/
- jimmySixDOF 5y agoNot sure if your game has any spatial 3D consideration but this project uses real time Multi-channel signed distance field generation : [1] https://github.com/Chlumsky/msdfgen https://github.com/Chlumsky/msdfgen