602 Commits

Author SHA1 Message Date
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
Behdad Esfahbod
9b0d0e7b56 [visitor] ensureDecompiled(recurse=False) 2022-08-15 12:09:26 -06:00
Behdad Esfahbod
de091983d5 [visitor] Handle enums 2022-08-15 12:05:52 -06:00
Behdad Esfahbod
5eb63212ad [visitor] Convert tabs to spaces and run black 2022-08-15 12:04:36 -06:00
Behdad Esfahbod
ec7057a56e [visitor] Add visitor for TTFont 2022-08-14 14:43:11 -06:00
Behdad Esfahbod
8fe672c6a2 Add misc.visitor.py
Fixes https://github.com/fonttools/fonttools/issues/1959
2022-07-31 12:27:09 -06:00
Behdad Esfahbod
97df4a130c [symfont/momentsPen] Cythonize greenPen / momentsPen
Makes varLib.interpolatable 3x faster.
2022-07-28 15:35:51 -06:00
Behdad Esfahbod
22fd6f3eeb [momentsPen] Remove manual editions
Move OpenContourError to basePen.
2022-07-28 14:01:31 -06:00
Cosimo Lupo
a3f402e036 move build_n_ary_tree to misc/treeTools.py module
so I can import from varLib.merger as well
2022-07-04 23:08:14 +01:00
Cosimo Lupo
af6804bed5 make USE_HARFBUZZ_REPACKER a 3-state option, defaults to auto
if explicitly enabled, it will raise ImportError if uharfbuzz is not found, and will propagate the uharfbuzz error instead of silently falling back to the pure-python serializer
2022-04-21 18:11:20 +01:00
Cosimo Lupo
7588062413 [configTools] remove cached set and simplify checking option id 2022-04-21 17:18:32 +01:00
Cosimo Lupo
e9bec87d1a [configTools] Make Option eq=False so cmp/hash by id 2022-04-21 16:21:53 +01:00
Cosimo Lupo
ade9ce1173 [testTools] FakeFont needs a cfg attribute too 2022-04-21 15:56:11 +01:00
Cosimo Lupo
e5d674ea5e [configTools] accept either str or Option in Config mapping API 2022-04-21 15:46:12 +01:00