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
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
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
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Zachary Scheuren
0434b1a917
Add feaLib support for STAT table
2021-02-25 17:16:01 +00:00
rsheeter
404072ee99
Fix descriptions in Lib/fontTools/ttLib/tables/otData.py
...
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2021-02-15 10:42:59 +00:00
rsheeter
f1ecccbbb8
Begin updating for static vs variable versions of COLR v1 Paint
2021-02-15 10:42:55 +00:00
rsheeter
cf4a4087be
Generic build fns
2021-02-10 09:40:37 -08:00
Cosimo Lupo
a3d13abcff
otData: fix typo, add comments
2021-02-04 11:32:22 +00:00
Cosimo Lupo
93c23eaaf7
COLRv1: define new PaintSweepGradient, amend tests with new format numbers
2021-02-03 18:21:09 +00:00
Cosimo Lupo
538528d5a1
COLRv1: Implement PaintTranslate
...
https://github.com/googlefonts/colr-gradients-spec/pull/163
2020-12-15 16:58:31 +00:00
rsheeter
d888526659
Hook up paint skew and rotate
2020-12-02 21:21:19 -08:00
rsheeter
4171e28f32
Update ttLib/tables to latest spec
2020-11-10 21:51:04 -08:00
rsheeter
f531038bf9
Start hooking up revised PaintColrLayers
2020-11-04 14:36:43 -08:00
Cosimo Lupo
581416d77c
WIP: add buildPaintColrLayers
2020-11-03 19:11:24 +00:00
Cosimo Lupo
e992953474
swap xy and yx fields in COLRv1 Affine2x3 struct
...
following the latest draft
See discussion at https://github.com/googlefonts/colr-gradients-spec/pull/85
2020-10-30 19:29:59 +00:00
Cosimo Lupo
b654554109
add {First,Last}LayerIndex to PaintColorGlyph
...
as proposed in https://github.com/googlefonts/colr-gradients-spec/issues/86
The name of PaintColorGlyph may still change to PaintColorSlice, or PaintColrSlice, or PaintColorGlyphSlice, etc."
https://github.com/googlefonts/colr-gradients-spec/pull/87
2020-10-27 12:47:10 +00:00
Cosimo Lupo
73073be3c2
Affine2x3 struct should be inlined inside PaintTransform
...
Not pointed to by an Offset32.
Thanks Dominik for spotting this!
2020-10-12 14:32:23 +01:00
Cosimo Lupo
7f6a05b007
otData: add new COLR Paint struct definitions, update to latest draft
...
Update C_O_L_R_test.py accordingly.
a
2020-10-09 19:36:35 +01:00
Cosimo Lupo
09c0e42031
Partly revert "use 32-bit GlyphIDs in COLRv1 baseGlyphs and layers"
...
This reverts commit 690080b14d9a4f193092ffc172a39b3e212d307c.
We keep 16-bit GlyphIDs for COLRv1 tables, at least for now
https://github.com/googlefonts/colr-gradients-spec/pull/24
I keep the GlyphID32 converter in case we may need it in the future.
2020-07-08 16:06:45 +01:00
Cosimo Lupo
ff79338607
rename radial gradient Paint.Affine attribute to Transform
...
as suggested by Peter Constable in
https://github.com/PeterConstable/OT_Drafts/blob/master/COLR_V1/COLRv1formats_rev3.md#paintformat3-table-conicalradial-gradient
2020-07-02 12:21:12 +01:00
Cosimo Lupo
ac0a755d20
make linear/radial gradient 'point-less', inline x0,y0,x1,y1,...
...
https://github.com/googlefonts/colr-gradients-spec/issues/21
2020-07-02 12:11:40 +01:00
Cosimo Lupo
dea9896421
rename COLR Color -> ColorIndex, transparency to alpha
...
https://github.com/googlefonts/colr-gradients-spec/issues/17
https://github.com/googlefonts/colr-gradients-spec/issues/19
2020-07-02 10:27:47 +01:00
Cosimo Lupo
ff7dc9a1c5
Rename: Var* types: Scalar->Fixed, NormalizedScalar->F2Dot14, etc.
...
VariablePosition -> VarInt16
VariableDistance -> VarUInt16
cf. https://github.com/googlefonts/colr-gradients-spec/issues/17
2020-07-01 20:13:14 +01:00
Cosimo Lupo
690080b14d
use 32-bit GlyphIDs in COLRv1 baseGlyphs and layers
...
For forward-compatibility, see https://github.com/googlefonts/colr-gradients-spec/issues/8
2020-07-01 19:50:48 +01:00
Cosimo Lupo
b215c000df
Rename LayerV1Array to LayerV1List, like with BaseGlyphV1List
...
See https://github.com/googlefonts/colr-gradients-spec/issues/14#issuecomment-652542829
2020-07-01 18:22:03 +01:00
Cosimo Lupo
5f18d9891c
rename BaseGlyphV1Array to BaseGlyphV1List
...
As suggested by Peter Constable in https://github.com/googlefonts/colr-gradients-spec/issues/14 and https://github.com/googlefonts/colr-gradients-spec/issues/18
2020-07-01 18:16:07 +01:00
Cosimo Lupo
d2bbfdb610
Merge remote-tracking branch 'origin/master' into otdata-colr
2020-03-12 17:42:56 +00:00
Cosimo Lupo
49d504d970
otData: fix Offset decriptions for COLRv1 subtables
2020-03-11 19:01:26 +00:00
Simon Cozens
ab075a9957
Annotate LookupFlag ttx dump
2020-03-10 21:42:28 +00:00
Cosimo Lupo
c42c4162c2
add otConverter for namedtuples and use it for Variable{Scalar,Position,Distance}
...
in COLRv1 all scalar values have associated varIdx to support variations. I want to load them as
immutable namedtuples, and also I want to dump them as simple XML tags with 'value' and 'varIdx'
attributes, instead of normal otTables (i.e. with nested Value and VarIdx sub-elements) as
that would make them too verbose in the XML dump.
So I made a custom _NamedTupleConverter, as a base class for VariableScalar, etc.; sub-classes
must provide a tupleClass and a list of converterClasses for each namedtuple field.
The ExtendMode enum has also a custom converter to dump it as string in the XML, and load it
as IntEnum.
fixup
2020-03-06 18:35:32 +00:00
Cosimo Lupo
d2026bd651
WIP: otData: define draft COLRv1 structures
...
https://docs.google.com/document/d/1EPndWsdMK_M135FOIxQZ--dHpH727rXEBvLZqgIzZvs/edit#
2020-02-11 16:33:38 +00:00
Cosimo Lupo
73b715732a
otData: define COLRv0 structures
2020-02-04 17:00:20 +00:00
Behdad Esfahbod
9df78f303b
[otData] Support BASE table version 1.1
2019-10-31 11:45:49 -07:00
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
Sascha Brawer
4a1871ff62
[morx] Support AAT action type to insert glyphs
2018-09-24 18:14:01 +02:00
Paul Linnerud
df429df9ec
TSIC Support for Visual TrueType
...
TSIC is a source table for Visual TrueType to maintain sources for the cvar variation table.
2018-08-22 16:48:42 -07:00
Behdad Esfahbod
54fd71f73c
[varLib/subset] Fix subsetting of GPOS variation data
...
Was not picking up ValueRecord Device objects. Ouch!
2018-02-27 18:52:07 -08:00
Behdad Esfahbod
67814fd3b3
[subset] Prune GDEF VarStore
...
Mostly fixes https://github.com/fonttools/fonttools/issues/1179
2018-02-18 19:20:00 -08:00
Sascha Brawer
a7ddb0b609
[AAT] Decode morx
tables with ligature substitutions
...
Only handling those parts that are shared with other substitution types.
The actualy ligature actions are not implemented yet.
2017-10-25 15:35:56 +02:00
Cosimo Lupo
28bb992c1f
replace int(round(...)) with round(...)
...
We don't need to cast to int when using the round function from py23,
as this is a backport of python3's built-in round and thus it returns
an int when called with a single argument.
2017-10-22 12:03:52 +01:00
Martin Hosken
0aab423993
Tidy up PR
2017-09-19 15:45:44 +02:00
Martin Hosken
eb9eebf972
Use glyph names not glyph ids
2017-09-19 15:45:44 +02:00
Martin Hosken
860a8e0522
Handle all Graphite tables now
2017-09-19 15:45:44 +02:00
Sascha Brawer
db0d193db6
[AAT] Support cidg
table with CID-to-glyph mapping
2017-09-06 12:52:22 +02:00
Sascha Brawer
0f05f824d2
[AAT] Support gcid
table with glyph-to-CID mapping
2017-09-06 01:40:49 +02:00
Sascha Brawer
ee1662e57e
[AAT] Support morx
tables with contextual substitution
2017-09-05 23:01:21 +02:00
Sascha Brawer
31b02d0bed
[AAT] Support morx
tables with Rearrangement subtables
2017-09-04 21:26:53 +02:00