631 Commits

Author SHA1 Message Date
Behdad Esfahbod
7fadfa4e81 Revert "refactor: pass isfinal argument spelled-out not a number"
This reverts commit 6d65a87301b6c746ae0ec1dc1cf0df75c0c21d63.

https://github.com/fonttools/fonttools/pull/3669#issuecomment-2428475144
2024-10-22 01:34:48 -06:00
Robin
6d65a87301 refactor: pass isfinal argument spelled-out not a number 2024-10-22 01:28:05 -06:00
Robin
505c6e1fa3 set isfinal to true to enable xml parser to free resources 2024-10-22 01:28:05 -06:00
Simon Cozens
3546b9f06d Search the object's MRO for visitors 2024-07-03 06:48:38 -06:00
Behdad Esfahbod
0bf67cc0c9 [statisticsPen] Fix __start_point access
Fixes https://github.com/fonttools/fonttools/issues/3527
2024-05-25 09:38:39 -06:00
Behdad Esfahbod
e3ba7a7e0b [lazyTools] Simplify based on review feedback 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
b3a0a21125 [transform] Remove redundant methods 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
42a5fbdfdd [VARC] Redesign table
No spec yet. For results see:

https://github.com/harfbuzz/boring-expansion-spec/issues/103#issuecomment-1863533305
2024-05-22 18:46:06 -06:00
Behdad Esfahbod
45f7f4f70f Try fixing Python < 3.12 2024-05-22 18:46:06 -06:00
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
c3175b271a [transform] Add __eq__ / __ne__ to DecomposedTransform 2024-05-22 18:45:27 -06:00
David Corbett
0738c41dfb [psCharStrings] Shorten output of encodeFloat 2024-05-10 18:47:23 -07:00
Behdad Esfahbod
2ce45c2861 [bezierTools] Fix infinite-recursion in calcCubicArcLength
Fixes https://github.com/fonttools/fonttools/issues/3502
2024-05-07 08:54:42 -07:00
Simon Cozens
9acbd12637
Better failure mode for sstruct (#3500)
* Check format fits and give sensible error if not

* sstruct.getformat now returns dictionaries, merge them
2024-05-07 14:01:46 +01:00
Khaled Hosny
cf08265cd5 Black 2024-02-06 15:47:35 +02:00
Simon Cozens
b5ddc99fb9
linelike intersections (#3353)
* Replace linelike intersections with line-curve/line-line tests, fixes #3352

* Tests for #3352
2023-11-27 17:27:28 +00:00
Cosimo Lupo
335a1e56ec re-run black v23.10 on all .py files 2023-11-03 10:25:15 +00:00
Behdad Esfahbod
5686bcb342 [roundTools] Add missing export 2023-10-19 12:01:40 -06:00
Behdad Esfahbod
089afcbccd [arrayTools] Allow None bounds in updateBounds 2023-10-13 13:13:26 -04:00
Cosimo Lupo
21dea1e18d fix incorrectly typed cython local variable
Fixes https://github.com/fonttools/fonttools/issues/3287
2023-10-06 10:10:46 +01:00
David Corbett
4660b8c359 Return three-byte operands from encodeIntCFF 2023-07-07 12:01:15 -04:00
Cosimo Lupo
f7ca9f28ac
vector: add isclose method to compare vs another Vector using math.isclose 2023-06-07 17:50:33 +01:00
Behdad Esfahbod
832f2f766f [varStore.optimize] Use faster intTools.bit_count as popcount 2023-05-25 08:19:15 -06:00
Cosimo Lupo
e8f8a6c40d xmlReader: join consecutive text data that had been cut by buffered parser
Fixes https://github.com/fonttools/fonttools/issues/2614
2023-05-22 12:22:41 +01:00
Behdad Esfahbod
7fd3f7632e [bezierTools] Remove division hack 2023-04-22 12:50:25 -06:00
Behdad Esfahbod
dc60198f78 [bezierTools] Micro-optimize cython 2023-04-22 12:49:22 -06:00
Behdad Esfahbod
14a767719b [bezierTools] Add link to algorithm
https://github.com/fonttools/fonttools/issues/3055
2023-03-21 13:30:30 -06:00
Cosimo Lupo
92fbac8a64
[arrayTools] add quantizeRect 2023-03-08 19:03:50 +00:00
Cosimo Lupo
0df4997661
prevent cython.compiled raise AttributeError if cython not properly installed
It's possible sometimes that 'import cython' does not fail but then 'cython.compiled' raises AttributeError.
It actually happened in our internal production environment...

Similar issue to https://github.com/pydantic/pydantic/pull/573 and https://github.com/ipython/ipython/issues/13294
2023-03-02 17:43:38 +00:00
Behdad Esfahbod
c1d1386e2c Add a few more cython annotations 2023-02-20 13:54:35 -07:00
Behdad Esfahbod
822f7a01da [bezier] Make splitCubicAtTC into a generator 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
c4e3322b20 [bezier] Add a few more complex versions of functions 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
fd46f25ffb [bezier] Add splitCubicIntoTwoAtTC 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
cce99f00f7 [bezier] Internal variable rename 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
86c67a17b2 [bezier] Add Cython annotations 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
39b6f7a752 [bezier] Speed up cubicPointAtT 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
8dde7fef90 [bezier] Add cubicPointAtTC 2023-02-18 09:46:56 -07:00
Behdad Esfahbod
7fdb6c23f1 [transform] Use math.copysign 2023-02-06 08:31:01 -07:00
Behdad Esfahbod
4355d006ad [transform] Improve DecomposedTransform
And add tests.

See thread starting at:
https://github.com/fonttools/fonttools/pull/2958#issuecomment-1416859441
2023-02-04 16:30:57 -07:00
Behdad Esfahbod
8e981a1b28 [transform] Change the DecomposedTransform skewX sign to match Transform
Unfortunate but for consistency's sake.

This deviates from VarComposite convention.

https://github.com/fonttools/fonttools/pull/2958#issuecomment-1416155600
2023-02-03 10:23:23 -07:00
Behdad Esfahbod
c0d100f7e8 [transform] Add DecomposedTransform.fromTransform() 2023-02-03 10:06:47 -07:00
Behdad Esfahbod
cf9dece8f2 [transform] Add Transform.toDecomposed() 2023-02-03 09:55:00 -07:00
Behdad Esfahbod
bdbc53b689 [transform] Document DecomposedTransform 2023-02-03 09:37:11 -07:00
Behdad Esfahbod
89aeff636c [transform] Fix mishap 2023-02-03 09:14:08 -07:00
Behdad Esfahbod
2e20e47473 [transform] Rename VarTransform to DecomposedTransform 2023-02-03 09:05:55 -07:00
Behdad Esfahbod
96f602cf3c [transform] Use dataclass for VarTransform 2023-02-03 09:03:19 -07:00
Behdad Esfahbod
69966aa5d7 [BasePen] Add addVarComponent() 2023-02-02 15:25:09 -07:00
Behdad Esfahbod
59418656a4 [VarComposite] Add VarTransform and use 2023-02-02 14:50:26 -07:00