cancel
Showing results for 
Search instead for 
Did you mean: 

The wildcard range 0x0000-0xFFFF is not allowed.

potentializ
Associate

 

Hello!

I set the wildcard range to 0x0000-0xFFFF to use all characters contained in the "Pretendard JP" font.
However, I get an error when generating code with TouchGFX Designer.

Of course, specifying small wildcard ranges work, but I also want to support multiple languages ​​with as few language packs as possible.

Is there another way to include all characters in one resource without specifying wildcards?
I also tried entering about 20k Unicodes into the Wildcard Characters field, but the error was the same.

 

== Error message ==

ERROR: Illegal sizeInKerningTable for glyph 0x002C (439 not in range [0..255])
ERROR: While generating font from assets/fonts/PretendardJP-Bold.otf
An error occurred during text conversion
Cleaning generated files from generated/texts and generated/fonts.
Generating generated/fonts/include/fonts/GeneratedFont.hpp
Generating generated/fonts/src/GeneratedFont.cpp
Generating generated/fonts/include/fonts/UnmappedDataFont.hpp
Generating generated/fonts/src/UnmappedDataFont.cpp
Generating generated/fonts/include/fonts/CachedFont.hpp
Generating generated/fonts/src/CachedFont.cpp
Generating generated/fonts/include/fonts/FontCache.hpp
Generating generated/fonts/src/FontCache.cpp
Generating generated/fonts/src/ApplicationFontProvider.cpp
Generating generated/fonts/include/fonts/ApplicationFontProvider.hpp
Generating generated/texts/include/texts/TextKeysAndLanguages.hpp
Generating generated/texts/include/texts/TypedTextDatabase.hpp
Generating generated/texts/src/TypedTextDatabase.cpp
Generating generated/texts/src/Texts.cpp
Generating generated/texts/src/LanguageGb.cpp
Command: "../Middlewares/ST/touchgfx/framework/tools/fontconvert/build/win/fontconvert.out" -f "assets/fonts/PretendardJP-Bold.otf" -i 13 -w 16 -r 16 -o "generated/fonts" -c "generated/fonts/UnicodeListPretendardJP_Bold_otf_16_4.txt" -n "PretendardJP_Bold_otf" -b 4 -v 0 -d 63 -e 0 -ct yes -bf no -ff 0 -ffu 0 -ba
Warning: Skipping font kerning information due to space constraint
WARNING - Char 0x1 is used but does not exist in the font!
WARNING - A total of 43561 Unicode characters did not exist in the font!
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_0.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_1.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_3.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_4.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_5.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_6.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_7.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_9.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_10.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_11.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_12.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_13.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_14.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_15.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_16.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_17.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_18.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_19.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_20.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_21.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_22.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_23.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_24.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_25.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_26.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_28.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_29.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_30.cpp
Generating generated/fonts/src/Font_PretendardJP_Bold_otf_16_4bpp_31.cpp
make[1]: *** [texts] Error 1
generated/simulator/gcc/Makefile:225: recipe for target 'texts' failed
make: *** [assets] Error 2
simulator/gcc/Makefile:32: recipe for target 'assets' failed
Failed

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @potentializ 

I downloaded the font

https://fontmeme.com/fonts/pretendard-font/

and got an error as well:

ferro_0-1721226547383.png

 

And fontconvert.out ran in CLI

ferro_2-1721227327093.png

The tool is here

c:\TouchGFX\4.23.2\touchgfx\framework\tools\fontconvert\build\win\fontconvert.out

@GaetanGodartThis error might be something fontconverter Dev team might want to look at. The font does not seem to be 'corrupt' as I was able to open it in FontForge application.

 

 

 

View solution in original post

9 REPLIES 9
GaetanGodart
ST Employee

Hello @potentializ ,

 

The Unicode only support 255 characters. This is your first line of error :
" ERROR: Illegal sizeInKerningTable for glyph 0x002C (439 not in range [0..255])"
So the max you can put by default is 0x00-0xFF.

And a warning : "WARNING - A total of 43561 Unicode characters did not exist in the font!"
Standard fonts don't have 65535 (0xFFFF) characters.

If you want to add languages, check this tutorial : Tutorial 6: Using TextAreas ! 😊

 

If this comment solves your problem, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
ferro
Senior II

Hi @potentializ 

My project runs Okay. Only get warning:

WARNING - Char 0x1 is used but does not exist in the font!
WARNING - A total of 64630 Unicode characters did not exist in the font!
Generating generated/fonts/src/Table_verdana_20_4bpp.cpp

ferro_0-1721147755923.png

It seems there is some error with a specific font internaly in you project, maybe structure broken ?

ERROR: Illegal sizeInKerningTable for glyph 0x002C (439 not in range [0..255])
ERROR: While generating font from assets/fonts/PretendardJP-Bold.otf
An error occurred during text conversion

Maybe you could try to run Gfx font converter tool on its own from Windows CLI to learn more about the issue with specific font file. Or create a dummy project with single font causing a problem.

Hi @GaetanGodart


Thank you for the reply.
I don't understand what you mean by Unicode only supporting 255 bytes.
Langues and Character | TouchGFX 
"Unicodes from 0x0000 to 0xFFFF are supported." <- The TouchGFX guide says it and I know the same.
And I didn't mentioned Standard fonts but "Pretendard JP".

This problem occurs when allocating 0x0000-0xFFFF to the wildcard range.
There was no problem using 2-byte characters in a configuration below.
{0x0020-0x007E,0x1100-0x11FF,0x2000-0x2FFF,0x3000-0x30FF,0x3130-0x318F,0x4E00-0x9FFF,0xA960-0xA97F,0xAC00-0xD7AF,0xD7B0-0xD7FF,0xFF00-0xFFFF}

Looking at ferro's answer below, there is no problem specifying 0x0000-0xFFFF in verdana font(Regardless of whether Unicode Glyphs are supported or not).


Thanks

Hi @ferro

Thanks for the good information. I will try other fonts.
If the font is the problem, I may need to consider another.

 

Thanks!

Hi @potentializ 

I downloaded the font

https://fontmeme.com/fonts/pretendard-font/

and got an error as well:

ferro_0-1721226547383.png

 

And fontconvert.out ran in CLI

ferro_2-1721227327093.png

The tool is here

c:\TouchGFX\4.23.2\touchgfx\framework\tools\fontconvert\build\win\fontconvert.out

@GaetanGodartThis error might be something fontconverter Dev team might want to look at. The font does not seem to be 'corrupt' as I was able to open it in FontForge application.

 

 

 

Hi, @ferro

Thank you for sharing!
I also had no problems using the Pretendard family fonts with the FontForge application.
I think this happens when the kerning information for a specific character exceeds 255.
As I reduced the number of characters little by little, the error disappeared.

uint8_tkerningTableSize

https://support.touchgfx.com/docs/api/classes/structtouchgfx_1_1_glyph_node#kerningtablesize

 

@GaetanGodart,

I tested fonts with TouchGFX 4.24.0 and this happens in the most recent version.
If correct that it has something to do with kerningTableSize, please consider changing the type of this variable to uint16_t or uint32_t.


Thanks!

GaetanGodart
ST Employee

Hello,

 

@potentializ Sorry, I have read your message quite fast and I used to 255 characters Unicode fonts.

I have downloaded the font and I was able to replicate the problem but only when using the .otf files. When using the .ttf file, it worked fine with wildcard range of 0x0000-0xffff.

Maybe this could be an easy fix to your problem?

It should be possible to modify the type of "kerningTableSize" as it is in Font.hpp which is openly available.
All we have to do is to recompile the file after modifying the type.
I have tried moving / copying the Font.hpp file with the right type in "projectName\TouchGFX\gui\include\gui\screen1_screen" to force it to recompile but it did not work somehow.

 

@ferro I have created a ticket to change the type of kerningTableSize.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi @GaetanGodart,

 

I think it is necessary to check whether there is a 255 limit not only on the touchgfx library but also on FontConverter's kerning table generation function.
Because this error happens when generating the code by TouchGFX designer.

 

Many thanks!

Hello @potentializ ,

 

A colleague have checked how the table is filled and it loops from the size of the table to 0. The variable used is a uint16_t so changing the kerning table type to a uint16_t looks like it would work.
Either way, if we decide to increase the table size, we will make sure it works.
I don't know if that answers your question.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)