Cosimo Lupo
971043374e
instancer: add --ignore-overlap-errors option
...
This is to be able to ignore tricky glyphs that sometimes trip up Skia PathOps.Simplify operation.
We have no idea how to fix this upstream (short of having the glyphs redrawn), and perfect is the enemy of good..
2021-07-29 16:59:04 +02:00
Cosimo Lupo
800bf85b2f
add ClipList.Format so we can bump when we finally get >16bit GIDs
...
https://github.com/googlefonts/colr-gradients-spec/issues/346
2021-07-29 15:35:08 +02:00
Cosimo Lupo
9876f3c5c0
address review comments
2021-07-29 15:06:16 +02:00
Cosimo Lupo
bee2c85f61
[colrv1] otData: define ClipList, ClipBox, etc.
2021-07-28 18:04:48 +02:00
Cosimo Lupo
c552a77fea
Bump version: 4.25.2 → 4.25.3.dev0
2021-07-26 18:37:20 +01:00
Cosimo Lupo
f3a903093a
Release 4.25.2
2021-07-26 18:37:19 +01:00
Cosimo Lupo
1c1001245c
Update changelog [skip ci]
2021-07-26 18:35:20 +01:00
Cosimo Lupo
2f1fbd6374
Merge pull request #2372 from fonttools/colrv1-var-idx-map
...
[COLRv1] add DeltaSetIndexMap, remove ColorIndex
2021-07-26 12:06:15 +01:00
Just van Rossum
b01ea60e9e
[ttLib] when importing XML, only set sfntVersion if the font has no reader and is empty ( #2376 )
...
* Only set sfntVersion if the font has no reader and is empty
* test that sfntVersion is only set if the TTFont instance is new/empty
2021-07-24 11:12:37 +02:00
Cosimo Lupo
c96c3ef8fa
Merge pull request #2359 from fonttools/colrv1-transform-reduced-prec
...
[COLRv1] reduced precision transforms, angles as F2Dot14, centers as FWORD, offsetted Affine2x3
2021-07-23 17:36:41 +01:00
Cosimo Lupo
b74ffb4cda
test roundtripping variable COLRv1 with a working VarIndexMap and VarStore
2021-07-23 17:27:57 +01:00
Cosimo Lupo
29a2ebf813
omit default VarIndexBase
...
4294967295 (0xFFFFFFFF in decimal form) is not very memorable.
Still, using hex notation for all VarIndexBases would make the non-default values less readable (when interpreted as an index into the DeltaSetIndexMap array, decimal makes more sense).
Since 0xFFFFFFFF means 'no variation data', it makes sense to omit it from the ttx dump and write an empty <VarIndexBase/> element with no value.
We also allow to build Var tables without needing to pass "VarIndexBase": 0xFFFFFFFF in the source dict.
2021-07-23 17:27:57 +01:00
Cosimo Lupo
11871673ff
[subset] fixed CPAL pruning after removal of ColorIndex
2021-07-23 17:27:57 +01:00
Cosimo Lupo
6ba0163614
fix C_O_L_R_test.py following recent changes
2021-07-23 17:27:57 +01:00
Cosimo Lupo
e5d0c00fab
fix colorLib tests after adding VarIndexBase, ColorIndex removed, etc.
2021-07-23 17:27:57 +01:00
Cosimo Lupo
e8e2aa530b
remove unused Variable{Float,Int} namedtuples from otTables/otConverters
2021-07-23 17:27:57 +01:00
Cosimo Lupo
0eb27e9878
Remove and inline {Var,}ColorIndex
2021-07-23 17:27:57 +01:00
Cosimo Lupo
40897a1508
Define DeltaSetIndexMap table used for COLR.VarIndexMap
...
https://github.com/googlefonts/colr-gradients-spec/pull/316
2021-07-23 17:27:57 +01:00
Cosimo Lupo
60f0724144
remove wrapping around from Angle converter, let the struct.error propagate
2021-07-19 17:52:00 +01:00
Cosimo Lupo
12d66ded12
Bump version: 4.25.1 → 4.25.2.dev0
2021-07-16 16:04:30 +01:00
Cosimo Lupo
8eea964661
Release 4.25.1
2021-07-16 16:04:30 +01:00
Cosimo Lupo
c467bd2f35
Update changelog [skip ci]
2021-07-16 16:04:06 +01:00
Cosimo Lupo
bd2705a412
Merge pull request #2366 from fonttools/fix-tt-point-pen-move
...
[TTGlyphPen] Fix NotImplementedError with open contours
2021-07-15 18:39:07 +01:00
Cosimo Lupo
934349a9c5
ttGlyphPen: handle open contours starting with 'move'; treat them as if they were closed
...
Fixes #2365
2021-07-15 18:25:19 +01:00
Cosimo Lupo
0dc2a2a13f
ttGlyphPen: test that open contours work with TTGlyphPen
...
currently this fails with NotImplementedError. Fix will follow in subsequent commit
2021-07-15 18:19:46 +01:00
Rod S
7225ac22a6
Update to reflect COLR v1 FWORD center and offset to transform
2021-07-06 17:47:56 +01:00
Cosimo Lupo
0e99474985
otData: reduce precision of specialized transforms, use F2Dot14 for all angles
...
https://github.com/googlefonts/colr-gradients-spec/pull/307 & https://github.com/googlefonts/colr-gradients-spec/pull/310
2021-07-06 17:47:56 +01:00
Cosimo Lupo
bb4c3e27c3
otConverters: define Angle and VarAngle, fractions of half circle encoded as F2Dot14
...
to be used with PaintRotate, etc.
2021-07-06 17:47:56 +01:00
Cosimo Lupo
f05691246a
{fixed,round}Tools: factor out nearestMultipleShortestRepr
...
extract the code from fixedToStr into its own function (defined in roundTools), to be used for serializing fractional F2Dot14 angles for COLRv1 PaintRotate etc.
2021-07-06 17:35:03 +01:00
Cosimo Lupo
aae11e45c2
Bump version: 4.25.0 → 4.25.1.dev0
2021-07-05 18:10:22 +01:00
Cosimo Lupo
696b7ac448
Release 4.25.0
2021-07-05 18:10:21 +01:00
Cosimo Lupo
4602a9e7ed
Merge pull request #2326 from daltonmaag/compact-gpos
...
Add GPOS compaction code in varLib.merger and otlLib.builder + new `fonttools otlLib.optimize` command
2021-07-05 18:09:23 +01:00
Jany Belluz
731845c1b8
Update NEWS.rst
2021-07-05 17:34:12 +01:00
Jany Belluz
2ff3159a5f
Mark the environment variable as experimental
2021-07-05 17:28:44 +01:00
Jany Belluz
527179619b
Refactor the Cluster class to be top-level instead of nested the function
2021-07-05 17:28:44 +01:00
Jany Belluz
016aa4cccc
Add docstring to snippet
2021-07-05 17:28:44 +01:00
Jany Belluz
d1c46f9d10
Clarify comment with the plan vs the actual implementation
2021-07-05 17:28:44 +01:00
Jany Belluz
7860dd5fe8
Add tests that optimize block matrices
2021-07-05 17:28:44 +01:00
Jany Belluz
ef67839fdb
Fix typing error
2021-07-05 17:28:44 +01:00
Jany Belluz
3b34b228dd
Fix fonttools otlLib.optimize command line
2021-07-05 17:28:43 +01:00
Jany Belluz
604513a38f
Fix a few comments
2021-07-05 17:28:43 +01:00
Jany Belluz
bba5e8b213
Add optional compaction of GPOS PairPos subtables in otlLib.optimize.gpos
...
See pull request: https://github.com/fonttools/fonttools/pull/2326
The new module `otlLib.optimize.gpos` provides `compact` functions that
can reduce the file size of GPOS PairPos lookups by splitting subtables
in a smart way to avoid storing zero-valued pairs.
The compaction methods are called from `otlLib.builder` and
`varLib.merger` so that static and variable fonts can benefit from the
optimization at compile time.
The new module `otlLib.optimize` is also executable, to allow running
the optimization on existing fonts.
The optimization is a trade-off because on the one hand it can reduce
significantly the byte size of the GPOS table (up to 50% in random
Google Fonts) but on the other hand it adds to the compilation time and
may make fonts very slightly bigger once compressed to WOFF2 (because
WOFF2 doesn't mind about zero values and compresses them very well).
As such, the optimization is off by default, and you can activate it by
providing the environment variable `FONTTOOLS_GPOS_COMPACT_MODE=5` for
example (values from 0 = off to 9 = max file size savings, but many more
subtables).
2021-07-05 17:28:43 +01:00
Cosimo Lupo
19fe936beb
Update changelog [skip ci]
2021-07-05 16:00:31 +01:00
Khaled Hosny
47b45c0db7
Merge pull request #2355 from fonttools/tfmLib-docs
...
[Doc] Add tfmLib
2021-07-05 16:24:51 +02:00
Khaled Hosny
83ed0b4feb
[Doc] Add tfmLib
2021-07-05 16:09:15 +02:00
Khaled Hosny
8d3852385e
Merge pull request #2354 from fonttools/tfmLib
...
[tfmLib] New library for reading TFM files
2021-07-05 16:03:41 +02:00
Khaled Hosny
a7ac2de5cd
[tfmLib] New library for reading TFM files
...
New library for reading TeX Font Metrics files. Does not support writing
them back.
Fixes https://github.com/fonttools/fonttools/issues/2352
2021-07-05 03:24:25 +02:00
Khaled Hosny
383e70fc39
[sstruct] Accept pad byte format character
...
The list of format characters that sstruct accepts was missing “x” for
ignored pad bytes.
2021-07-05 01:33:16 +02:00
Khaled Hosny
bdd462f066
[sstruct] Accept bool format character
...
The list of format characters that sstruct accepts was missing “x” for
ignored pad booleans.
2021-07-03 13:50:08 +02:00
Khaled Hosny
617aee7f03
[sstruct] Minor
...
To reduce the noise in the next commits.
2021-07-03 13:49:53 +02:00