3791 Commits

Author SHA1 Message Date
Cosimo Lupo
cf4d3ae010
[MANIFEST.in] add missing files; simplify glob patterns for Tests/ folder
For the Tests/ folder, the next time we add a new type of files, we simply need to add a new glob pattern.

The source distribution is now in sync with the content of the repository as returned by `git ls-files`
2017-03-03 10:20:03 +00:00
Cosimo Lupo
8b3255111c Merge pull request #867 from miguelsousa/hhea-fix
[tests] Change `hhea` and `vhea` table version from float to hex to mute fontTools warnings
2017-03-03 08:19:01 +00:00
Cosimo Lupo
72c1c4c752 Merge pull request #822 from fonttools/aots-tests
[WIP] Add test fonts from AOTS and start of a driver, copied from mtiLib
2017-03-02 15:20:07 +00:00
Cosimo Lupo
9fbefd1d71
[test_tables] minor whitespace 2017-03-02 13:40:41 +00:00
Cosimo Lupo
9c6aaf0bf6
[test_tables] skip cmap tests when unicodedata2 is not installed
When the tests are run with `python setup.py test` (e.g. from the ./run-tests.sh
script), we can't have setuptools install pre-compiled wheels for extra test
requirements (e.g. Brotli, unicodedata2).
Instead of failing, it's better that we skip the tests that have such extra
requirements.

NOTE: The recommended way to run the full test suite is by using tox
(like we do on the CI), or by installing pytest and the rests of requirements.txt,
and then run `pytest` command directly.
2017-03-02 13:34:39 +00:00
Cosimo Lupo
0a9ab169fe
[test_tables] remove unused import 2017-03-02 13:30:12 +00:00
Cosimo Lupo
43bf2c4cb4
[aots/cmap4_font4.ttx.cmap] 0x37f is "GREEK CAPITAL LETTER YOT" 2017-03-02 13:29:06 +00:00
Cosimo Lupo
b8b30d8e55
[requirements.txt] add unicodedata2, for 3.5 and below
Note that we only use requirements.txt for running the test suite inside tox.
I didn't add (yet?) unicodedata2 module to 'install_requires' in setup.py.

Python 3.6 does not need it, as it's built-in unicodedata module is the
same as unicodedata2 backport.

PyPy is also excluded because currently there is no pre-compiled wheel
available for that implementation.
2017-03-02 13:27:49 +00:00
Cosimo Lupo
0b7da14b41
[cffLib] always write "charset is dumped separately..." comment 2017-03-02 12:50:18 +00:00
Cosimo Lupo
937bf40c11
[tables_test] dynamically parametrize tests using 'pytest_generate_tests'
pytest provides built-in support for implementing your custom dynamic
parametrization schemes:

http://doc.pytest.org/en/latest/parametrize.html#pytest-generate-tests
2017-03-02 10:57:26 +00:00
Cosimo Lupo
fca44b495c
[aots/data] rename OS2 -> OS_2 like in xml table tags; add sfntVersion where missing 2017-03-02 10:57:26 +00:00
Behdad Esfahbod
f652c405e3
[WIP] Add test fonts from AOTS and start of a driver, copied from mtiLib 2017-03-02 10:57:25 +00:00
Cosimo Lupo
5b3b3e76c8 Merge pull request #866 from miguelsousa/varlib-tests
Varlib tests
2017-03-01 16:50:14 +00:00
Miguel Sousa
6ccd7c83f0 File rename for consistency (https://github.com/fonttools/fonttools/pull/866#issuecomment-283345103) 2017-03-01 06:28:57 -08: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
Miguel Sousa
306882a00a [tests] Change hhea and vhea table version from float to hex to mute fontTools warnings 2017-02-28 16:35:13 -08: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
d1f717ca16 [varLib.build] Test case and test result 2017-02-28 12:15:51 -08:00
Miguel Sousa
67e1945690 [varLib.build] ttx test files.
These originated from TTFs that were built from the test UFO masters using fontmake v1.2.0 with the command `fontmake -m BuildTest.designspace -o variable`
2017-02-28 12:13:20 -08:00
Miguel Sousa
979e8657a6 [varLib.build] designspace and ufo test files 2017-02-28 08:46:27 -08:00
Miguel Sousa
951b53de4c fix test after filename changes 2017-02-28 05:40:10 -08:00
Miguel Sousa
6f3be0b8f3 filename changes 2017-02-28 05:38:58 -08:00
Miguel Sousa
a1c6bc46f1 [designspace] Test for empty elements 2017-02-28 05:17:42 -08: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
Cosimo Lupo
c122918577
Update changelog 2017-02-27 19:39:16 +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
6dfb8991a2
Update changelog 2017-02-27 18:30:05 +00:00
Cosimo Lupo
ee9f2bf24a
[designspace] clarify that designspace items are optional in docstring 2017-02-27 18:12:31 +00:00
Cosimo Lupo
dc46296532 Merge pull request #865 from fonttools/designspace-fixups
[varLib/designspace] fixups
2017-02-27 18:11:42 +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
380a6cd56b [varLib] Update designspace test case 2017-02-25 20:46:51 -08:00
Miguel Sousa
0dd2227e49 [varLib] Make parsing of ‘axes’ element more robust 2017-02-25 20:45:47 -08:00
Miguel Sousa
aed9caf964 [varLib] Add ‘axes’ element to designspace test file 2017-02-25 20:44:35 -08:00
Cosimo Lupo
01ed5a43e7 data/lookupflag.{fea,ttx}: add tests for duplicate glyphs in MarkAttachClass and MarkGlyphSets 2017-02-26 10:48:54 +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