Behdad Esfahbod
0daed6eb59
[ttc] Implement TTCollection.save()
...
Doesn't share tables currently.
2018-01-25 15:33:30 -08:00
Behdad Esfahbod
bd06ecce7c
[ttc] Towards saving TTCs, prep work
2018-01-25 15:08:31 -08:00
Behdad Esfahbod
764e27556d
[ttc] Move tag check
2018-01-25 14:50:46 -08:00
Cosimo Lupo
bdc82fb7f5
feaLib: LookupListIndex must be list, not tuple
...
all otData arrays are decompiled as lists (see otConverters.BaseConverter.readArray).
If one tries to call the subsetter on a GSUB table that was not read from file
but was just built from feaLib, it crases with a TypeError because it's expecting
list but finds tuples.
Traceback (most recent call last):
File /home/clupo/Github/fonttools/Lib/fontTools/subset/__init__.py, line 1462, in prune_lookups
lookup_indices = self.table.FeatureList.collect_lookups(feature_indices)
File /home/clupo/Github/fonttools/Lib/fontTools/subset/__init__.py, line 1263, in collect_lookups
if i < self.FeatureCount), [])
TypeError: can only concatenate list (not tuple) to list
2018-01-25 12:35:17 -08:00
Cosimo Lupo
89bcac099c
Merge pull request #1163 from anthrotype/feaLib-build-parsed-ast
...
[feaLib] allow to build from pre-parsed ast.FeatureFile object
2018-01-25 19:05:50 +01:00
Cosimo Lupo
241384ab21
[feaLib] allow to build from pre-parsed ast.FeatureFile object
2018-01-25 09:53:42 -08:00
Cosimo Lupo
9ae0ccaa31
[appveyor] disable testing 3.5 on Win, only 2.7 & 3.6 is enough
...
we still test 3.5 on linux
2018-01-24 17:13:06 -08:00
Cosimo Lupo
83460d4a57
Merge pull request #1161 from anthrotype/allow-failures-osx
...
[travis] fast_finish + allow_failures for OSX builds
2018-01-25 02:03:45 +01:00
Cosimo Lupo
aff3ceedc3
[travis] exclude the default python from build matrix
...
whatever Travis...
2018-01-24 16:48:07 -08:00
Cosimo Lupo
8f8b76cfe3
[travis] fast_finish + allow_failures for OSX builds
...
Travis CI has been experiencing maintainance problems with the OSX infrastructure
and it has become too slow. It's better we temporarily enable 'allow_failures'
in combination with 'fast_finish' for the OSX builds, so that the CI goes green
as soon as the other builds have completed.
2018-01-24 16:42:02 -08:00
Cosimo Lupo
c5c6c6c73c
Merge pull request #1160 from anthrotype/fix-pypy-tests
...
revert closeStream to try fix failing pypy tests
2018-01-25 01:25:38 +01:00
Cosimo Lupo
b1a67bd812
Merge pull request #1159 from anthrotype/feaLib-build-some-tables
...
[feaLib] add `tables` argument to only build some tables (e.g. GSUB)
2018-01-25 00:42:12 +01:00
Cosimo Lupo
1c5e892894
revert closeStream to try fix failing pypy tests
...
reverts commit 28cf254c
2018-01-24 15:41:19 -08:00
Cosimo Lupo
a014e3be88
Merge pull request #1139 from anthrotype/revert-literal-eval
...
textTools: use ast.literal_eval for safeEval
2018-01-25 00:09:43 +01:00
Cosimo Lupo
596ad14526
Merge pull request #1157 from moyogo/feaLib-multiple_by_multiple_error
...
feaLib.parser: raise meaningful error for substitution of multiple glyphs by multiple glyphs
2018-01-25 00:09:07 +01:00
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
justvanrossum
8ee7c32184
Added new FontTools icon images in several variations.
2018-01-20 17:25:19 +01: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
38b25e00eb
Merge pull request #1152 from anthrotype/null-nameid
...
otConverters: don't write XML comment if NameID value is 0 == NULL
2018-01-19 16:46:29 +01: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
2ed59f20f1
Merge pull request #1150 from anthrotype/ot-tags-from-script
...
unicodedata: add ot_tags_from_script function
2018-01-19 13:21:03 +01: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
25b944ccce
typo
2018-01-18 20:24:28 +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
60bc2b722b
Merge pull request #1148 from anthrotype/pair-pos-conflict-warning
...
emit warning if enum pos rules overridden by preceding single pair
2018-01-15 21:20:48 +01:00
Cosimo Lupo
95030cb788
minor: unused variables
2018-01-15 19:50:34 +00:00
Cosimo Lupo
a4e1d4a2bf
[builder_test] test_pairPos_redefinition_warning
2018-01-15 18:45:42 +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
Cosimo Lupo
4942669c33
Update changelog
2018-01-10 11:43:49 +00:00
Jens Kutilek
b09c2e0d2b
Add b to bytes
2018-01-09 16:13:35 +01:00