cancel
Showing results for 
Search instead for 
Did you mean: 

Access unicode characters supported by a particular wildcard buffer?

Dfarr.1
Senior

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?

11 REPLIES 11
Martin KJELDSEN
Chief III

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

Dfarr.1
Senior

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.

Dfarr.1
Senior

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.

Dfarr.1
Senior

I still haven't been able to find the wildcard range in code anywhere. Can anyone point me in the right direction?

AJT141
Associate III

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 :0693W000005AXTQQA4.pngI can find these files :

0693W000005AXTuQAO.pngIn the last file Font_ALGER_TTF_10_4bpp_0.cpp you can find the declaration of all Unicode characters for your font

regards,

Ajt

Dfarr.1
Senior

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.

Ok nice.

Do not hesitate to share your code after implementing it and then close the question !

AJT​

Dfarr.1
Senior

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?

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