kopia lustrzana https://github.com/peterhinch/micropython-font-to-py
Add warning about ttf extended ASCII.
rodzic
de1e7cc65b
commit
f3f75c56ba
|
@ -44,6 +44,10 @@ Example usage to produce a file ``myfont.py`` with height of 23 pixels:
|
|||
Any requirement for arguments -xr will be specified in the device driver
|
||||
documentation. Bit reversal is required by some display hardware.
|
||||
|
||||
Note that producing extended ASCII characters (ordinal value > 127) from ttf
|
||||
files seems unreliable. If the expected results are not achieved, use an otf
|
||||
font. This appears to be a limitation of the `freetype` library.
|
||||
|
||||
### Output
|
||||
|
||||
The specified height is a target. The algorithm gets as close to the target
|
||||
|
|
|
@ -517,6 +517,8 @@ if __name__ == "__main__":
|
|||
|
||||
if args.largest > 255:
|
||||
quit('--largest must be < 256')
|
||||
elif args.largest > 127 and os.path.splitext(args.infile)[1].upper() == '.TTF':
|
||||
print('WARNING: extended ASCII characters may not be correctly converted. See docs.')
|
||||
|
||||
if args.errchar < 0 or args.errchar > 255:
|
||||
quit('--errchar must be between 0 and 255')
|
||||
|
|
Ładowanie…
Reference in New Issue