615 Commits

Author SHA1 Message Date
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
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Parag Nemade
0a176acabc
Update branch name from master to main 2022-11-09 10:11:02 +05:30
Behdad Esfahbod
bcd637bd1a [ttGlyphSet-cff] Remove rounding 2022-08-27 12:20:15 -06:00
Behdad Esfahbod
a949380b4a [psCharStrings] Internal var rename 2022-08-26 21:23:04 -06:00
Behdad Esfahbod
a7cda37fbb [ttVarGlyphSet] Support CFF 2022-08-26 20:52:18 -06:00
Behdad Esfahbod
24c9fb6ffa [cliTools] Rename fragment to suffix 2022-08-22 06:26:30 -06:00
Behdad Esfahbod
e146ddfd86 [cliTools.makeOutputFileName] Add fragment argument
And use it from subsetter and instancer.

Related to https://github.com/fonttools/fonttools/issues/1156
2022-08-19 12:20:21 -06:00
Behdad Esfahbod
a9e2595e7d [visitor] Document 2022-08-17 14:50:32 -06:00
Behdad Esfahbod
8fdf4d160e [visitor_test] Add visitor tests 2022-08-16 12:28:26 -06:00
Behdad Esfahbod
09ea38bac6 [visitor] Add visitDict 2022-08-15 17:39:53 -06:00
Behdad Esfahbod
cb27c528cb [visitor] Add visitLeaf 2022-08-15 17:29:08 -06:00
Behdad Esfahbod
ef1a009bea [visitor] Fix up attrs visiting 2022-08-15 13:59:05 -06:00
Behdad Esfahbod
8213c58a38 [visitor] Don't recurse on private or TTFont attributes 2022-08-15 13:43:03 -06:00
Behdad Esfahbod
f582469cb8 [visitor] Split TTVisitor into its own module 2022-08-15 13:01:46 -06:00
Behdad Esfahbod
be7df107e2 [visitor_test] Implement glyf table visiting 2022-08-15 12:47:17 -06:00
Behdad Esfahbod
a0686e8d2e [visitor] Add register_attr(s) example 2022-08-15 12:37:38 -06:00