12 Commits

Author SHA1 Message Date
Behdad Esfahbod
39ec4e6c0c [cffLib] Add CFFToCFF2 and CFF2ToCFF cmdline and module
The CFF2ToCFF module is rather solid, at least IMO.

This takes convertCFFToCFF2 from cffLib. Apparently there's a more
complete one in varLib.cff:

https://github.com/fonttools/fonttools/issues/1835

Should merge the two and finish them.
2024-05-16 10:47:24 -07:00
Cosimo Lupo
335a1e56ec re-run black v23.10 on all .py files 2023-11-03 10:25:15 +00:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Behdad Esfahbod
2963fa503a [cffLib.widths] Fix off-by-one in values
Was wrong; didn't match the code block above it.
2022-08-09 21:44:08 -06:00
Just van Rossum
5fc65d7168
Misc py23 cleanups (#2243)
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Simon Cozens
8d32a24710
[docs] Source documentation for cffLib (#1935)
* [docs] Source documentation for cffLib

* Address feedback
2020-05-14 17:04:34 +01:00
Simon Cozens
089f24da6b
Ensure all fonttools CLI tools have help documentation (#1948)
Note UI change : `fonttools varLib.models` now takes prefixed options `-d` or `-l` instead of guessing the intended feature from the number of arguments.

We have a number of command line tools which are somewhat opaque. (varLib.models in particular was very confusing.) This ensures that they all use argparse to have a consistent interface, and all have --help documentation which at least details their parameters, and hopefully therefore gives more of a clue about what they do. Those which use logging have had a command-line logging parameter added.
2020-05-12 15:11:30 +01:00
Simon Cozens
2cef07af80
[doc] Add help options to fonttools CLI (#1920)
This adds a `help` verb (and `--help` option) to the `fonttools` command line tool. Submodules will be listed in the help text if they have an importable `main` function with a docstring, and `main`'s docstring will be used as the one-line description for the help text.
2020-05-12 06:31:13 +01:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Behdad Esfahbod
948361f981 [cffLib.width] Fix for py3 2018-02-10 16:27:25 -06:00
Behdad Esfahbod
0394016ba9 [CFF] Fixups for width module 2018-02-08 22:15:03 -06:00
Behdad Esfahbod
a70bca61fe [cff] Add module to calculate optimal CFF default and nominal glyph widths
Fixes https://github.com/typesupply/ufo2fdk/issues/34
2018-02-08 21:50:57 -06:00