-
Notifications
You must be signed in to change notification settings - Fork 74
About internationalization and bitmap fonts #380
Comments
I'm aware of the concern, and there will be an alternate path in the engine down the line. Since text can be so complex it doesn't make sense to implement all of that effort onto the placeholder renderer that is in there now. I would note for interest sake, with SDF bitmap fonts, you can get quite a high number of characters into a single texture. If packed badly (without letter trimming), a size of With trimming you can get quite a few more, and if you don't try to use one font for every possible case in rendering your game, I can imagine it possible to fit the game specific headers and UI characters on their own, and user specified input with unknown used characters as a separate font instance. Even with two sizes you can cover quite a wide gamut of game specific text vs unknown input. While this type of thing doesn't scale to say text editing applications, for games the scope of text requirements is somewhat more manageable. (side note: In the new rendering, this will also be implemented which allows smaller characters to remain crisp, and you could easily use this in the current code as well.) On top of that, there are still options to use luxe with truetype fonts of course, you would just have to choose a workflow and do some of the work - like generating textures and rendering with them as bitmap fonts is viable for one extra step. On native using say linc_stb/Truetype which is already included in luxe by snow, and on web generating the characters on a canvas element and grabbing it's pixels to give to luxe as a texture to draw as a bitmap font. In a handful of code you could generate font textures dynamically and expand them as needed - like most ttf rendering would do anyway. Of course I'm not saying it's not an issue or anything, or that luxe won't address this. There are all sorts of problems with the bitmap rendering (including them limiting to one texture page at the moment), they will be tackled. Just know that it's important to me that other languages are handled well, and I'll be working hard to ensure that luxe is usable as wide as possible for it's goals of being a game engine. |
Thanks for the quick and thorough reply! I was considering to use this engine for my next personal game project, and realized it was almost perfect except for this one issue... |
Cool, keep in mind the alpha status and read the dev logs for where I'm headed with regards to finalizing the renderer and what not, once the core engine is more complete the higher level stuff will take priority. In other words, I'm glad you're considering the engine but take heed of the alpha label as I use it intentionally :) |
Currently, when looking at the api, it seems nearly impossible to render some i18n text (for example, Korean) because luxe only has the ability to load bitmap fonts. (It will probably be a pain to export all character sets into a giant bitmap font, because there are tens of thousands of Korean characters just to start with.)
The most straightforward solution seems to be adding functionality for loading ttf fonts. Any thoughts on the issue?
The text was updated successfully, but these errors were encountered: