Behdad Esfahbod
d757bfac8a
[cffLib] Add remove_hints() and remove_unused_subroutines() methods
...
From subset.cff.
2024-05-21 13:42:50 -07:00
Behdad Esfahbod
a851d02519
[cffLib] Move desubroutinize code to new cffLib.transforms module
2024-05-21 13:42:50 -07:00
Behdad Esfahbod
65cc8bfb3c
Merge pull request #3506 from fonttools/cff2-instancing
...
[instancer] CFF2 instancing
2024-05-17 13:17:12 -07:00
Behdad Esfahbod
d77077125b
[CFFToCFF2] Use a custom exception instead of TypeError
2024-05-17 12:57:17 -07:00
Behdad Esfahbod
5dca3c5a50
[instancer] Warn about missing VORG support
2024-05-17 12:44:29 -07:00
Behdad Esfahbod
4b62d5efe9
[instancer] Set VarDataCount
2024-05-17 12:25:20 -07:00
Behdad Esfahbod
56cf131088
[CFFToCFF2] Add comment
2024-05-17 11:50:00 -07:00
Behdad Esfahbod
15af3425e9
[instancer] Add --downgrade-cff2
2024-05-17 11:45:35 -07:00
Behdad Esfahbod
9ffcabd360
[instancer] Remove resolved TODO
2024-05-17 11:41:06 -07:00
Behdad Esfahbod
397a19deb7
[CFF2ToCFF] Don't decompile subroutines
...
They can't be decompiled standalone. Decompiling glyph programs
already decompiled the used ones.
2024-05-17 11:35:11 -07:00
Behdad Esfahbod
ee1632c584
Update Lib/fontTools/cffLib/CFF2ToCFF.py
...
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2024-05-17 12:31:54 -06:00
Khaled Hosny
dbe1264b34
[subset] Prune unused user name IDs even with --name-IDs='*'
...
This option should affect only pre-defined name IDs, user name IDs
should be pruned when nit used, as usual.
Fixes https://github.com/fonttools/fonttools/issues/3508
2024-05-17 19:26:19 +03:00
Behdad Esfahbod
ade8ff627d
[CFFToCFF2] Process charstrings before TopDict
...
Otherwise it fails for charset fonts.
2024-05-17 08:22:41 -07:00
Cosimo Lupo
b2b771076c
Merge pull request #3509 from fonttools/ttx-gnu-getopt
...
[ttx] use GNU-style getopt to intermix options and positional arguments
2024-05-17 12:19:49 +01:00
Cosimo Lupo
511024bdc9
[ttx] use GNU-style getopt to intermix options and positional arguments
...
Fixes https://github.com/fonttools/fonttools/issues/3507
2024-05-17 12:07:59 +01:00
Behdad Esfahbod
4e57e36c8b
Typo
2024-05-16 18:17:40 -07:00
Behdad Esfahbod
d684952b6c
[CFFToCFF2] Upconvert subroutines and charstrings
...
Also drop explicit width. See comments.
2024-05-16 18:04:59 -07:00
Behdad Esfahbod
f2006eb54f
[merge] Add Ouch!
2024-05-16 17:41:29 -07:00
Behdad Esfahbod
53e141fc41
[cffLib.CFF2ToCFF] Update post table version if needed
2024-05-16 16:34:24 -07:00
Behdad Esfahbod
0a7433f847
[cffLib] Add CFF<->CFF2 convertors that work on otFont
2024-05-16 16:29:22 -07:00
Behdad Esfahbod
b009b614f3
[cffLib.CFF2ToCFF] Fixup
2024-05-16 16:16:14 -07:00
Behdad Esfahbod
1d1b7eb2f2
[cffLib] Add --verbose / --quiet to convertors
...
As well as actually save!
2024-05-16 16:07:03 -07:00
Behdad Esfahbod
ec36fe74d5
[cffLib / varLib] Merge two impls of convertCFFToCFF2
...
Fixes https://github.com/fonttools/fonttools/issues/1835
2024-05-16 15:57:31 -07:00
Behdad Esfahbod
4384eef42e
[cffLib] Comment
2024-05-16 15:33:22 -07:00
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
Behdad Esfahbod
60e30fe008
[cffLib] Add a simple (and quite possibly incomplete) convertCFF2ToCFF()
2024-05-15 17:33:00 -07:00
Behdad Esfahbod
c06e8ba1e8
[instancer/CFF2] Comment
2024-05-14 18:26:35 -06:00
Behdad Esfahbod
c22f7d5af4
[cffLib.specializer] Simplify vsindex protocol
2024-05-14 18:13:51 -06:00
Behdad Esfahbod
3d2df43a67
[instancer/CFF2] Comment
2024-05-14 17:13:21 -06:00
Behdad Esfahbod
17474e19a4
[instancer/CFF2] Yet another test
2024-05-14 14:04:12 -06:00
Behdad Esfahbod
267fa79cca
[instancer/CFF2] Add another test
...
This one has private blend values.
2024-05-14 13:47:08 -06:00
Behdad Esfahbod
b3dc48a967
[instancer/CFF2] Micro-optimize commands
2024-05-14 13:39:09 -06:00
Behdad Esfahbod
1011d7e996
[instancer/CFF2] Add another test
2024-05-14 13:34:20 -06:00
Behdad Esfahbod
6d915fc816
[instancer/CFF2] Add test
2024-05-14 12:28:00 -06:00
Behdad Esfahbod
cbec49c72c
[cffLib] A couple of fixups
...
In particular, I don't know why we were appending a 'return'
at the end of CFF2 desubroutinized charstrings!
2024-05-14 11:56:15 -06:00
Behdad Esfahbod
1891a7220d
[instancer/CFF2] Fixups
2024-05-14 11:11:39 -06:00
Behdad Esfahbod
385c2cb979
[instancer/CFF2] Instantiate private-dict values
2024-05-14 11:11:25 -06:00
Behdad Esfahbod
bdd42f14fc
[instancer/CFF2] Fixups with used-vsindex handing
...
vsindex 0 is implied.
Also, add Unimplemented code for private-dict variable
values. I couldn't find any fonts using them, so for
now they remain unimplemented.
2024-05-14 01:15:04 -06:00
Behdad Esfahbod
68f87dd850
[instancer/CFF2] Fix tests
...
gvar is removed by the time we get to hmtx/vmtx subsetting.
2024-05-14 00:47:39 -06:00
Behdad Esfahbod
21fb882e67
[instancer/CFF2] Prune ununsed data
2024-05-14 00:35:09 -06:00
Behdad Esfahbod
6f85ebb02c
[instancer/CFF2] Full-instancing
2024-05-14 00:11:29 -06:00
Behdad Esfahbod
ae18197f6f
[instancer/CFF2] Instantiate hmtx/vmtx
2024-05-14 00:11:29 -06:00
Behdad Esfahbod
c9ed0d1348
[instancer/CFF2] Minor sanity check
2024-05-14 00:11:29 -06:00
Behdad Esfahbod
f6c72eabf9
[instancer/CFF2] Add specialize and generalize arguments
2024-05-14 00:11:29 -06:00
Behdad Esfahbod
bb9a23702b
[instancer] Instantiate CFF2!
2024-05-14 00:11:29 -06:00
Behdad Esfahbod
969d09dcaf
[instancer] Fix name decision-making
...
All limits are tuple these days.
2024-05-14 00:10:50 -06:00
Behdad Esfahbod
9f51fac512
[cffLib] Make sure we compile VarStore
...
Ouch. Took me a while to find this bug. If data is set,
it will be reused and no compilation happens.
2024-05-13 22:47:22 -06:00
Behdad Esfahbod
ce78d2c88f
Typo
2024-05-13 17:17:30 -06:00
Just van Rossum
24cb4e0dcf
[feaLib.variableScalar] fix value_at_location() method ( #3491 )
2024-05-13 08:48:59 +01:00
David Corbett
0738c41dfb
[psCharStrings] Shorten output of encodeFloat
2024-05-10 18:47:23 -07:00