CrayEddie GUI and Unicode
Posted: Tue Jul 13, 2004 18:36
Hi,
There's no short answer to that question
Unicode is something that was discussed at length of the Ogre forums as part of the preliminary work for Mk-2. What was decided upon was to initially implement things in such a way that Unicode could be added fairly painlessly at a later stage. At some point in time I would like the system to implement the full Unicode specification (I don't believe in doing things by halves, so if I'm going to have Unicode I'll have it all ).
In keeping with the above goal, the string class within the system does allow some Unicode-like operations, for example it can store the full set of Unicde code-points (string data is passed in via utf8 encoded data buffers). This currently has limitations though, in that all sorting and other such operations do not yet consider strings in a localised manner.
The font system is theoretically capable of handling any glyph available in a TTF font - again, there are currently some limitations. The requested glyphs are buffered onto a single texture - so the total number of glyphs ultimately available from one font is tied to the maximum texture size. At the moment, you need to "forward declare" the glyphs you'll be using for a font, though I am considering adding an option that would automatically add glyphs dynamically as they are first used (no decision on this yet, and this would not be implemented for a little while). Additionally, the font currently supports left to right rendering only.
I believe that even in it's current state, the system could produce acceptable results for many cases, though I do not pretend that it will suffice for all possible scenarios.
How easy to add actual Unicode? Hmmm. Again that depends The full Unicode spec. is a huge and complex beast - to add this properly would take a great deal of effort (not because of anything within the GUI system, but because Unicode is fairly complicated to do right). It would be possible to extend what is currently available without doing full Unicode, the ease of such undertakings would depend upon the skill of the person doing it
Not sure if this answers your question, hopefully it does
CE.
There's no short answer to that question
Unicode is something that was discussed at length of the Ogre forums as part of the preliminary work for Mk-2. What was decided upon was to initially implement things in such a way that Unicode could be added fairly painlessly at a later stage. At some point in time I would like the system to implement the full Unicode specification (I don't believe in doing things by halves, so if I'm going to have Unicode I'll have it all ).
In keeping with the above goal, the string class within the system does allow some Unicode-like operations, for example it can store the full set of Unicde code-points (string data is passed in via utf8 encoded data buffers). This currently has limitations though, in that all sorting and other such operations do not yet consider strings in a localised manner.
The font system is theoretically capable of handling any glyph available in a TTF font - again, there are currently some limitations. The requested glyphs are buffered onto a single texture - so the total number of glyphs ultimately available from one font is tied to the maximum texture size. At the moment, you need to "forward declare" the glyphs you'll be using for a font, though I am considering adding an option that would automatically add glyphs dynamically as they are first used (no decision on this yet, and this would not be implemented for a little while). Additionally, the font currently supports left to right rendering only.
I believe that even in it's current state, the system could produce acceptable results for many cases, though I do not pretend that it will suffice for all possible scenarios.
How easy to add actual Unicode? Hmmm. Again that depends The full Unicode spec. is a huge and complex beast - to add this properly would take a great deal of effort (not because of anything within the GUI system, but because Unicode is fairly complicated to do right). It would be possible to extend what is currently available without doing full Unicode, the ease of such undertakings would depend upon the skill of the person doing it
Not sure if this answers your question, hopefully it does
CE.