8373 Commits

Author SHA1 Message Date
Cosimo Lupo
3e8114e70d
Update changelog [skip ci] 2020-09-30 16:16:34 +01:00
Cosimo Lupo
bec25751c9
Merge pull request #2068 from fonttools/remove-overlaps-snippet
add module to remove overlaps from TTF with skia-pathops
2020-09-30 16:01:26 +01:00
Cosimo Lupo
fdab35063d
README.rst: mention 'pathops' among extras
pip install fonttools[pathops]
2020-09-30 13:55:30 +01:00
Cosimo Lupo
7f9462dfa6
compare paths independently of contour order
the order of contours modified by Skia is not stable and may change. So when we compare the original and the modified paths, we compare the paths as unordered sets of contours.

The order of contours doesn't produce any visible difference, but we try to keep the changes to the minimum here to avoid unnecessary diffs
2020-09-30 13:40:01 +01:00
Cosimo Lupo
66a0d91bf9
remove hinting from all glyphs, whether overlaps are removed or not 2020-09-30 13:36:28 +01:00
Cosimo Lupo
e94098606b
log modified glyps 2020-09-30 13:35:05 +01:00
Cosimo Lupo
1329c8f7db
instancer_test: add tests for --remove-overlaps on generated VF instance 2020-09-29 19:38:17 +01:00
Cosimo Lupo
d9d216f8f8
minor: rename OverlapsMode enum -> OverlapMode 2020-09-29 19:33:26 +01:00
Cosimo Lupo
7b9da7602c
skip empty paths with no contours
https://github.com/fonttools/fonttools/pull/2068#pullrequestreview-498472660
2020-09-29 16:24:17 +01:00
Cosimo Lupo
e1ad83add7
minor edit to comment [skip ci] 2020-09-29 14:44:51 +01:00
Cosimo Lupo
5abab6b329
Update skia-pathops to v0.5.0
https://github.com/fonttools/skia-pathops/releases/tag/v0.5.0
2020-09-29 14:32:35 +01:00
Cosimo Lupo
da439c7c57
decompose composites only if components intersect; let pathops.PathPen decompose components
requires https://github.com/fonttools/skia-pathops/pull/32
2020-09-29 14:14:55 +01:00
Cosimo Lupo
d4fd5d6eb1
requirements.txt: don't install skia-pathops on pypy
we don't have pre-compiled wheels for pypy. The tests will be skipped
2020-09-29 10:04:25 +01:00
Cosimo Lupo
933e394105
tox.ini: add download=true to install latest pip inside tox virtualenv 2020-09-28 19:55:12 +01:00
Cosimo Lupo
b73fa096a8
[travis] need latest pip to install skia-pathops for manylinux2014 tag 2020-09-28 19:34:59 +01:00
Cosimo Lupo
85947cabb3
varLib.instancer: make 'overlap' an enum; add --remove-overlaps CLI option
'overlap' parameter in instantiateVariableFont was a bool, now it is a tri-state IntEnum, with value 2 meaning 'remove the overlaps'. The old bool False/True (0/1) values continue to work like before.

Also added a new --remove-overlaps commandline option to fonttools varLib.instancer script.
2020-09-27 17:48:52 +01:00
Cosimo Lupo
7531b71717
require skia-pathops >= 0.4.2
with the new 'clockwise' option
2020-09-27 17:41:27 +01:00
Cosimo Lupo
015d8265d2
use pathops.simplify() and remember if original path direction
pathops.simplify() returns a copy so we don't need to make a copy ourselves.

'clockwise' option is defined in https://github.com/fonttools/skia-pathops/pull/31
2020-09-27 17:31:30 +01:00
Cosimo Lupo
0ceb146196
process simple glyphs before composites
to avoid decomposing only because a component's base glyph contains overlaps.
2020-09-27 17:29:25 +01:00
Cosimo Lupo
1c5417d1be
add 'pathops' to extras_require 2020-09-23 19:24:09 +01:00
Cosimo Lupo
2bcc103c36
move it to ttLib.removeOverlaps module 2020-09-23 19:13:58 +01:00
Cosimo Lupo
8bbc3d509b
factor out remove_overlaps routine, add typing annotations 2020-09-23 17:51:05 +01:00
Cosimo Lupo
19f5915f2e
ensure hmtx.lsb == glyph.xMin so that origin is at x=0 for new glyph 2020-09-23 16:04:56 +01:00
Cosimo Lupo
54ed840b15
Add snippet to remove overlaps on TTF with skia-pathops 2020-09-23 14:22:37 +01:00
Cosimo Lupo
0b413be45a
Bump version: 4.15.0 → 4.15.1.dev0 2020-09-21 17:41:50 +01:00
Cosimo Lupo
b7609ddefc
Release 4.15.0 2020-09-21 17:41:49 +01:00
Cosimo Lupo
fde57e23ec
Updated changelog [skip ci] 2020-09-21 17:41:20 +01:00
Cosimo Lupo
b913fac4ac
Merge pull request #2061 from fonttools/plistlib-typing
Add typing info to plistlib
2020-09-21 17:24:25 +01:00
Nikolaus Waxweiler
0742a9bff3 Implement suggestions 2020-09-21 17:01:22 +01:00
Nikolaus Waxweiler
a1df979335
Update Lib/fontTools/misc/plistlib/__init__.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2020-09-21 16:53:55 +01:00
Nikolaus Waxweiler
4efc06e62f
Update Lib/fontTools/misc/plistlib/__init__.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2020-09-21 16:53:46 +01:00
Simon Cozens
a18b6bfb6c
Merge pull request #2052 from simoncozens/fealib-debug
feaLib source debugging
2020-09-17 20:13:23 +01:00
Khaled Hosny
2baca39bbf
Merge pull request #2058 from alerque/disable-checksum-checking
Disable checksum checking by default
2020-09-17 02:20:54 +02:00
Nikolaus Waxweiler
2906ac2908 One less type-ignore 2020-09-16 20:28:33 +01:00
Nikolaus Waxweiler
09a64418f0 Misplaced ignore 2020-09-16 20:08:45 +01:00
Nikolaus Waxweiler
a501c0cbe7 More typing and ignores 2020-09-16 19:59:50 +01:00
Nikolaus Waxweiler
10864be26f Fix one typing warning 2020-09-16 17:42:46 +01:00
Nikolaus Waxweiler
7a5138d91b Add mypy CI job 2020-09-16 15:13:50 +01:00
Nikolaus Waxweiler
863d9fd3c8 Add py.typed file 2020-09-16 12:03:52 +01:00
Nikolaus Waxweiler
e1c9710272 More types, correct stale comment 2020-09-16 09:52:46 +01:00
Nikolaus Waxweiler
fa32cf2fed Remove unused type comment 2020-09-16 09:31:05 +01:00
Nikolaus Waxweiler
a364cff13f No need for _D anymore 2020-09-15 23:58:23 +01:00
Nikolaus Waxweiler
be77335993 Remove unused typing imports 2020-09-15 23:31:03 +01:00
Nikolaus Waxweiler
8a5baa0aa6 Return Any from load*
https://github.com/python/typeshed/pull/4543
2020-09-15 23:27:39 +01:00
Nikolaus Waxweiler
d70ca8224e More typing 2020-09-15 18:31:07 +01:00
Nikolaus Waxweiler
4f51a5da10 More typing 2020-09-15 17:20:03 +01:00
Nikolaus Waxweiler
9d13fe1150 Simplify typing for singledispatch 2020-09-15 15:01:53 +01:00
Nikolaus Waxweiler
bbfc7b9ff5 Fix type mixup 2020-09-15 14:27:22 +01:00
Nikolaus Waxweiler
ff0e0028f4 Use overload instead of exploding singledispatch 2020-09-15 13:00:36 +01:00
Nikolaus Waxweiler
7c02ab3d3c woopsie 2020-09-15 00:02:54 +01:00