add info to create charset file

pull/52/head
Jacques Supcik 2023-10-26 12:47:27 +02:00
rodzic 8e31154d97
commit ee9dbb2a1b
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -109,6 +109,13 @@ $ font_to_py.py -k extended FreeSans.ttf 23 my_extended_font.py
original ASCII set of printable characters. At risk of stating the obvious original ASCII set of printable characters. At risk of stating the obvious
this will only produce useful results if the source font file includes all this will only produce useful results if the source font file includes all
specified glyphs. specified glyphs.
A charset file can easilly be created by a one-line Python
script. For example, the `latin15` character set file is created by:
```
python3 -c 'print(bytearray([*range(0x20, 0x7F), *range(0xA0, 0xFF)]).decode("iso-8859-15"))' > latin15
```
The -c option may be used to reduce the size of the font file by limiting the The -c option may be used to reduce the size of the font file by limiting the
character set. If the font file is frozen as bytecode this will not reduce RAM character set. If the font file is frozen as bytecode this will not reduce RAM