Behdad Esfahbod
3eef446efe
[ttFont] Address review comments
2021-08-23 16:06:18 -06:00
Behdad Esfahbod
ca06c9530c
[ttFont] Assume GlyphOrder is never modified after setting
...
See https://github.com/fonttools/fonttools/pull/2398#discussion_r694271551
2021-08-23 14:59:11 -06:00
Behdad Esfahbod
d5de11d805
[ttFont] Make setGlyphOrder() clear reverseGlyphOrderMap
...
Part of https://github.com/fonttools/fonttools/pull/2398
2021-08-23 14:01:26 -06:00
Behdad Esfahbod
e5bf2a7f1a
[ttFont] Apply review comments
2021-08-22 04:09:29 -06:00
Behdad Esfahbod
7a22c0fb07
[ttFont] Add getGlyphIDMany(); use in otLayout
...
Fixes https://github.com/fonttools/fonttools/issues/1536
Superced https://github.com/fonttools/fonttools/pull/1654
Part of https://github.com/fonttools/fonttools/pull/2398
2021-08-21 11:23:11 -06:00
Behdad Esfahbod
3ec769907b
[ttFont] Add getGlyphNameMany()
...
Part of fixing https://github.com/fonttools/fonttools/pull/1654
Related https://github.com/fonttools/fonttools/issues/2334
2021-08-20 16:17:48 -06:00
Behdad Esfahbod
322a7b2ead
[ttFont] Remove allowVID
...
Leave the parameter intact for back compat.
Part of https://github.com/fonttools/fonttools/pull/2398
Fixes https://github.com/fonttools/fonttools/issues/2334
2021-08-20 10:01:51 -06:00
Behdad Esfahbod
9988054f3c
[ttFont] Remove requireReal
...
To my knowledge this is not used by anyone.
See https://github.com/fonttools/fonttools/issues/2334#issuecomment-902789001
2021-08-20 09:59:47 -06:00
Behdad Esfahbod
d0d082e76e
[otTables] Allow virtual GIDs in Coverage/ClassDef reader
...
Fixes https://github.com/fonttools/fonttools/issues/2334#issuecomment-901885598
2021-08-20 09:59:46 -06:00
Khaled Hosny
232b2ccbc4
Move the rest of py23 module to textTools
...
Change all imports to use textTools module, except the test_py23.py test
which is kept until we decide to remove the module (if ever).
2021-08-20 01:29:45 +02:00
Cosimo Lupo
d025bb8ba7
fix NameError while decompiling ClipList
...
when range references a missing glyph ID, the loop must continue
2021-08-09 11:30:00 +02:00
Cosimo Lupo
9f7a4ea3e7
otTables: fix CompositeMode enum missing PLUS mode
...
Our enumeration of CompositeMode was missing one COMPOSITE_PLUS mode (12)...
see 'PaintComposite' paragraph in https://github.com/googlefonts/colr-gradients-spec/blob/main/OFF_AMD2_WD.md
2021-08-09 11:27:46 +02:00
Cosimo Lupo
e161bbc980
Merge pull request #2384 from fonttools/newline-2021
...
Default to "\n" for newlinestr instead of None
2021-08-03 09:21:10 +01:00
Cosimo Lupo
094a40ca2e
Revert "Deprecate and ignore newlinestr"
...
This reverts commit 5af178ac8eb2da79b965be5c6cee693dad602c65.
2021-08-03 10:00:13 +02:00
Cosimo Lupo
745a6a6ea2
Merge pull request #2379 from fonttools/colr-clip-list
...
[colrv1] otData: define ClipList, ClipBox, etc.
2021-08-03 08:49:37 +01:00
Cosimo Lupo
58ac5a9fd8
have ClipList and ClipBox format start at 1, not 0
...
b7e81fcbd6
2021-08-02 19:34:30 +02:00
Khaled Hosny
5af178ac8e
Deprecate and ignore newlinestr
2021-07-30 04:31:19 +02:00
Khaled Hosny
000bf81700
Default to "\n" for newlinestr instead of None
...
If newlinestr is None, os.linesep is used, bu it is the third millennium
and we don’t need or want different line endings per-platform.
2021-07-30 04:12:33 +02:00
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
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
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
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
a0bd872f0e
TupleVariation: make shared tuples order deterministic
...
most frequent first (like before https://github.com/fonttools/fonttools/pull/2351 ), only sort ties alphabetically
2021-07-02 12:52:54 +01:00
Garret Rieger
7f9e2c3808
sort shared tuples produced by Counter.most_common()
...
In python 3.7 and earlier most_common() sorts first by the item count and then arbitrarily in the event of ties. This can result in two identical instancing operations producing different binary results.
2021-06-30 17:00:59 -07:00
Cosimo Lupo
d0d59d2f2c
Add PaintScale* and Paint{Rotate,Skew}* variants
...
This updates fonttools to match the latest draft COLRv1 spec at https://github.com/googlefonts/colr-gradients-spec/pull/290
Summary of changes:
- Added 8 new PaintScale* tables: with/without centers, uniform vs non-uniform
- Added *AroundCenter variants to PaintRotate and PaintSkew (default versions no longer have centerX/Y defaulting to origin)
- PaintRotate, PaintSkew and PaintComposite formats re-numbered
2021-06-28 18:38:47 +01:00
Cosimo Lupo
1cb7e36bbd
COLRv1: rename otData structs to remove 'V1' to match updated draft spec
...
This is a breaking change (but the COLRv1 API was already marked as unstable and subject to change)
The changes in this PR are meant to match the changes from the COLRv1 draft spec at:
https://github.com/googlefonts/colr-gradients-spec/pull/302
2021-06-28 16:13:47 +01:00
Eric Muller
e2d9919524
Address pull request comments
2021-06-01 07:16:53 -07:00
Eric Muller
add77ca3f7
Report error is post table version 2.0 is too small
2021-05-26 11:27:39 -07:00
Eric Muller
bb5d59300c
Merge branch 'fonttools:main' into main
2021-05-25 09:46:42 -07:00
Behdad Esfahbod
7af43123d4
[otBase] Tiniest cleanup
2021-05-24 14:52:34 -06:00
Cosimo Lupo
d1e2e0e381
otTables: ignore Format attribute in split.*Subst overflow-fixing methods
...
Fixes https://github.com/fonttools/fonttools/issues/2319
2021-05-20 19:19:37 +01:00
Eric Muller
212bb30c26
Fix parsing of post tables version 2.0 ( #2314 )
2021-05-20 09:32:26 -07:00
Cosimo Lupo
616fc065e0
add deprecation warnings for old getPhantomPoints, etc.
2021-05-13 10:13:28 +01:00
Cosimo Lupo
3c98250dbd
g_l_y_f: fix undefined name 'topSideBearing'
...
Fixes #2295
2021-05-13 10:12:46 +01:00
Cosimo Lupo
6adbf188e6
Merge pull request #2288 from fonttools/remove-overlaps-print-glyph-error
...
removeOverlaps: work around pathops.simplify error
2021-05-12 17:06:57 +01:00
Just van Rossum
31ab3aae0b
Merge pull request #2285 from fonttools/varStore-32bit
...
Improve otBase facilities / towards 32bit VariationStore
2021-05-08 17:10:17 +02:00
Behdad Esfahbod
f21091b6ff
[otBase] Assert array.array('i').itemsize
2021-05-07 15:52:35 -06:00
Behdad Esfahbod
98e2bf5526
[varLib.builder] Document bit-tweedling
...
https://github.com/fonttools/fonttools/pull/2285#discussion_r628401241
2021-05-07 15:41:33 -06:00
Behdad Esfahbod
b8963256fd
[otBase/otConverters] Add back array index to exception in writeArray()
...
db6171df14 (r628543432)
2021-05-07 15:31:53 -06:00
Just van Rossum
d601951eab
[otTables] Default varIdx should be 0xFFFFFFFF ( #2298 )
...
* default value for varIdx should be 0xFFFFFFFF to indicate 'no variations'
* use lc hex notation as per feedback
2021-05-07 22:26:48 +02:00
Cosimo Lupo
b0e24384c2
minor refactorings following review comment
...
https://github.com/fonttools/fonttools/pull/2288#discussion_r627907922
2021-05-07 09:49:40 +01:00
Cosimo Lupo
d4d3d95414
split simplify logic to separate func for easier unit-testing
2021-05-06 20:23:56 +01:00