7750 Commits

Author SHA1 Message Date
Behdad Esfahbod
ae69e9e8be
[instancer] Allow relaxed limits syntax (#3323)
* [instancer] Allow relaxed limits syntax

Fixes https://github.com/fonttools/fonttools/issues/3322

Co-authored-by: Cosimo Lupo <clupo@google.com>
2023-11-02 10:22:23 -06:00
Behdad Esfahbod
2d9b80acd1 [instancer] Remove unused import 2023-11-01 15:11:56 -06:00
Behdad Esfahbod
c3d8768346 [interpolatable] Oops, fix tests 2023-10-31 09:00:00 -06:00
Behdad Esfahbod
99da7bf722 [interpolatable] Write out problems as they are discovered
Instead of writing them all at the end...
2023-10-31 08:54:33 -06:00
Behdad Esfahbod
cd31f0ce7b [interpolatable] Add test_gen that returns a generator 2023-10-31 08:45:08 -06:00
Behdad Esfahbod
6f867e9c6a [interpolatable] Use defaultdict instead of OrderedDict
Such that missing entries return [] instead of KeyError.
2023-10-31 08:41:28 -06:00
Simon Cozens
49570c3599
[instancer] Check if an axis has values before requiring it to be found (#3319)
* Check if an axis has values before requiring it to be found

* Add test
2023-10-31 08:21:34 +00:00
Simon Cozens
3573cd906b Recalc avgcharwidth after instancing 2023-10-30 10:11:31 +00:00
Qunxin Liu
38345e8a19 fix indentation 2023-10-27 11:00:38 -07:00
Qunxin Liu
62fcec4838 [subset] fix another null-offset error in MarkLigPos 2023-10-27 10:51:11 -07:00
Cosimo Lupo
92cbfee0d0
[Debg] in toXML, dump the JSON as multi-line string with indentation
the table is for debugging, so let's make it easier for human-beings to read its content when dumped to TTX
2023-10-26 14:56:29 +01:00
Khaled Hosny
48da520472 Fix SyntaxWarning in Python 3.12
Fixes https://github.com/fonttools/fonttools/issues/3311
2023-10-25 14:34:27 +03:00
Cosimo Lupo
4b73a17e0c
[cff.specializer] Fix SyntaxWarning: invalid escape sequence
Fixes #3322
2023-10-25 10:33:31 +01:00
Behdad Esfahbod
5cd2b1cc50 [varStore] Document sorting 2023-10-24 12:47:58 -06:00
Behdad Esfahbod
13f8fff548
Merge pull request #3310 from fonttools/varStore-overflow
[varStore] Handle >65535 items per encoding
2023-10-24 11:59:39 -06:00
Behdad Esfahbod
0a6b95af1e [varLib.varStore] Revert micro-optimizations
Based on review.
2023-10-24 11:50:47 -06:00
Behdad Esfahbod
ec9986d3b8 [subset] black
Oops.
2023-10-23 21:57:11 -06:00
Behdad Esfahbod
1d0f3c27fc [subset] Handle a null-offset error in MarkLigPos
As reported by @rsheeter.
2023-10-23 21:39:28 -06:00
Behdad Esfahbod
bf402b9fde [varStore] Micro-optimize addItem() 2023-10-23 15:28:14 -06:00
Behdad Esfahbod
9e36b9465d [varStore] Micro-optimize storeDeltas()
Also speed up the test slightly by skipping rounding.
2023-10-23 15:18:11 -06:00
Behdad Esfahbod
c7ce5b0f3c [varStore] Handle >65535 items per encoding
By creating a new major for each 65535.
2023-10-23 14:43:10 -06:00
Behdad Esfahbod
6e1f55b0c8 [varLib.interpolatable] black
Oops.
2023-10-20 16:43:24 -06:00
Behdad Esfahbod
77dea10e5f [varLib.interpolatable] Speed up _rot_list() 2023-10-20 16:03:40 -06:00
Behdad Esfahbod
c7e3348904 [statisticsPen] Micro-optimize 2023-10-19 12:20:51 -06:00
Behdad Esfahbod
5686bcb342 [roundTools] Add missing export 2023-10-19 12:01:40 -06:00
Cosimo Lupo
4e26c34559
Merge pull request #3305 from fonttools/subset-dftl-cjk-features
[subset] keep East Asian spacing vhal, halt, chws, vchw by default
2023-10-19 17:43:11 +01:00
Behdad Esfahbod
9ae5918806 [varLib.interpolatable] Help improvement 2023-10-19 09:49:30 -06:00
Cosimo Lupo
5d6e1c750c
[subset] keep East Asian spacing vhal, halt, chws, vchw by default
https://github.com/harfbuzz/harfbuzz/issues/4451
2023-10-19 10:46:47 +01:00
Cosimo Lupo
6d531fed44
Merge pull request #3304 from fonttools/solver-fix
[instancer.solver] Fix case where axisDef < lower and upper < axisMax
2023-10-19 10:36:56 +01:00
Behdad Esfahbod
31c531dd04 [subset] Fix extension of subset font (again)
Fixes https://github.com/fonttools/fonttools/issues/1298#issuecomment-1768849326
2023-10-18 10:11:51 -06:00
Behdad Esfahbod
1d0a180b9d [varLib.interpolatable] One other micro-optimization
Residual from 4714c37028f462b29159ef7f7186e51ef68c20e1
2023-10-16 17:53:15 -06:00
Behdad Esfahbod
872ae47536 [varLib.interpolatable] Fix subclass base 2023-10-16 17:00:43 -06:00
Behdad Esfahbod
c306836488 [varLib.interpolatable] Another micro-optimization
Don't know why the previous code was written that way!
2023-10-16 14:55:10 -06:00
Behdad Esfahbod
b3a45f9f79 [varLib.interpolatable] Micro-optimize by reusing a list 2023-10-16 14:37:16 -06:00
Behdad Esfahbod
f1e56cd757 [instancer.solver] Fix case where axisDef < lower and upper < axisMax
Fixes https://github.com/fonttools/fonttools/issues/3291
2023-10-16 13:46:39 -06:00
Behdad Esfahbod
807864872e
Merge pull request #3301 from fonttools/faster-glyf
Faster `glyf` compile
2023-10-16 12:25:35 -06:00
Behdad Esfahbod
db393f6560 [glyf] Review feedback 2023-10-16 12:30:36 -04:00
Behdad Esfahbod
2a855f8bd6 Revert "[varLib.interpolatable] Cythonize"
This reverts commit 0914c6c0eefb1317aba95779fb469e138b19f365.
2023-10-14 18:58:53 -04:00
Behdad Esfahbod
0914c6c0ee [varLib.interpolatable] Cythonize
Doesn't save much; only 5% in RobotoFlex.  Probably going to revert.
2023-10-14 18:58:49 -04:00
Behdad Esfahbod
b01fbf2785 [varLib.interpolatable] Skip comparing contour orders if only 0 or 1 2023-10-14 17:43:45 -04:00
Behdad Esfahbod
4714c37028 [varLib.interpolatable] Speed up m0idx finding
Don't use list.index() which would compare vectors...
2023-10-14 17:25:52 -04:00
Behdad Esfahbod
d29856b2e4 [varLib.interpolatable] Micro-optimize a check 2023-10-14 17:09:27 -04:00
Behdad Esfahbod
9f42783d6f [varLib.interpolatable] Reduce imports in bipartite-matching
Choose the right implementation upfront
2023-10-14 17:01:08 -04:00
Behdad Esfahbod
67be79d77a [glyf] Use a boundsCache within _setCoordinates
Speeds up "pixel" fonts that reuse the same component a lot.
Speeds up instantiating Handjet by 47%.
2023-10-14 13:02:21 -04:00
Behdad Esfahbod
e1117da0af [glyf] Speed up getGlyphID()
Speeds up compiling of fonts with lots of composite glyphs.
For example, 40% speedup in decompile/compiling Handjet font:

./fonttools ttLib Handjet\[ELGR,ELSH,wght\].ttf -t'*' -o out.ttf
2023-10-14 12:57:32 -04:00
Behdad Esfahbod
cc09d5f381 [TupleVariation] Slightly speed up compileCoords
Small but measurable speedup.
2023-10-14 12:57:32 -04:00
Behdad Esfahbod
9eeee75b03 [glyf] Speed up recalcBounds() 2023-10-13 13:53:44 -04:00
Behdad Esfahbod
fe37e91258 [glyf] Speed up recalcBounds of composite glyphs
Brings down decompile/compiling of Handjet font from 11s to 0.3s.

Test with:
time ./fonttools ttLib Handjet.ttf -o out.ttf -tglyf

Part of fixing https://github.com/fonttools/fontbakery/discussions/4301
2023-10-13 13:52:19 -04:00
Behdad Esfahbod
089afcbccd [arrayTools] Allow None bounds in updateBounds 2023-10-13 13:13:26 -04:00
Behdad Esfahbod
377105f0c1 [glyf] Speed up coordinates slice access 2023-10-13 12:22:48 -04:00