12004 Commits

Author SHA1 Message Date
Behdad Esfahbod
0a7993998d Revert "[glyf] Load using LazyDict"
This reverts commit b493729eff954909672694b67a453964f33ac893.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
cae76d540a [glyf] Load using LazyDict
Going to revert. No speedup since glyphs are loaded lazy
anyway.  And one test fails I have no idea why:

Tests/ttLib/woff2_test.py::WOFF2GlyfTableTest::test_reconstruct_glyf_padded_4
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
3ff2ee61e1 Move lazy datastructures to misc.lazyTools 2024-05-22 18:45:28 -06:00
Behdad Esfahbod
3806fd2558 Move a couple of functions outline 2024-05-22 18:45:28 -06:00
Behdad Esfahbod
7471ac6d4d [gvar] Speed up loading by not reading all offsets 2024-05-22 18:45:28 -06:00
Behdad Esfahbod
61916c1034 [gvar] Speed up loading a bit
More to come.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
7de1306d92 [CFF2Index] Make even faster
Load offsets on-demand as well.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
feb6820d03 [_LazyList] Make much faster 2024-05-22 18:45:28 -06:00
Behdad Esfahbod
450c8f1581 [CFF2Index] Make loading lazy
Still too slow, but much faster.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
5faf139417 [CFF2Index] Minor massage 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c952237ed3 [otConverters] Make _LazyList generic 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c50a0f6195 [VARC] Rename a type 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
e22953e807 Black 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
950d39b9d3 [VARC] Finish drawing! 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
bbad70ef8a [VARC] bool(Vector) is useless... :( 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c69fd12251 [VARC] Move code around 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
4b6c574d54 [VARC] More towards drawing 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
68277fc0b5 [TupleVariation] Fix 32bit reading / writing 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
8cce745d90 [TupleVariation] Assert message 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
0e52857ffe [VARC] Start drawing VARC glyphs 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
a30ebf0a2f Revert "Remove some more remnants of VarComposites in ttGlyphSet"
This reverts commit 98d30dcf45e71b4352d9bfe2fee6ce4bfa198248.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
e9551c483a Remove some more remnants of VarComposites in ttGlyphSet
Going to re-add for VARC table.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
bcd5e4c216 Rip out glyf1 VarComposites
In favor of separate VARC table.

ttGlyphSet does NOT yet know how to draw VARC table though.

The 9 failing tests are all VarComposite-related and need
to be updated with VARC equivalents eventually when we
add VARC support to subsetter and instancer.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
ec78b572c9 [MultiVarStore] Fix up XML read/write
Looks complete now.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c78ba01c80 [VarCompositeGlyph] Use two varIdxes per component
Seems to save space now with MultiVarStore.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
b4d3fc54b2 [TupleVariation] Support 32bit encoding in delta-encoding
Uses an used combination of top two bits.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
5fe9da49f3 [MultiVarStore] Fix caching 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
6bcab786a1 [varStore] Fix caching when setModel() is called repeatedly 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
02c6a94529 [VARC] Use TupleVariation value encoding 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
0e9eff8990 Add MultiVarStore 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
b7ab1d8c12 [varStore] Fix overflow logic 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
a8005130cc [varStore] Cache individual items in store*Many() 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
6f4feffa11 [varStore] Add storeMastersMany / storeDeltasMany 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
1a1e9e198b [VARC] Use one varIndexBase only 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
aad01a9d85 [VARC] Towards XML 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c3175b271a [transform] Add __eq__ / __ne__ to DecomposedTransform 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
ef6903e097 [VARC] Start
Based on https://github.com/harfbuzz/boring-expansion-spec/issues/103#issuecomment-1856325577
2024-05-22 18:45:27 -06:00
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