1308 Commits

Author SHA1 Message Date
Behdad Esfahbod
77dea10e5f [varLib.interpolatable] Speed up _rot_list() 2023-10-20 16:03:40 -06:00
Behdad Esfahbod
9ae5918806 [varLib.interpolatable] Help improvement 2023-10-19 09:49:30 -06: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
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
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
54bf9723a8 [varLib.interpolatable] Sort glyphs by glyphname by default 2023-10-12 20:57:28 -04:00
Behdad Esfahbod
ca11333bab [varLib.interpolatable] Close over component glyphs
...when processing variable font.

Continuation of 636295a7ee558c5712a719c632a91d6c65bfc6d8

Part of fixing https://github.com/fonttools/fontbakery/discussions/4301
2023-10-12 20:45:23 -04:00
Behdad Esfahbod
89b6b95ba9 [varLib.interpolatable] Combine vdiff() and vlen()
Faster.
2023-10-12 20:07:57 -04:00
Behdad Esfahbod
5eff55e654 [varLib.interpolatable] Don't iterate over all glyphs if not needed 2023-10-12 19:23:51 -04:00
Behdad Esfahbod
408dea84bc [varLib.interpolatable] Speed up complex_vlen() 2023-10-12 19:15:29 -04:00
Behdad Esfahbod
739868f78e [varLib.interpolatable] Skip "drawing" glyphs with only one master
Speeds up Handjet another 10x.

Part of fixing https://github.com/fonttools/fontbakery/discussions/4301
2023-10-12 18:49:58 -04:00
Behdad Esfahbod
636295a7ee [varLib.interpolatable] Speed up working on variable fonts
Only check each glyph at its own "master" locations instead of at
all master locations across the font.

Incomplete.

Fixes https://github.com/fonttools/fontbakery/discussions/4301
2023-10-12 16:03:22 -06:00
Behdad Esfahbod
60126435df [iup] Work around cython bug
Fixes https://github.com/fonttools/fonttools/issues/3282

Ref https://github.com/cython/cython/issues/3928
2023-09-28 16:39:03 -06:00
Behdad Esfahbod
b14268a23c [iup] Remove copy/pasta 2023-09-28 12:30:10 -06:00
Behdad Esfahbod
0a3360e527 [varLib.avar] New module to compile avar from .designspace file
Fixes https://github.com/fonttools/fonttools/issues/3275
2023-09-22 10:09:18 -06:00
Behdad Esfahbod
74240afc35 Revert "[varLib] Fix comment"
This reverts commit a54e45a6eafe6006b24b654c6933dd15bdbd436d.
2023-09-15 07:53:09 -06:00
Behdad Esfahbod
964685ae44 [avarPlanner] A couple more minor changes to main() 2023-09-15 07:48:00 -06:00
Behdad Esfahbod
ebbe869367 [avarPlanner] Move a couple lines around 2023-09-15 07:44:27 -06:00
Behdad Esfahbod
a54e45a6ea [varLib] Fix comment 2023-09-15 07:40:29 -06:00
Qunxin Liu
a51b3c9d68 fix the order of prune_unused_regions, should be after vardata optimization 2023-09-05 10:44:29 -07:00
Simon Cozens
57fb47de3a
Allow for merging of NULL anchors (#3248)
* A failing test for #3247

* Fix up NULL entry/exit records on merge, fixes #3247
2023-08-07 17:12:12 +01:00
Cosimo Lupo
b73969b2ff
ignore lsb, just use 0xFFFF for sparse advance 2023-08-02 15:54:34 +01:00
Cosimo Lupo
48ae9cbf1c
use 0 for sidebearing sparse metrics sentinel
font sources only allow to specify advances, the sidebearings are computed. Makes more sense for the sparse metrics to have 0 for the sidebearings as the glyph that's meant to be 'sparse' is most likely empty with no outlines
2023-08-02 15:12:26 +01:00
Cosimo Lupo
ecfc5eeeb7
varLib: use sentinel to mark glyph metrics as sparse
as discussed in https://github.com/googlefonts/ufo2ft/issues/501
2023-08-02 14:54:47 +01:00
Cosimo Lupo
c9963fd4cd
minor comment 2023-08-02 14:06:35 +01:00
Behdad Esfahbod
839e76b84d [varLib/cff] Allow sparse masters
Fixes https://github.com/fonttools/fonttools/issues/3233
2023-08-01 11:26:54 -06:00
Behdad Esfahbod
91731f7d2a [avarPlanner] Add more sizes 2023-07-26 12:49:23 -06:00
Behdad Esfahbod
7fce344404 [avarPlanner] Use interpolateLog for opsz
That's correct because weight is also exponential.
2023-07-26 10:31:08 -06:00
Behdad Esfahbod
6c1ce349e5 [avarPlanner] More docstrings 2023-07-24 16:59:27 -06:00
Behdad Esfahbod
3eeb13bded [avarPlanner] Docstring planAxis() 2023-07-24 16:51:44 -06:00
Behdad Esfahbod
9b3747a30a [avarPlanner] Minor shuffle argument order 2023-07-24 16:42:49 -06:00
Behdad Esfahbod
93b46ac1a3 [avarPlanner] Refactor more code 2023-07-24 15:56:44 -06:00
Behdad Esfahbod
f874873407 [avarPlanner] black 2023-07-24 15:13:34 -06:00
Behdad Esfahbod
340f90c7c7 [avarPlanner] Info message 2023-07-24 15:00:00 -06:00
Behdad Esfahbod
da5e6eb090 [avarPlanner] Docstring 2023-07-24 14:58:14 -06:00
Behdad Esfahbod
5d9f30230c [avarPlanner] Fix copy/pasta 2023-07-24 14:56:27 -06:00
Behdad Esfahbod
dd30dd0c88 [avarPlanner] Refactor common code 2023-07-24 14:54:34 -06:00
Behdad Esfahbod
c95a0f916f [avarPlanner] Move code around
Towards more refactoring.
2023-07-24 14:22:35 -06:00
Behdad Esfahbod
ca7267330b [avarPlanner] Fix slant planning 2023-07-24 14:18:22 -06:00
Behdad Esfahbod
b2682d5935 [avarPlanner] Fix opsz planning 2023-07-24 14:06:44 -06:00
Behdad Esfahbod
9ec69d27d5 [avarPlanner] Fix opsz 2023-07-24 13:16:44 -06:00