micropython-font-to-py icon indicating copy to clipboard operation
micropython-font-to-py copied to clipboard

support hungarian characters

Open tilhoft opened this issue 1 year ago • 1 comments

It would be nice if I can use special chars (áíűüőöúé) i believe it is utf-8, and i tried with an otf file which allegedly support hungarian chars

tilhoft avatar Aug 26 '24 21:08 tilhoft

Please see docs para 3.1.2. Support for special character sets is provided.

peterhinch avatar Aug 27 '24 06:08 peterhinch

Please see docs para 3.1.2. Support for special character sets is provided.

-k how to find ? THSarabunNew.zip

i try -k Thai or -k Thailand

python .\font_to_py.py .\source\THSarabunNew.ttf 20 -x -k Thailand font_20.py
Can't open Thailand for reading.

Witawat avatar Oct 27 '24 10:10 Witawat

You have to create the file Thailand. This must contain the glyphs you want to create. I created a file thai containing a copy of the glyphs in your other post. I then did:

[adminpete@meerkat]: ~/Downloads
$ font_to_py.py THSarabunNew.ttf 20 -k thai thailand.py
Writing Python font file.
Height set in 3 passes. Actual height 20 pixels.
Max character width 12 pixels.
Sparse font file.
thailand.py written successfully.

peterhinch avatar Oct 27 '24 11:10 peterhinch

I have now posted the file charsets/Thailand. Thank you for the contribution.

peterhinch avatar Oct 28 '24 10:10 peterhinch