1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
|
%global _empty_manifest_terminate_build 0
Name: python-fontmake
Version: 3.5.1
Release: 1
Summary: Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).
License: Apache Software License 2.0
URL: https://github.com/googlei18n/fontmake
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1c/88/ad0cabeba453636d81b6ca19bc32fef4cc15ec9ad7bb97ab168a1c6896f5/fontmake-3.5.1.zip
BuildArch: noarch
Requires: python3-glyphsLib
Requires: python3-ufo2ft[compreffor]
Requires: python3-fontMath
Requires: python3-ufoLib2
Requires: python3-attrs
Requires: python3-fonttools[ufo,unicode]
Requires: python3-fonttools[lxml,ufo,unicode]
Requires: python3-skia-pathops
Requires: python3-MutatorMath
Requires: python3-ttfautohint-py
Requires: python3-ttfautohint-py
Requires: python3-MutatorMath
Requires: python3-skia-pathops
%description
![GitHub Actions Build Status][] ![Python Versions][] [![PyPI
Version][]][1]
# fontmake
`fontmake` compiles fonts from various sources (`.glyphs`, `.ufo`, `designspace`) into binaries (`.otf`, `.ttf`). You can use it to create static instances and variable fonts.
## Installation
Fontmake requires Python 3.7 or later.
Releases are available on [PyPI][] and can be installed with [pip][].
``` bash
pip3 install fontmake
```
Use the `-U`, `--upgrade` option to update fontmake and its dependencies
to the newest available release:
``` bash
pip3 install -U fontmake
```
## Basic Usage
After installation, you will be able to use the `fontmake` executable.
For example, to compile a variable font from a Glyphs source file, use:
``` bash
fontmake MyFont.glyphs -o variable
```
The most important command line arguments to the `fontmake` executable are the required input, specified either as positional argument or using one of `-g`/`-u`/`-m` flags, and the optional `-o` flag, which chooses the output file format.
### Source file format options
There are two ways to specify the source file or files:
One can either use the following, mutually exclusive, flags:
* `-g filename.glyphs`: Converts a Glyphs source file to binary.
* `-u filename.ufo ...`: Converts one or more UFO files to binary.
* `-m filename.designspace`: Converts a Designspace file to binary. (The `-m` is for `mutatormath`, an old Python library for handling designspaces.)
Alternatively, one can specify the input(s) as positional arguments without the flag, letting fontmake infer the source format from the file extension: e.g. ``fontmake MyFont.designspace``, etc.
Note: if the positional arguments are preceded by an option that takes one or more arguments, you need to use the special `--` separator to mark all following
arguments as positional (non-options), otherwise the parser gets confused. E.g., the `-i` option takes zero or one arguments (see futher below for details); without `--`, argparse thinks you didn't provide any inputs:
```bash
fontmake -i -- MyFont.designspace
```
Exactly one type of input can/must be specified, using either approaches.
### Output file format options
You may provide one or more output file formats after the `-o` option. For example, `-o otf ttf` creates OTF and TTF binary font files for each master in your input file.
The following output file formats are available:
* `otf`: Per-master OTF (CFF-outline) binaries. Placed in the `master_otf/` directory.
* `ttf`: Per-master TTF (TrueType-outline) binaries. Placed in the `master_ttf/` directory.
* `otf-cff2`: Per-master OTF binaries with CFF2 outlines. Placed in the `master_otf/` directory.
* `variable`: A TrueType variable font. Placed in the `variable_ttf/` directory.
* `variable-cff2`: A variable font with CFF2 outlines. Placed in the `variable_otf/` directory.
The following output file formats are also available, but are generally used internally by fontmake as an intermediate step to one of the above outputs:
* `otf-interpolatable`: OTF binaries suitable for merging into a variable font. Placed in the `master_otf_interpolatable/` directory. (These differ from `otf` in that the outlines are unoptimized.)
* `ttf-interpolatable`: TTF binaries suitable for merging into a variable font. Placed in the `master_ttf_interpolatable/` directory. (The outlines are converted to quadratic curves in an interpolation-compatible way.)
* `ufo`: Glyphs sources can be converted to UFO. Placed in the `master_ufo/` directory.
If no format option is specified, the default is `-o otf ttf`.
### Other important command line options
* `-i` (Interpolate instances): Having per-master binaries is not always what you expect; if you have defined instances ("exports") in your Glyphs file, they will *not* be generated by default. To generate them, pass the `-i` flag, which interpolates static instances, and places them in the `instance_ttf/` or `instance_otf/` directory as appropriate.
* `--output-dir <some_directory>`: Places all output in the given directory, instead of the per-format directories mentioned above.
* `--output-path <filename>`: This is only valid if the output is a single binary file, and writes the output to the given filename.
* `-f` (Flatten components): Ensures that any glyphs which contain components which *themselves* contain components are decomposed to a single level. This is recommended as certain rendering environments do not correctly handle nested components - see [this link](https://github.com/googlefonts/fontbakery/issues/2961) for more details.
## Advanced Usage
See [`USAGE.md`](USAGE.md).
## Troubleshooting
See [`TROUBLESHOOTING.md`](TROUBLESHOOTING.md).
## Developers
Developers can get the latest version of `fontmake` by cloning the git repository:
``` bash
git clone https://github.com/googlefonts/fontmake
cd fontmake
pip install .
```
Developers who want to quickly test changes to the source code without re-installing can use the "--editable" option when installing from a local source checkout:
``` bash
pip install -e .
```
It is recommended to install fontmake inside a virtual environment to
prevent conflicts between its dependencies and other modules installed
globally.
You could also use the [pipx][] tool to automate the
installation/upgrade of python apps like fontmake in isolated
environments.
### Releasing a New Version
0. Commit and push your final changes for the new version.
1. Create an annotated Git tag of the version number, with a prepended "v", like so: `git tag -a v3.1.1`
2. Write the release notes into the tag message. They will show up as release notes on the release page in GitHub.
3. Push the tag like so: `git push origin v3.1.1`, where `origin` is the name of the usual remote you want to push the version to.
[GitHub Actions Build Status]: https://github.com/googlefonts/fontmake/workflows/Test%20+%20Deploy/badge.svg
[Python Versions]: https://img.shields.io/badge/python-3.7-blue.svg
[PyPI Version]: https://img.shields.io/pypi/v/fontmake.svg
[1]: https://pypi.org/project/fontmake/
[PyPI]: https://pypi.org/project/fontmake
[pip]: https://pip.pypa.io
[pipx]: https://github.com/pipxproject/pipx
%package -n python3-fontmake
Summary: Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).
Provides: python-fontmake
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-fontmake
![GitHub Actions Build Status][] ![Python Versions][] [![PyPI
Version][]][1]
# fontmake
`fontmake` compiles fonts from various sources (`.glyphs`, `.ufo`, `designspace`) into binaries (`.otf`, `.ttf`). You can use it to create static instances and variable fonts.
## Installation
Fontmake requires Python 3.7 or later.
Releases are available on [PyPI][] and can be installed with [pip][].
``` bash
pip3 install fontmake
```
Use the `-U`, `--upgrade` option to update fontmake and its dependencies
to the newest available release:
``` bash
pip3 install -U fontmake
```
## Basic Usage
After installation, you will be able to use the `fontmake` executable.
For example, to compile a variable font from a Glyphs source file, use:
``` bash
fontmake MyFont.glyphs -o variable
```
The most important command line arguments to the `fontmake` executable are the required input, specified either as positional argument or using one of `-g`/`-u`/`-m` flags, and the optional `-o` flag, which chooses the output file format.
### Source file format options
There are two ways to specify the source file or files:
One can either use the following, mutually exclusive, flags:
* `-g filename.glyphs`: Converts a Glyphs source file to binary.
* `-u filename.ufo ...`: Converts one or more UFO files to binary.
* `-m filename.designspace`: Converts a Designspace file to binary. (The `-m` is for `mutatormath`, an old Python library for handling designspaces.)
Alternatively, one can specify the input(s) as positional arguments without the flag, letting fontmake infer the source format from the file extension: e.g. ``fontmake MyFont.designspace``, etc.
Note: if the positional arguments are preceded by an option that takes one or more arguments, you need to use the special `--` separator to mark all following
arguments as positional (non-options), otherwise the parser gets confused. E.g., the `-i` option takes zero or one arguments (see futher below for details); without `--`, argparse thinks you didn't provide any inputs:
```bash
fontmake -i -- MyFont.designspace
```
Exactly one type of input can/must be specified, using either approaches.
### Output file format options
You may provide one or more output file formats after the `-o` option. For example, `-o otf ttf` creates OTF and TTF binary font files for each master in your input file.
The following output file formats are available:
* `otf`: Per-master OTF (CFF-outline) binaries. Placed in the `master_otf/` directory.
* `ttf`: Per-master TTF (TrueType-outline) binaries. Placed in the `master_ttf/` directory.
* `otf-cff2`: Per-master OTF binaries with CFF2 outlines. Placed in the `master_otf/` directory.
* `variable`: A TrueType variable font. Placed in the `variable_ttf/` directory.
* `variable-cff2`: A variable font with CFF2 outlines. Placed in the `variable_otf/` directory.
The following output file formats are also available, but are generally used internally by fontmake as an intermediate step to one of the above outputs:
* `otf-interpolatable`: OTF binaries suitable for merging into a variable font. Placed in the `master_otf_interpolatable/` directory. (These differ from `otf` in that the outlines are unoptimized.)
* `ttf-interpolatable`: TTF binaries suitable for merging into a variable font. Placed in the `master_ttf_interpolatable/` directory. (The outlines are converted to quadratic curves in an interpolation-compatible way.)
* `ufo`: Glyphs sources can be converted to UFO. Placed in the `master_ufo/` directory.
If no format option is specified, the default is `-o otf ttf`.
### Other important command line options
* `-i` (Interpolate instances): Having per-master binaries is not always what you expect; if you have defined instances ("exports") in your Glyphs file, they will *not* be generated by default. To generate them, pass the `-i` flag, which interpolates static instances, and places them in the `instance_ttf/` or `instance_otf/` directory as appropriate.
* `--output-dir <some_directory>`: Places all output in the given directory, instead of the per-format directories mentioned above.
* `--output-path <filename>`: This is only valid if the output is a single binary file, and writes the output to the given filename.
* `-f` (Flatten components): Ensures that any glyphs which contain components which *themselves* contain components are decomposed to a single level. This is recommended as certain rendering environments do not correctly handle nested components - see [this link](https://github.com/googlefonts/fontbakery/issues/2961) for more details.
## Advanced Usage
See [`USAGE.md`](USAGE.md).
## Troubleshooting
See [`TROUBLESHOOTING.md`](TROUBLESHOOTING.md).
## Developers
Developers can get the latest version of `fontmake` by cloning the git repository:
``` bash
git clone https://github.com/googlefonts/fontmake
cd fontmake
pip install .
```
Developers who want to quickly test changes to the source code without re-installing can use the "--editable" option when installing from a local source checkout:
``` bash
pip install -e .
```
It is recommended to install fontmake inside a virtual environment to
prevent conflicts between its dependencies and other modules installed
globally.
You could also use the [pipx][] tool to automate the
installation/upgrade of python apps like fontmake in isolated
environments.
### Releasing a New Version
0. Commit and push your final changes for the new version.
1. Create an annotated Git tag of the version number, with a prepended "v", like so: `git tag -a v3.1.1`
2. Write the release notes into the tag message. They will show up as release notes on the release page in GitHub.
3. Push the tag like so: `git push origin v3.1.1`, where `origin` is the name of the usual remote you want to push the version to.
[GitHub Actions Build Status]: https://github.com/googlefonts/fontmake/workflows/Test%20+%20Deploy/badge.svg
[Python Versions]: https://img.shields.io/badge/python-3.7-blue.svg
[PyPI Version]: https://img.shields.io/pypi/v/fontmake.svg
[1]: https://pypi.org/project/fontmake/
[PyPI]: https://pypi.org/project/fontmake
[pip]: https://pip.pypa.io
[pipx]: https://github.com/pipxproject/pipx
%package help
Summary: Development documents and examples for fontmake
Provides: python3-fontmake-doc
%description help
![GitHub Actions Build Status][] ![Python Versions][] [![PyPI
Version][]][1]
# fontmake
`fontmake` compiles fonts from various sources (`.glyphs`, `.ufo`, `designspace`) into binaries (`.otf`, `.ttf`). You can use it to create static instances and variable fonts.
## Installation
Fontmake requires Python 3.7 or later.
Releases are available on [PyPI][] and can be installed with [pip][].
``` bash
pip3 install fontmake
```
Use the `-U`, `--upgrade` option to update fontmake and its dependencies
to the newest available release:
``` bash
pip3 install -U fontmake
```
## Basic Usage
After installation, you will be able to use the `fontmake` executable.
For example, to compile a variable font from a Glyphs source file, use:
``` bash
fontmake MyFont.glyphs -o variable
```
The most important command line arguments to the `fontmake` executable are the required input, specified either as positional argument or using one of `-g`/`-u`/`-m` flags, and the optional `-o` flag, which chooses the output file format.
### Source file format options
There are two ways to specify the source file or files:
One can either use the following, mutually exclusive, flags:
* `-g filename.glyphs`: Converts a Glyphs source file to binary.
* `-u filename.ufo ...`: Converts one or more UFO files to binary.
* `-m filename.designspace`: Converts a Designspace file to binary. (The `-m` is for `mutatormath`, an old Python library for handling designspaces.)
Alternatively, one can specify the input(s) as positional arguments without the flag, letting fontmake infer the source format from the file extension: e.g. ``fontmake MyFont.designspace``, etc.
Note: if the positional arguments are preceded by an option that takes one or more arguments, you need to use the special `--` separator to mark all following
arguments as positional (non-options), otherwise the parser gets confused. E.g., the `-i` option takes zero or one arguments (see futher below for details); without `--`, argparse thinks you didn't provide any inputs:
```bash
fontmake -i -- MyFont.designspace
```
Exactly one type of input can/must be specified, using either approaches.
### Output file format options
You may provide one or more output file formats after the `-o` option. For example, `-o otf ttf` creates OTF and TTF binary font files for each master in your input file.
The following output file formats are available:
* `otf`: Per-master OTF (CFF-outline) binaries. Placed in the `master_otf/` directory.
* `ttf`: Per-master TTF (TrueType-outline) binaries. Placed in the `master_ttf/` directory.
* `otf-cff2`: Per-master OTF binaries with CFF2 outlines. Placed in the `master_otf/` directory.
* `variable`: A TrueType variable font. Placed in the `variable_ttf/` directory.
* `variable-cff2`: A variable font with CFF2 outlines. Placed in the `variable_otf/` directory.
The following output file formats are also available, but are generally used internally by fontmake as an intermediate step to one of the above outputs:
* `otf-interpolatable`: OTF binaries suitable for merging into a variable font. Placed in the `master_otf_interpolatable/` directory. (These differ from `otf` in that the outlines are unoptimized.)
* `ttf-interpolatable`: TTF binaries suitable for merging into a variable font. Placed in the `master_ttf_interpolatable/` directory. (The outlines are converted to quadratic curves in an interpolation-compatible way.)
* `ufo`: Glyphs sources can be converted to UFO. Placed in the `master_ufo/` directory.
If no format option is specified, the default is `-o otf ttf`.
### Other important command line options
* `-i` (Interpolate instances): Having per-master binaries is not always what you expect; if you have defined instances ("exports") in your Glyphs file, they will *not* be generated by default. To generate them, pass the `-i` flag, which interpolates static instances, and places them in the `instance_ttf/` or `instance_otf/` directory as appropriate.
* `--output-dir <some_directory>`: Places all output in the given directory, instead of the per-format directories mentioned above.
* `--output-path <filename>`: This is only valid if the output is a single binary file, and writes the output to the given filename.
* `-f` (Flatten components): Ensures that any glyphs which contain components which *themselves* contain components are decomposed to a single level. This is recommended as certain rendering environments do not correctly handle nested components - see [this link](https://github.com/googlefonts/fontbakery/issues/2961) for more details.
## Advanced Usage
See [`USAGE.md`](USAGE.md).
## Troubleshooting
See [`TROUBLESHOOTING.md`](TROUBLESHOOTING.md).
## Developers
Developers can get the latest version of `fontmake` by cloning the git repository:
``` bash
git clone https://github.com/googlefonts/fontmake
cd fontmake
pip install .
```
Developers who want to quickly test changes to the source code without re-installing can use the "--editable" option when installing from a local source checkout:
``` bash
pip install -e .
```
It is recommended to install fontmake inside a virtual environment to
prevent conflicts between its dependencies and other modules installed
globally.
You could also use the [pipx][] tool to automate the
installation/upgrade of python apps like fontmake in isolated
environments.
### Releasing a New Version
0. Commit and push your final changes for the new version.
1. Create an annotated Git tag of the version number, with a prepended "v", like so: `git tag -a v3.1.1`
2. Write the release notes into the tag message. They will show up as release notes on the release page in GitHub.
3. Push the tag like so: `git push origin v3.1.1`, where `origin` is the name of the usual remote you want to push the version to.
[GitHub Actions Build Status]: https://github.com/googlefonts/fontmake/workflows/Test%20+%20Deploy/badge.svg
[Python Versions]: https://img.shields.io/badge/python-3.7-blue.svg
[PyPI Version]: https://img.shields.io/pypi/v/fontmake.svg
[1]: https://pypi.org/project/fontmake/
[PyPI]: https://pypi.org/project/fontmake
[pip]: https://pip.pypa.io
[pipx]: https://github.com/pipxproject/pipx
%prep
%autosetup -n fontmake-3.5.1
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-fontmake -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 3.5.1-1
- Package Spec generated
|