19 Commits

Author SHA1 Message Date
Cosimo Lupo
1803283baf
colorLib: use IntEnum instead of 'magic' Paint format integers
makes code more readable
2020-10-26 18:14:13 +00:00
Cosimo Lupo
a2aaf41a7e
colorLib: rename builders to match current Paint format names 2020-10-09 19:36:35 +01:00
Cosimo Lupo
fdf6a5c1fc
colorLib: update builders to latest COLRv1 draft
LayerV1Record and Affine2x2 are gone.
LayerV1List now contains a list of Paint DAGs
Added 4 new Paint formats: PaintGlyph, PaintColorGlyph, PaintTransform
and PaintComposite
2020-10-09 19:36:35 +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
4578f96e9d
colorLib_test: minor cosmetic changes 2020-07-01 18:29:26 +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
971bcbff6f
colorLib: allow color stops to be built from list of dicts as well as tuples 2020-03-12 16:03:11 +00:00
Cosimo Lupo
5a8830ebc9
colorLib_test: add test for buildCORL with automatic or explicit 'version' 2020-03-11 19:01:25 +00:00
Cosimo Lupo
63e2be484e
colorLib: refactor _splitSolidAndGradientGlyphs and add test 2020-03-11 14:22:58 +00:00
Cosimo Lupo
5629d5d8d9
colorLib: allow to build Paint, ColorLine, Color from dict 2020-03-11 13:27:59 +00:00
Cosimo Lupo
0149f40588
colorLib_test: add tests for buildLayerV1Array, buildBaseGlyphV1Array 2020-03-10 15:34:53 +00:00
Cosimo Lupo
44d729ad3c
colorLib: in buildColorStop accept color tuple as parameter
and use Sequence instead of List for input params type hints
2020-03-10 11:49:04 +00:00
Cosimo Lupo
be3265f136
colorLib_test: add tests for build{Linear,Radial}GradientPaint 2020-03-10 11:49:04 +00:00
Cosimo Lupo
5eb11359ea
colorLib_test: add tests for more builder funcs 2020-03-09 16:58:13 +00:00
Cosimo Lupo
a0a4901a5e
colorLib_test: add tests for buildCPAL v1 2020-02-17 18:28:24 +00:00
Cosimo Lupo
acfae6721b
add tests for buildCORL and buildCPAL 2020-02-17 12:11:53 +00:00