Hi guys,
I need to add support to latin characters, but without loosing the the already formatated display.
So im trying to import the same font, but with all the chars i need.
I’m trying to use Google Fonts but i dont know which one is equal to the default lvgl font. Can u guys help me chose?
The TTF is the same one that Google provides, as far as I know. We just don’t convert all the characters to the LVGL font format to save flash space. You have to reconvert it using the LVGL font converter.
I did check it and the TTF does have the c with cedilla (ç) at the very least.
Oh, thank you very much, i was able to generate the font again with the desired characters. One more thing, if i use [built_in_font_gen.py] with the Montserrat-Medium.ttf, am i able to change the default font range?
./built_in_font_gen.py --help
usage: built_in_font_gen.py [-h] [-s [px]] [--bpp [1,2,4]]
[-r start-end [start-end ...]]
[--symbols sym [sym ...]] [--font [file]]
[-o [file]] [--compressed] [--subpx]
Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv
Example: python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4 -r 0x20-0x7F
optional arguments:
-h, --help show this help message and exit
-s [px], --size [px] Size of the font in px
--bpp [1,2,4] Bit per pixel
-r start-end [start-end ...], --range start-end [start-end ...]
Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F, 0x200, 324
--symbols sym [sym ...]
b'Symbols to include. E.g. -s \xc3\x81\xc3\x89\xc5\x90'
--font [file] A TTF or WOFF file
-o [file], --output [file]
Output file name. E.g. my_font_20.c
--compressed Compress the bitmaps
--subpx 3 times wider letters for sub pixel rendering