5728 Commits

Author SHA1 Message Date
Cosimo Lupo
22d290b06e
Merge remote-tracking branch 'origin/master' into colorLib-unbuilder 2021-02-04 12:09:30 +00:00
Cosimo Lupo
708cb9aef1
Merge pull request #2172 from fonttools/colr-sweep-gradient
COLRv1: add support for PaintSweepGradient
2021-02-04 11:47:34 +00:00
Cosimo Lupo
a3d13abcff
otData: fix typo, add comments 2021-02-04 11:32:22 +00:00
justvanrossum
f416a5cb17 fix Vector division 2021-02-03 20:24:04 +01:00
Cosimo Lupo
93c23eaaf7
COLRv1: define new PaintSweepGradient, amend tests with new format numbers 2021-02-03 18:21:09 +00:00
Cosimo Lupo
8f66a1e813
COLRv1: add functions to un-build COLR otTables to raw dicts
This adds an unbuildColrV1 which does the inverse of colorLib.builder.buildColrV1.
Takes a LayerV1List and BaseGlypV1List and returns a map of base glyphs to raw data structures (list, dict, float, str, etc.).
Useful not only for debugging purpose, but also for implementing COLRv1 subsetting (where we need to drop whole chunks of paints which may be reused by multiple glyphs).
2021-02-03 16:47:59 +00:00
Simon Cozens
56df97b5f2 Prohibit non-functional "sub A B by NULL" 2021-02-03 14:16:57 +00:00
Simon Cozens
d1e85cb888 Allow 'sub X by NULL;' sequence to delete a glyph 2021-02-03 14:12:46 +00:00
Cosimo Lupo
728258d66f
Merge pull request #2166 from fonttools/fb-colr-glyphMap
fontBuilder: pass glyphMap to buildCOLR to sort base records by GID
2021-02-01 12:52:24 +00:00
Cosimo Lupo
8343468689
fontBuilder: pass through version and varStore parameter to buildCOLR 2021-02-01 11:59:24 +00:00
Cosimo Lupo
85c450b565
fontBuilder: pass glyphMap to buildCOLR to sort base records by GID
COLR Base glyph records must be sorted by glyph index. The buildCOLR
function has an optional glyphMap parameter that maps from glyph names
to glyph indices (as returned from TTFont.getReversedGlyphMap()).
FontBuilder knows all that so it should pass it on to colorLib.
2021-02-01 11:51:39 +00:00
Nikolaus Waxweiler
a3acb1426b Remove py23 import 2021-01-29 22:23:27 +00:00
Nikolaus Waxweiler
8612319487 Bump version: 4.19.1 → 4.19.2.dev0 2021-01-28 17:06:32 +00:00
Nikolaus Waxweiler
b0278cf846 Release 4.19.1 2021-01-28 17:06:32 +00:00
Nikolaus Waxweiler
52e3e03ed9 An off-curve should stay off even with flags 2021-01-28 16:30:23 +00:00
Cosimo Lupo
822d3bf261
plistlib: remove unused 'type: ignore' comment to appease mypy 2021-01-25 17:42:19 +00:00
Cosimo Lupo
d47250dd15
Bump version: 4.19.0 → 4.19.1.dev0 2021-01-25 17:36:42 +00:00
Cosimo Lupo
f8283bda7e
Release 4.19.0 2021-01-25 17:36:42 +00:00
Cosimo Lupo
7db6b8aae5
Merge pull request #2155 from daltonmaag/add-verbose-error-for-classdefbuilder-add
Raise an exception when ClassDefBuilder attempts to add a duplicate glyph.
2021-01-25 17:19:21 +00:00
Tom Archer
be898ec6f9 Change ValueError to OpenTypeLibError 2021-01-20 14:30:49 +00:00
Cosimo Lupo
81fa5b5265
Merge pull request #2137 from fonttools/x-mac-encodings-errors
codecs: handle errors different from 'strict' for extended mac encodings
2021-01-20 11:21:43 +00:00
Cosimo Lupo
c9c30fa51d
Merge pull request #2153 from fonttools/paint-colr-layer-tree
COLRv1: support unlimited paints as 255-ary tree of PaintColrLayers
2021-01-20 11:20:26 +00:00
Tom Archer
9712407054 Change TypeError to ValueError 2021-01-20 11:19:43 +00:00
Tom Archer
7c6337facf Add exception and test 2021-01-19 17:57:53 +00:00
Nikolaus Waxweiler
6023bab627 Raise legible error message when script is missing a dflt langsys 2021-01-19 16:42:40 +00:00
Cosimo Lupo
9d33afe04d
COLRv1: support unlimited paints as 255-ary tree of PaintColrLayers
Fixes https://github.com/googlefonts/nanoemoji/pull/225

E.g. BASKET noto-emoji U+1F9FA contains 364 layers
2021-01-18 17:33:21 +00:00
Cosimo Lupo
a8d366e3b2
Merge pull request #2148 from fonttools/colr-fix-c0-almost-inside-c1
COLRv1: avoid abrupt change after rounding c0 when too near c1's perimeter
2021-01-18 09:59:39 +00:00
Cosimo Lupo
a3247ea472
compute rounding (dx,dy) offset outside loop then simply do Circle.move() inside 2021-01-18 09:50:47 +00:00
Cosimo Lupo
c13b1cef84
determine direction to nudge pre-loop 2021-01-15 19:11:10 +00:00
Cosimo Lupo
c9055871d6
minor: rename local vars without _circle suffix 2021-01-15 18:17:08 +00:00
Cosimo Lupo
b465dcff75
rename function to round_start_circle_stable_containment
as suggested in https://github.com/fonttools/fonttools/pull/2148#discussion_r557656073
2021-01-15 17:37:11 +00:00
Cosimo Lupo
4f1102ac6e
add a Circle class, handle concentrical case, explain why 2 iterations are enough 2021-01-15 16:59:17 +00:00
Cosimo Lupo
4f886cc226
reword _is_circle_inside_circle parameters for better readability 2021-01-14 19:06:33 +00:00
Cosimo Lupo
c403dbe83a
minor: rename function, remove redundant one 2021-01-14 18:57:19 +00:00
Cosimo Lupo
7f0788ca25
use math.hypot() as per review
https://github.com/fonttools/fonttools/pull/2148#discussion_r557596711
2021-01-14 18:22:57 +00:00
Cosimo Lupo
db14e6375e
COLRv1: avoid abrupt change after rounding c0 when too near c1's perimeter
Fixes https://github.com/googlefonts/picosvg/issues/158

Also see https://github.com/googlefonts/colr-gradients-spec/issues/204
2021-01-14 17:13:22 +00:00
Nikolaus Waxweiler
9c0bc9e554
Merge pull request #2146 from fonttools/prune-cmap-format12
Subsetting: prune redundant format 12 cmaps
2021-01-13 17:20:06 +00:00
Nikolaus Waxweiler
06913cc715 Implement format 12 cmap pruning 2021-01-13 16:30:46 +00:00
Nikolaus Waxweiler
e0de5a8413 Add MissingComponentError for pens 2021-01-12 15:26:57 +00:00
Cosimo Lupo
d8c42ef7f0
codecs: handle errors different from 'strict' for extended mac encodings
Fixes #2132
2020-12-24 20:37:52 +01:00
Cosimo Lupo
70958dca86
Bump version: 4.18.2 → 4.18.3.dev0 2020-12-16 12:16:50 +00:00
Cosimo Lupo
dd29f83fa5
Release 4.18.2 2020-12-16 12:16:49 +00:00
Cosimo Lupo
8f405dee52
Merge pull request #2125 from silnrsi/bugfix1
Bugfix1
2020-12-16 12:15:00 +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
Cosimo Lupo
1f33249d36
varLib.cff: fix unbound local variable
Fixes https://github.com/fonttools/fonttools/issues/1787

Thanks Behdad.
2020-12-14 18:21:04 +00:00
Cosimo Lupo
5508374bb5
Bump version: 4.18.1 → 4.18.2.dev0 2020-12-09 11:30:29 +00:00
Cosimo Lupo
f60f537074
Release 4.18.1 2020-12-09 11:30:28 +00:00
Cosimo Lupo
f24a640b65
minor 2020-12-08 10:01:37 +00:00
rsheeter
17395b0769
id() invalid if things disappear 2020-12-08 10:00:47 +00:00
Cosimo Lupo
bd8861f10d
sort __dict__.items() when freezing paint tuples 2020-12-08 10:00:46 +00:00