Skip to main content
User.32
Associate
June 5, 2019
Solved

Chinese keyboard widget

  • June 5, 2019
  • 2 replies
  • 997 views

I need a chinese keyboard in my application, how should i load the chinese font library and display it on screen,note that i need ALL CHINESE

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Hi @王 秀峰​,

You simply need to specify a typography that uses a chinese font of your choice in the "Texts" tab of TouchGFX Designer. You can load the glyph for each individual key if it is present in the font (The fontconverter will check the assets/texts.xlsx sheet and generate only the referenced glyphs).

Please check the keyboard example from the designer for some inspiration on how to do this.

/Martin

2 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
June 6, 2019

Hi @王 秀峰​,

You simply need to specify a typography that uses a chinese font of your choice in the "Texts" tab of TouchGFX Designer. You can load the glyph for each individual key if it is present in the font (The fontconverter will check the assets/texts.xlsx sheet and generate only the referenced glyphs).

Please check the keyboard example from the designer for some inspiration on how to do this.

/Martin

Martin KJELDSEN
Principal III
June 6, 2019

Re: The Keyboard Example (Uses the Keyboard class - touchgfx/widgets/Keyboard.hpp). This is from a pre-designer release of touchgfx and it hasn't been modernized so you won't be able to see the Text tab in the designer. But you can simply open the assets/texts.xlsx sheet to see how the typographies (with wildcards) are defined.

Wildcard ranges: a-z, A-Z, 0-9 (Used to easily specify a range of unicodes to generate)

Wildcard characters: !�?"#*%&()'$+-@_, .:;?/~±×÷•º`´{}©£€^®¥_=[]¡¢|\¿>< (Allows you to be more specific about which glyphs to generate without generating too many)

/Martin

Hope this helps.

/Martin