Cosimo Lupo
803530b281
[feaLib] assert all requested tables are supported
...
better than just warn
2018-01-24 15:07:34 -08:00
Cosimo Lupo
b2da85cffd
[feaLib] add tables
argument to only build some tables (e.g. GSUB)
...
`tables=None` by default will build all supported tables;
To build only some of these and ignore the others, one can pass a
subset of supported tables tags: .e.g. `tables={'GSUB'}` will only
build the GSUB, even if the feature file may contain e.g. GPOS
related features.
2018-01-24 15:07:34 -08:00
Cosimo Lupo
92c3e3a3bc
Merge pull request #1154 from belluzj/improve-feaLib
...
Add option to parse one feature file without resolving included files
2018-01-24 19:20:38 +01:00
Denis Moyogo Jacquerye
94b51e7344
feaLib.parser: raise meaningful error for substitution of multiple glyphs by multiple glyphs
2018-01-24 11:40:07 +00:00
Behdad Esfahbod
49b6004040
Move TTFont into fontTools.ttLib.ttFont
...
Users can still import TTFont from fontTools.ttLib. It was for
cleaning up only.
2018-01-23 16:12:46 -08:00
Behdad Esfahbod
76ba3b423f
[ttc] Move to fontTools.ttLib.ttCollection
...
TTCollection can still be imported from fontTools.ttLib.
2018-01-23 15:46:51 -08:00
Behdad Esfahbod
28cf254c24
[TTFont] Remove explicit closeStream
...
Not needed. Python takes care of closing files for us just fine.
2018-01-23 14:22:19 -08:00
Behdad Esfahbod
759c021aab
[sfnt] Minor
2018-01-23 13:49:49 -08:00
Behdad Esfahbod
3635926341
[ttc] Drop tableCache from SFNTReader
...
We just need it in TTFont layer itself.
2018-01-23 13:44:56 -08:00
Behdad Esfahbod
1c25445e7b
[ttc] Remove hash hack
2018-01-23 13:44:56 -08:00
Behdad Esfahbod
c2d5d87a7c
[ttc] Implement minimal list-like methods
2018-01-23 13:44:56 -08:00
Behdad Esfahbod
22c971aa99
[ttc] Implement object-sharing in TTC loading if sharedTables=True
2018-01-23 13:44:56 -08:00
Behdad Esfahbod
233e46ca38
[ttc] Add fontTools.ttLib.TTCollection()
...
Opens TTC files, no object sharing.
2018-01-23 13:44:56 -08:00
Behdad Esfahbod
524b62a1b2
Add fontTools.ttLib.sfnt.readTTCHeader()
2018-01-23 13:44:56 -08:00
Cosimo Lupo
677954d5b9
unicodedata: add ot_tag_to_script function
...
returns the Unicode script code for a given OpenType script tag, or None if no match is found
2018-01-23 11:45:20 -08:00
Jany Belluz
1f1dca9b6d
Fix a flaky designspace test
2018-01-23 17:04:45 +00:00
Jany Belluz
89979dea04
[feaLib.parser] Add option to not follow includes
...
Currently, the feature file parser always resolves included files,
parses their content and inserts it in the resulting AST. The original
`include` statement is lost.
This commit introduces an option to not follow inclusions. Instead, the
output AST will contain an `include` statement. This allows to process a
feature file on its own, and allows to round-trip it.
For example in glyphsLib, when going from a UFO to a .glyphs file, a
UFO feature file will be sliced up into Glyphs.app classes (e.g. a
GSFeaturePrefix with code `include(../family.fea);`) and when going back
from .glyphs to UFO, the feature file will be patched back together.
2018-01-23 11:07:16 +00:00
Jany Belluz
d6a5a489c0
[feaLib.parser] Parse a feature file with only comments
2018-01-22 17:07:28 +00:00
Denis Moyogo Jacquerye
29deb7e6fb
Merge pull request #1110 from belluzj/merge-design-space-document
...
Merge designSpaceDocument
2018-01-22 15:44:39 +00:00
Cosimo Lupo
91a8cc33e7
unicodedata: add script_horizontal_direction function
...
same as harfbuzz hb_script_get_horizontal_direction.
We just hard-code the set of RTL script here, as it doesn't change often anyway.
The function is just syntactic sugar as it all does is basically looking up the
constant RTL_SCRIPTS set.
It's nice to have it here in a central place alongside 'script', 'script_name', etc.
2018-01-19 18:04:33 +00:00
Cosimo Lupo
f62f79eb23
otConverters: don't write XML comment if NameID value is 0 == NULL
...
Fixes https://github.com/fonttools/fonttools/issues/1151
2018-01-19 13:25:59 +00:00
Cosimo Lupo
5e0bad94c5
export new ot_tags_from_script func in __all__ list [skip ci]
2018-01-18 20:26:44 +00:00
Cosimo Lupo
c9259c4723
unicodedata: add ot_tags_from_script function
...
Fixes https://github.com/fonttools/fonttools/issues/1112
This implements the same logic found in harbfuzz hb-ot-tag.cc to
convert between Unicode (or ISO 15924) script codes to OpenType script
tags as defined at:
https://www.microsoft.com/typography/otspec/scripttags.htm
461a605fde/src/hb-ot-tag.cc (L127)
2018-01-18 20:20:17 +00:00
Cosimo Lupo
95030cb788
minor: unused variables
2018-01-15 19:50:34 +00:00
Cosimo Lupo
27d40f5160
[feaLib.builder] don't error when specific kern pairs conflict
...
Fixes #1147
2018-01-15 18:43:10 +00:00
Cosimo Lupo
60f2c741c3
CapturingLogHandler: match the fully formatted log message in assertRegex
...
and not the raw 'msg' attribute which still has the '%' formatting placeholders
2018-01-15 18:38:27 +00:00
Cosimo Lupo
bc0480e19e
[sbix] fix TypeError when += str and bytes
...
Fixes #1145
There's probably more... we'll see once we have some data from chromacheck fonts to proper test this with
2018-01-11 20:15:58 +00:00
Behdad Esfahbod
2d4e76ff0b
[bezierTools] Add calcCubicArcLength() and calcCubicArcLengthC()
...
Fixes https://github.com/fonttools/fonttools/issues/1142
2018-01-09 11:33:57 +01:00
Behdad Esfahbod
f7312fc9d0
[misc.bezierTools] Slightly improve previous commit
...
Part of https://github.com/fonttools/fonttools/issues/1142
2018-01-08 13:43:45 +00:00
Behdad Esfahbod
5dd888da1d
[misc.bezierTools] Implement cusp loop for calcQuadraticArcLength()
...
Part of https://github.com/fonttools/fonttools/issues/1142
2018-01-08 13:41:27 +00:00
Behdad Esfahbod
fe5a2ea870
[misc.bezierTools] Remove approximate_fallback arg from calcQuadraticArcLength()
...
Part of https://github.com/fonttools/fonttools/issues/1142
2018-01-08 13:41:27 +00:00
Cosimo Lupo
a322156af9
Bump version: 3.21.2 → 3.21.3.dev0
2018-01-08 12:40:40 +00:00
Cosimo Lupo
a3eadbd0f9
Release 3.21.2
2018-01-08 12:40:40 +00:00
Behdad Esfahbod
633f44da39
[varLib.merger] Fix merging of PairPos Format2 with missing subtables
2018-01-08 10:49:25 +00:00
Behdad Esfahbod
e58499cc06
[varLib.merger] Minor
2018-01-08 10:31:50 +00:00
Behdad Esfahbod
b624e0c08e
[varLib.merger] Handle missing PairPos format1/2 subtables in AligningMerger
...
Fixes https://github.com/fonttools/fonttools/issues/1125
The Format2 is still failing in my test case. Investigating.
2018-01-08 10:27:33 +00:00
Cosimo Lupo
40e50b60c3
Revert "Merge pull request #1136 from santhoshtr/svg-arc-support"
...
This reverts commit 5c392bc86542fbbc0c63335cfedae0d1406b0794, reversing
changes made to 4b69d77ae57776480901e2af82c7d9c1c29de8d6.
2018-01-05 13:07:57 +00:00
Cosimo Lupo
5c392bc865
Merge pull request #1136 from santhoshtr/svg-arc-support
...
svgLib: Add support for arcs in SVG path parser
2018-01-05 12:22:13 +00:00
Santhosh Thottingal
a8abf7246c
Remove duplicate point, add more tests
2018-01-05 17:31:53 +05:30
Cosimo Lupo
2b13c47d3e
textTools: safeEval = ast.literal_eval
...
https://github.com/fonttools/fonttools/pull/1139#pullrequestreview-86720679
2018-01-04 19:41:52 +00:00
Cosimo Lupo
4a20899cb4
textTools: use ast.literal_eval for safeEval
...
go back to using literal_eval, as nobody does complex expressions in TTX files,
and eval is evil.
Fixes https://github.com/fonttools/fonttools/issues/164
2018-01-04 16:53:54 +00:00
Santhosh Thottingal
06dc10d30b
Fix syntax error about starred expression in python < 3.5
...
Also minor documentation fix.
2018-01-04 17:56:14 +05:30
Cosimo Lupo
4b69d77ae5
Bump version: 3.21.1 → 3.21.2.dev0
2018-01-03 20:09:22 +00:00
Cosimo Lupo
d53b01f14f
Release 3.21.1
2018-01-03 20:08:49 +00:00
Cosimo Lupo
c42749466a
[S_V_G_] fix dumping toXML SVG tables containing colorPalettes
...
As reported by glukfonts in
https://github.com/fonttools/fonttools/issues/1124
2018-01-03 15:40:35 +00:00
Santhosh Thottingal
82e119e0e3
svgLib: Add support for arcs in SVG path parser
...
Implement the arc to curve points calculation using the original
svg.path library and use the curve points for the pen.
The Arc class and methods to parameterize and get curve points are
copied.
This makes the svg to glif conversion possible for any SVGs.
2018-01-01 20:05:02 +05:30
Khaled Hosny
eeb9610ec1
Simplify
2017-12-22 16:30:34 +02:00
Khaled Hosny
ec6ff821f0
[feaLib] Allow mixed single/multiple substitutions
...
A multiple substitution may have a single destination, in which case
it will look just like a single substitution. So if there are both
multiple and single substitutions, upgrade all the single ones to
multiple substitutions. Previously we would just give an error message
in the builder and abort, which means certain valid OpenType lookups
can’t be represented by feature files.
This is the same logic implemented by FontForge (actually the
explanation above is almost copied verbatim from its source), makeotf
does not do this AFAIK but I consider it a bug not a feature.
Fixes https://github.com/fonttools/fonttools/issues/612
2017-12-22 16:30:34 +02:00
Cosimo Lupo
0eccebd1a0
Bump version: 3.21.0 → 3.21.1.dev0
2017-12-18 12:25:36 +00:00
Cosimo Lupo
e82773aa11
Release 3.21.0
2017-12-18 12:24:42 +00:00