@@ -105,6 +105,7 @@ $ font_to_py.py -k extended FreeSans.ttf 23 my_extended_font.py
105
105
* -e or --errchar Ordinal value of character to be rendered if an attempt is
106
106
made to display an out-of-range character. Default 63 (ord("?")).
107
107
* -i or --iterate Specialist use. See below.
108
+ * -b or --binary Create a binary font file. See below.
108
109
* -c or --charset Option to restrict the characters in the font to a specific
109
110
set. See below.
110
111
* -k or --charset_file Obtain the character set from a file. Typical use is
@@ -136,7 +137,7 @@ Any requirement for arguments -xr will be specified in the device driver
136
137
documentation. Bit reversal is required by some display hardware.
137
138
138
139
Using the -f argument with a variable pitch source font will produce a fixed
139
- pitch result. A better apearance would be achieved by using a font designed as
140
+ pitch result. A better appearance would be achieved by using a font designed as
140
141
monospaced.
141
142
142
143
There have been reports that producing fonts with Unicode characters outside
@@ -208,22 +209,27 @@ for an explanation of `baseline`.
208
209
209
210
There is an option to create a binary font file, specified with a ` -b ` or
210
211
` --binary ` command line argument. In this instance the output filename must
211
- not have a ` .py ` extension. This is primarily intended for the e-paper driver
212
- in applications where the file is to be stored on the display's internal flash
213
- memory rather than using frozen Python modules.
214
-
215
- The technique of accessing character data from a random access file is slow
216
- and thus probably only applicable to devices such as e-paper where the update
217
- time is slow.
212
+ not have a ` .py ` extension. This format was developed for an e-paper driver
213
+ where the file was stored on the display's internal flash memory; it is not
214
+ clear if there is a current use case.
218
215
219
216
Binary files currently support only the standard ASCII character set. There is
220
217
no error character: the device driver must ensure that seeks are within range.
218
+ Conversion of bdf and pcf font files is currently unsupported.
219
+
221
220
Only the following optional arguments are valid:
222
221
223
222
* -f or --fixed.
224
223
* -x or --xmap.
224
+ * -y or --ymap
225
225
* -r or --reverse.
226
226
227
+ The format of binary font files is described [ here] ( ./writer/DRIVERS.md ) .
228
+
229
+ An alternative implementation of binary fonts may be found in
230
+ [ this repo] ( https://github.com/antirez/microfont ) . It provides for rotated
231
+ rendering to a ` FrameBuffer ` .
232
+
227
233
# 6. Dependencies, links and licence
228
234
229
235
The code is released under the MIT licence. The ` font_to_py.py ` utility
0 commit comments