2222 Commits

Author SHA1 Message Date
Behdad Esfahbod
094a08a3bf [glyf] Remove fvar dependency again
Can't use it since Glyph.expand() API does not take font.
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
40adc5760a [glyf/VarComponent] More towards getCoordinates 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
24e368349f [glyf/VarComponent] Fix use of .location 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
48dafdb351 [glyf/VarComponent] Use .location 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
5d5569d77a [glyf/VarComponent] Fix fromXML 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
4dcbed503a [glyf] Black 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
f84d0845cd [glyf/VarComponent] Implement compile() 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
fb170aadfb [glyf/VarComponent] Implement fromXML 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
76802fbd92 [glyf/VarComponent] Scale rotation values 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
828a407846 [glyf/VarComponent] Add toXML 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
aba64ea402 [glyf] Remove copy/pasted unimplemented VarComponent code 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
86420d1150 [gvar] Decompile VarComposite glyph 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
483013be69 [glyf] Decompile VarComponent 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
de6eee7373 [glyf] Hook up VarComposite in a few places
Unimplemented functions.
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
0f3b7b5b99 [glyf] Add isVarComposite() 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
796cfe750a [glyf] Remove __getitem__
This used to iterate over components. Pretty weird choice.
2023-01-30 11:26:20 -07:00
Cosimo Lupo
d9f9acd5c2
copy OTTableReader before copying/pickling lazily loaded table
Fixes https://github.com/fonttools/fonttools/issues/2965
2023-01-26 16:52:13 +00:00
PoomSmart
795ddb8ccb Fixed linting 2023-01-23 09:22:38 +07:00
PoomSmart
eed57de422 Fixed indentation 2023-01-22 22:59:57 +07:00
Thatchapon Unprasert
9ad2b91f7d
Handle glyphs with dupe graphic type on compile correctly
Instead of appending glyph raw data with `imageData` for `graphicType=dupe` which will always be `NoneType`, append with the reference glyph ID.
2023-01-22 22:53:37 +07:00
Behdad Esfahbod
0715940830 [ttLib/__main__] Add --flavor 2023-01-19 11:19:17 -07:00
Behdad Esfahbod
f651809ac5 [glyf] endPointsOfContours is unsigned 2023-01-17 09:12:49 -07:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Behdad Esfahbod
6aca5be9b7 [gvar] Don't expand glyph for unused pointCount
Keep it in the API though.
2022-12-09 11:39:07 -07:00
Behdad Esfahbod
96de954d29 [gvar] Don't expand glyph during decompile if no variation data 2022-12-07 21:34:36 -07:00
Behdad Esfahbod
3a258573af [gvar] Avoid decompiling glyphs that don't have variations 2022-12-07 14:50:15 -07:00
Zachary Quinn Scheuren
0c43aeb511
Skip scaling of vsindex in scaleUpem.py 2022-11-17 21:40:32 +09:00
Cosimo Lupo
b4e664da21
[woff2] Add support for encoding/decoding OVERLAP_SIMPLE glyf flags in WOFF2
Fixes #2576

This updates our woff2 encoder/decoder to support retaining the OVERLAP_SIMPLE glyf flag following the updated WOFF 2.0 specification and official google/woff2 implementation.

https://www.w3.org/TR/WOFF2/#glyf_table_format
2022-11-09 13:56:46 +00:00
Behdad Esfahbod
155c32c2d0 [ttLib/main] Fix writing! 2022-11-01 11:18:56 -06:00
Behdad Esfahbod
d23804c916 [ttLib/main] Port to argparse instead of getopt 2022-11-01 11:18:56 -06:00
Behdad Esfahbod
366e16b36b [ttLib] Convert fonts <-> collection in main()
Fixes https://github.com/fonttools/fonttools/pull/2869
2022-11-01 11:18:56 -06:00
Behdad Esfahbod
a639516c4c [ttLib] Add main
Just opens font files from commandline.
2022-11-01 11:18:56 -06:00
Cosimo Lupo
6389385813
Merge branch 'main' into avar2 2022-10-28 16:38:33 -07:00
Behdad Esfahbod
027de814e2 [subset/SVG] Speed up
Subsetting NotoColorEmojiSvg for one glyph.

Before: 280ms
After: 80ms

Fixes https://github.com/fonttools/fonttools/issues/2360
2022-10-26 14:06:35 -06:00
Cosimo Lupo
40b2473a48
Merge pull request #2728 from fonttools/instancer-l4
[instancer] Towards L4 instancing
2022-10-21 16:39:09 +01:00
Behdad Esfahbod
3d2fa8a342 [glyf] Return component transform as part of control data
This makes sure that when we are building variable fonts, we
check that all masters have the same component transform in
composite glyphs.  We were not checking for this before.
2022-10-20 11:05:08 -06:00
Behdad Esfahbod
5ff9546531 [TupleVariation] Add __imul__ 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
f19283e692 [scaleUpem] Handle CFF hintmask 2022-10-04 12:40:14 -06:00
Behdad Esfahbod
6b7c2767d7 [scaleUpeam] Calculate numShorts in VarData after scale
Part of https://github.com/fonttools/fonttools/issues/2840
2022-10-04 12:34:53 -06:00
Just van Rossum
d0f4133df0 Fix arguments in calls to (glyf) glyph.draw() and glyph.drawPoints(); this fix also exposed a second bug, where lsb and tsb were not set; this fixes #2824 2022-09-20 09:00:35 +02:00
Miguel Sousa
1306a71db3
Merge pull request #2786 from fonttools/msousa-bad-post-format-1
Don't crash when `post` format 1 is improperly used
2022-08-31 08:52:49 -07:00
Miguel Sousa
96c9250cf8 Update warning message [skip ci] 2022-08-31 08:52:17 -07:00
Cosimo Lupo
36de9df3cc [gvar] be non lazy for TTFont.lazy=False, add ensureDecompiled
like cmap, or glyf or OTL tables, we need to respect lazy=False flag and decompile everything upfront, also we want to add an ensureDecompiled method (called by TTFont.ensureDecompiled) to allow loading everything in one go even when a font had been opened lazily.
2022-08-31 11:10:50 +01:00
Miguel Sousa
a2efac012c Add warning log 2022-08-30 23:56:03 -07:00
Miguel Sousa
0e9c48e6ab Don't crash when post format 1 is improperly used
Fixes #2736
2022-08-30 09:14:03 -07:00
Just van Rossum
8fa79f3c68 Use ABC baseclass, instead of ABCMeta metaclass 2022-08-30 12:02:43 +02:00
Just van Rossum
a4f3cb1c98 drawPoints can have an implementation that calls draw using SegmentToPointPen 2022-08-30 12:00:50 +02:00
Just van Rossum
7ae37322cd make _TTGlyph an abstract base class, with draw and drawPoints abstract methods 2022-08-30 11:47:39 +02:00
Just van Rossum
6ec0177f1f tweak getGlyphSet() doct string, using backticks, and fixing a typo 2022-08-30 08:49:36 +02:00
Just van Rossum
6d2a9904c4 Add TTFont.normalizeLocation() as a public method. 2022-08-30 08:49:36 +02:00