2020-10-30 09:44 AM
I'm building a (non-touch) simple hardware UI which needs to implement a primitive string editor. I'll be taking the "select a cursor position, enter, then select a character" approach.
I have everything in place now, with the exception of character selection. I want to increment and decrement my way through the complete list of unicode characters supported by a given wildcard buffer.
How would you recommend I access and iterate through the generated list of available unicode characters that a particular wildcard buffer supports?
2020-11-02 12:00 AM
Hi,
It's just an array of `Unicode::UnicodeChar` - You know which buffer belongs to a text area, so just iterate through it as you would any array.
/Martin
2020-11-02 07:25 AM
Where is this array? What's its name?
I'm not after the wildcard buffer itself. I need the array that contains all possible unicode characters supported by the typography of a particular wildcard buffer's textarea.
2020-11-02 07:40 AM
Based on naming in TouchGFX designer, I think I'm looking for "wildcard range" in code somewhere. But I haven't been able to find it yet.
2020-11-05 08:04 AM
I still haven't been able to find the wildcard range in code anywhere. Can anyone point me in the right direction?
2020-11-05 11:39 AM
I imagine you are looking for something like files located at "yourProject\TouchGFX\generated\fonts\src".
For example when i create this font with this range :I can find these files :
In the last file Font_ALGER_TTF_10_4bpp_0.cpp you can find the declaration of all Unicode characters for your font
regards,
Ajt
2020-11-05 05:15 PM
That generated folder was exactly what I was after. I was looking in totally the wrong place.
I'm going to iterate over the Unicode column (column index 1) of the Table file to select only characters defined in the typography for my string editor.
Thanks for the reply.
2020-11-06 12:27 AM
Ok nice.
Do not hesitate to share your code after implementing it and then close the question !
AJT
2020-11-06 12:10 PM
I spoke too soon.
I'm unable to access the Table_FontName_##_#bpp.cpp file from my code.
The GlyphNode table in this file is what I think I need to access, but the file is a cpp file with no header guard. So I can't include it in my source to access the table directly.
I can access the ApplicationFontProvider, but this only exposes Font.getGlyph() function which requires that I already know the unicode I'm looking for. Also I'm not interested in the glyphs, I just need the "next unicode character" in the wildcard range.
My goal is to iterate through the available unicode characters defined in the Table file without my code knowing in advance what they are.
Any suggestions?
2020-11-06 01:07 PM
I found (link) that you obtain a null pointer when you call Font.getGlyph() function with an Unicode::UnicodeChar value representing a char not defined for your font ? So you can iterate through all possibilities and then find what are all characters defined for your font ?
But maybe, and I really think so, that there is a proper way to do that !
AJT