2666 Commits

Author SHA1 Message Date
Miguel Sousa
af3df891b2 [varLib.mutator] Drop all variable tables 2017-03-04 23:30:37 -08:00
Miguel Sousa
9e4e1ffc44 [varLib.mutator] Revert Include HVAR in the list of tables to remove. 2017-03-04 12:58:00 -08:00
Miguel Sousa
7bf853ed2e [varLib] Round advance width and LSB to integers 2017-03-04 12:54:20 -08:00
Miguel Sousa
33d12e9406 [varLib.mutator] Change ‘GX’ to ‘variable’. Include HVAR in the list of tables to remove. 2017-03-03 14:49:11 -08:00
Behdad Esfahbod
9d5e38c439 Merge pull request #869 from anthrotype/varLib-builder-fixes
[varLib.builder] Fix roundtripping XML
2017-03-03 11:31:38 -08:00
Cosimo Lupo
0b7da14b41
[cffLib] always write "charset is dumped separately..." comment 2017-03-02 12:50:18 +00:00
Cosimo Lupo
94e1789fcb
[varLib.builder] fix max() arg can't be empty sequence 2017-03-01 22:20:46 +00:00
Cosimo Lupo
1883e6466b
[varLib.builder] correctly set NumShorts if optimize is False 2017-03-01 20:58:48 +00:00
Cosimo Lupo
3f8eab41f7
[varLib.builder] rename optimizeVarData to calculateNumShorts with option to optimize 2017-03-01 20:14:34 +00:00
Cosimo Lupo
3bde091807
[varLib.builder] in VarRegionList, rename AxisCount to RegionAxisCount
That is the name currently used in otData.py
2017-03-01 17:29:02 +00:00
Cosimo Lupo
7562115fc4
move calculation of NumShorts from otTables to varLib.builder 2017-03-01 17:27:41 +00:00
Cosimo Lupo
f97d126f96
[varLib.builder] ensure VarRegionAxis coordinates are stored as float
These are decompiled as F2Dot14 by otData.py, thus they are written as float when dumping to TTX
2017-03-01 17:26:07 +00:00
Cosimo Lupo
5b3b3e76c8 Merge pull request #866 from miguelsousa/varlib-tests
Varlib tests
2017-03-01 16:50:14 +00:00
Cosimo Lupo
46d487c728
the Zopfli bindings are finally available from PyPI, change url in the docstring 2017-03-01 14:01:15 +00:00
Cosimo Lupo
ee4f4695e6
[ttx] ignore missing 'head' if no --recalc-timestamp option is passed 2017-02-28 22:54:30 +00:00
Cosimo Lupo
8af488a1b3
Revert "explicitly require 'head' table in TTFont.save()"
This reverts commit b39f3b613c861539f9ae6e18f5064979f7ad6365.

Requiring 'head' makes it hard to build partial fonts

See https://github.com/fonttools/fonttools/pull/854#issuecomment-283177719
2017-02-28 22:48:28 +00:00
Miguel Sousa
3dc8e4fa95 minor change 2017-02-28 05:16:15 -08:00
Cosimo Lupo
ca95a07f24
[interpolate_layout] handle optional 'axes' item; require 'sources'
remove 'instances' as it's not used
2017-02-27 19:44:54 +00:00
Bo Song
b45fcf0fd6 Change gasp merge logic to 'first' (#862)
* change gasp merge logic to first

* fix typo

* add comment

* fix typo
2017-02-27 19:34:48 +00:00
Cosimo Lupo
c131bd93f6
[varLib] Fix AttributeError: odict.keys() has no index attribute 'index'
43efa63732 (commitcomment-21073943)
2017-02-27 19:17:04 +00:00
Cosimo Lupo
01d8145288
[varLib] fix undefined name 'masters'
Ouch!
2017-02-27 18:31:38 +00:00
Cosimo Lupo
ee9f2bf24a
[designspace] clarify that designspace items are optional in docstring 2017-02-27 18:12:31 +00:00
Cosimo Lupo
66c6662572
[designspace] refactor
- remove unused import
- use snake_case instead of camelCase
- add two empty lines between module-level definitions
- rename 'elt' variable to 'element'
- don't make extra dict copy in _load_axis
2017-02-27 16:59:35 +00:00
Cosimo Lupo
558e5e172d
[varLib] raise VarLibError if 'sources' missing or empty; treat 'axes' and 'instances' as optional 2017-02-27 16:34:41 +00:00
Cosimo Lupo
ba44e64108
[designspace] rename 'masters' to 'sources', like in original .designspace document
I don't see why our parser should call this element differently than its official name.
2017-02-27 16:21:35 +00:00
Cosimo Lupo
51f4302ec8
[designspace] if elements not defined, don't set key/value pair in returned dict
According to https://github.com/LettError/designSpaceDocument

> Not all values might be required by all applications.

So if any of 'elements', 'sources' or 'instances' is missing, the dictionary
returned by designspace.load will not contain those keys.
2017-02-27 16:17:13 +00:00
Behdad Esfahbod
b9ff863b2c Move Snippets/interpolatable.py to fontTools.varLib.interpolatable 2017-02-26 10:43:11 -08:00
Behdad Esfahbod
c2033cb095 Document new pens 2017-02-26 10:41:11 -08:00
Behdad Esfahbod
19ab2c96cc Fix typo
Who knew __all__ does not actually hide symbols not listed from
importing by name?
2017-02-26 10:33:58 -08:00
Cosimo Lupo
ae58d3872c Merge pull request #864 from miguelsousa/pr857-followup
Followup to PR #857
2017-02-26 16:44:18 +00:00
Miguel Sousa
f061231049 [varLib] Make designspace.load() return a dictionary instead of a tuple 2017-02-26 07:49:44 -08:00
Miguel Sousa
43efa63732 [varLib] Build axes according to ’axes’ element in designspace file 2017-02-25 20:53:48 -08:00
Miguel Sousa
0dd2227e49 [varLib] Make parsing of ‘axes’ element more robust 2017-02-25 20:45:47 -08:00
Cosimo Lupo
2c9eea33ee [feaLib.builder] rename 'id' -> 'id_' to avoid shadowing id() built-in function 2017-02-26 10:48:54 +08:00
Cosimo Lupo
1958334158 [feaLib.builder] sort markFilterSets_ items by id to make output deterministic
The items() of self.markFilterSets_ dictionary are not guaranteed to be always
ordered the same (may vary across python implementations or on subsequent runs).
To ensure deterministic order of Coverage subtables in MarkGlyphSetsDef tables,
we sort the mark sets by the order in which 'UseMarkFilteringSet' statements appear
in the feature file.
2017-02-26 10:48:54 +08:00
Cosimo Lupo
a9e0165b93 [feaLib.builder] ignore duplicates in classes used as MarkFilteringSet and MarkAttachmentType
Glyph classes from feaLib parser are tuples of strings, with an order and possibly containing duplicates.
However when building MarkGlyphSetsDef or MarkAttachClassDef we are only interested in the *set* of glyphs they contain, i.e. the unordered collection of unique glyph names.

Also, note how in the tests for otlLib.builder.buildMarkGlyphSetsDef, the input is given as set literals, not tuples:
https://github.com/fonttools/fonttools/blob/78ad48e/Tests/otlLib/builder_test.py#L633
2017-02-26 10:48:54 +08:00
Behdad Esfahbod
76e73f0ee4 [varLib] Remove TODO item 2017-02-25 10:59:31 -08:00
Behdad Esfahbod
a02a429573 [StatisticsPen] Some more (probably over-) optimization 2017-02-24 15:20:38 -08:00
Behdad Esfahbod
8335af0d1d [statisticsPen] Micro-optimize 2017-02-24 14:06:58 -08:00
Cosimo Lupo
7a3f8f707d Merge pull request #857 from readroberts/master
varLib. Use designspace <axes> element to define the axisMap and order.
2017-02-24 19:11:07 +00:00
Denis Moyogo Jacquerye
891405fd68 TupleVariation: round deltas before encoding (#861)
* TupleVariationTest.test_compileDeltaValues(): also test floats

* TupleVariation: round deltas before encoding

Python 3 was raising 'struct.error: required argument is not an integer' and Python 2 was truncating when deltas are floats
2017-02-24 08:58:41 -08:00
ReadRoberts
69ae7f0da5 Python2 .5-> Python3/2.7: "axes.has_key(iden)" -> "iden in axes" 2017-02-24 08:58:39 -08:00
ReadRoberts
33177bf65b If the design space file uses an <axes> element, use this to define the axis map, and preserve the axis order. 2017-02-22 21:22:34 -08:00
Behdad Esfahbod
55a5ace5d8 [varLib] Update invocation command 2017-02-22 14:46:23 -06:00
Sascha Brawer
c436365cef [varLib] Add missing import
After this change, the command line mentioned in the comment at the
beginning of the file works again.
2017-02-22 20:18:05 +01:00
Behdad Esfahbod
8879318c0b Move RecordingPen to fontTools.pens.recordingPen 2017-02-21 12:11:36 -06:00
Behdad Esfahbod
55e529f7a3 Add fontTools.pens.teePen 2017-02-21 12:01:10 -06:00
Behdad Esfahbod
6face10ca3 [basePen] Default glyphset to None 2017-02-21 12:01:10 -06:00
Behdad Esfahbod
f3bfea12c6 Add __all__ to pens that didn't have it 2017-02-21 12:01:10 -06:00
Behdad Esfahbod
69f38605d1 [transformPen] Minor 2017-02-21 12:01:10 -06:00