Cosimo Lupo
1d19cc6e23
add comment for reason not to short-circuit with any()
2021-11-15 18:17:19 +00:00
Cosimo Lupo
12ed8b752c
simplify and do el.attrib.get('id') as per review
2021-11-15 17:46:42 +00:00
Cosimo Lupo
92470ea361
rename parmeter ids => retained_ids for clarity as per review
2021-11-15 17:41:42 +00:00
Cosimo Lupo
a7216ae766
subset: drop svg doc if subsetted to empty
2021-11-15 17:08:55 +00:00
Cosimo Lupo
d1f2481fa0
fix invalid escape sequence in GID_RE pattern
2021-11-15 17:08:55 +00:00
Cosimo Lupo
a4df567718
subset/svg: support resolving cross-references and pruning elements
...
With this I can finally follow xlink:href and url(#...) sort of
references within the SVG doc and subset the elements accordingly so
that only those that are reachable from the initial set of glyph
elements are kept.
2021-11-15 16:07:18 +00:00
Cosimo Lupo
05e6d577cd
subset: add --pretty-svg option to enable lxml pretty_print
...
False (more compact) by default
2021-11-15 16:07:18 +00:00
Cosimo Lupo
0dc2be3e78
require lxml to subset SVG
...
support for namespaces and xpath is insufficient in built-in ElementTree; supporting both lxml and ElementTree is too complicated, let's simply require lxml to be able to subset SVG for now
2021-11-15 16:07:18 +00:00
Cosimo Lupo
d44af9f2d7
basic subset.svg impl that simply remaps id='glyphXXX'
...
this drops svg document records when they no longer intersect the subset. It keeps them in their entirety (for now) when they still intersect the subset, only renaming all the id='glyphXXX' to point to the new glyph indices after subsetting. Unused, unreferenced elements are not pruned yet.
2021-11-15 16:07:18 +00:00
Cosimo Lupo
16249d1fb8
subset: store original glyphOrder and map from old to new indexes in Subsetter instance
...
so that SVG tables' subset_glyphs method can use it to get glyph names from GISs and to remap from old to new GIDs
2021-11-15 16:07:18 +00:00
Cosimo Lupo
bd47bdae97
subset: don't drop SVG table, add WIP subset/svg.py stub
...
simply pass-through for now
2021-11-15 16:07:18 +00:00
Cosimo Lupo
425e1afd36
subset: move _add_method and _uniq_sort to subset/util submodule
2021-11-15 16:07:18 +00:00
Cosimo Lupo
0dc2f820bd
cu2qu/cli: latest ufoLib2 no longer does Font(path); must use Font.open(path)
...
https://github.com/fonttools/fonttools/runs/4211314586?check_suite_focus=true#step:5:598
2021-11-15 12:22:33 +00:00
Antonio Cavedoni
e3338bc837
Removed comment about missing “start” optional argument to calcChecksum
2021-11-11 10:09:19 +01:00
Cosimo Lupo
8c6930810b
Bump version: 4.28.1 → 4.28.2.dev0
2021-11-08 12:51:44 +00:00
Cosimo Lupo
497c449db1
Release 4.28.1
2021-11-08 12:51:44 +00:00
Cosimo Lupo
8d6a7617a2
minor: fix 4-space indentation from PR 2441
2021-11-08 12:27:26 +00:00
Rod S
7dd3488732
Traverse when there is no layer list
2021-11-06 14:26:27 -07:00
David Corbett
cfa69f245f
[otlLib] Remove duplicates when building coverage
2021-11-06 13:32:43 -04:00
Cosimo Lupo
a2990a25df
Bump version: 4.28.0 → 4.28.1.dev0
2021-11-05 13:20:50 +00:00
Cosimo Lupo
c7109c1a02
Release 4.28.0
2021-11-05 13:20:49 +00:00
Rod S
6144202cd9
Don't crash if there is no layer list
2021-11-02 15:59:30 -07:00
Yao Wei (魏銘廷)
390640a357
update to unicode 14.0
2021-10-31 23:24:18 +08:00
Simon Cozens
563730f8ce
Support variable feature syntax ( #2432 )
2021-10-28 11:58:54 +01:00
Cosimo Lupo
941179eb60
fonttools help: only show first line of main()'s docstring
...
mtiLib.main() contained a multiline string in __doc__ and it didn't look in line with the rest of the --help
2021-10-19 14:22:09 +02:00
Cosimo Lupo
11c98b04a5
SVG: don't write extra empty newline at beginning of SVG table
...
it serves no purpose.
2021-10-13 14:51:42 +02:00
Cosimo Lupo
2967f18e35
SVG: on compile reuse offsets when doc bytes are same
...
https://github.com/fonttools/fonttools/issues/534#issuecomment-934528761
2021-10-13 14:50:08 +02:00
Cosimo Lupo
be8d6e29d5
SVG: remove old deprecated version1 and embedded colorPalettes
...
Fixes https://github.com/fonttools/fonttools/issues/2426
2021-10-13 14:47:41 +02:00
Cosimo Lupo
5c54f4e666
subset: don't try subsetting ClipList if None
2021-10-11 16:48:00 +02:00
Nikolaus Waxweiler
04664089cc
Minor: wording
2021-10-07 14:44:20 +01:00
Nikolaus Waxweiler
cd32e1d16b
Use set comprehension
2021-10-07 14:18:12 +01:00
Nikolaus Waxweiler
827004608c
userNameToFileName should not have a mutable default parameter
2021-10-07 14:18:12 +01:00
Nikolaus Waxweiler
a7e4d86540
Use a set for file names for clash checking
2021-10-07 12:03:47 +01:00
Behdad Esfahbod
76ac638c43
[subset] Add a couple None checks
...
Exercised by Simon's Gulzar
2021-10-01 11:42:58 -06:00
Cosimo Lupo
b4a789ee9e
Bump version: 4.27.1 → 4.27.2.dev0
2021-09-23 14:36:00 +02:00
Cosimo Lupo
744bb47131
Release 4.27.1
2021-09-23 14:36:00 +02:00
Simon Cozens
19ab25d4ed
Merge pull request #2411 from simoncozens/fix-fix-contextual-overflow
2021-09-23 12:45:40 +01:00
Simon Cozens
54e307ea6c
Fix docTests
2021-09-23 08:20:51 +01:00
Simon Cozens
ed0cf2fa92
Typo
2021-09-23 08:10:00 +01:00
Simon Cozens
13f6cbdaba
Fix doctests
2021-09-22 16:41:02 +01:00
Simon Cozens
1cc8bf0827
Fix two problems when handling orthogonal lines
2021-09-22 16:28:10 +01:00
Simon Cozens
ed833dab74
Don’t complain about format 1 lookups we couldn’t even build
2021-09-20 10:34:41 +01:00
Simon Cozens
3a7c91602c
Merge pull request #2404 from simoncozens/fix-contextual-overflow
...
[otlLib] Fix chained contextual builder overflow
2021-09-15 11:20:39 +01:00
Simon Cozens
f53a75fb1d
Check for overflows in a loop
2021-09-15 11:08:50 +01:00
Cosimo Lupo
c4003fd986
Bump version: 4.27.0 → 4.27.1.dev0
2021-09-14 17:14:47 +02:00
Cosimo Lupo
eab1d6f16d
Release 4.27.0
2021-09-14 17:14:46 +02:00
Simon Cozens
f9b927cdbb
Fix chained contextual builder overflow
2021-08-30 10:35:56 +01:00
Behdad Esfahbod
d867397532
Remove residual allowVID stuff
...
Part of https://github.com/fonttools/fonttools/pull/2398
2021-08-25 15:55:17 -06:00
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