6128 Commits

Author SHA1 Message Date
Cosimo Lupo
3b9ced71e0 move all test data inside the inlined ufoLib/test modules, and install them
Since the test suite is inlined, it makes sense to also have the test data installed alongside the test modules.
So all the content of the two top-level folders Data and TestData is now placed inside Lib/ufoLib/test/testadata.
The MANIFEST.in has been adjusted accordingly.
The `install_package_data` in setup.py ensures the package data specified in the manifest is installed with the package.

This way anyone who installs ufoLib (even the wheel from PyPI) can run the test suite with `pytest --pyargs ufoLib`.
2016-10-17 19:41:13 +01:00
Cosimo Lupo
d7b7cbd9cd Merge pull request #706 from fonttools/hmtx-width-ushort
[_h_m_t_x] Read advanceWidth as unsigned short (uint16)
2016-10-17 19:31:53 +01:00
Adrien Tétar
21b0f40ddc Merge pull request #44 from anthrotype/setup-fixes
setup.py: point package url to github repo; remove `import fontTools` check
2016-10-17 17:41:34 +02:00
Cosimo Lupo
6bfe462ba7 setup.py: point package url to github repo; remove import fontTools check
The `url` field in setup.py must be the home page for the package.
I moved the url to the UFO spec in the 'long_description', so it will show up in the PyPI project page.

Checking for `import fontTools` is redundant since dependency resolution is now automatic.
2016-10-17 16:18:57 +01:00
Cosimo Lupo
835872946d Merge pull request #43 from anthrotype/fonttools-3.1.2
specify fonttools 3.1.2 from PyPI in both setup.py and requirements.txt
2016-10-17 15:34:52 +01:00
Cosimo Lupo
e7aa1768c0 specify fonttools 3.1.2 from PyPI in both setup.py and requirements.txt 2016-10-17 15:19:59 +01:00
Cosimo Lupo
67e75348ea Merge pull request #710 from anthrotype/wheel-license
[setup.cfg] ensure LICENSE is included in wheels
2016-10-17 10:41:41 +01:00
Cosimo Lupo
cdee7040ab [setup.cfg] ensure LICENSE is included in wheels 2016-10-17 10:31:53 +01:00
moyogo
4dd1e73b04 Revert "Merge pull request #606 from anthrotype/cff-dehint"
This reverts commit 25a03f5a5736ed70791a8dde31605ed4cee9bbd9, reversing
changes made to 8351600bc628278960390d747f45593a50b7c1ea.
2016-10-14 20:20:35 +01:00
Sascha Brawer
0588502771 Add otConverters.NameID (#708)
When writing XML, this produces a comment with the English name.
If the name ID is missing from the name table, it logs a warning.
2016-10-14 21:04:35 +02:00
Cosimo Lupo
25a03f5a57 Merge pull request #606 from anthrotype/cff-dehint
subset: must 'draw' charstrings to set 'width' attribute before calling 'drop_hints'
2016-10-14 18:43:15 +01:00
Cosimo Lupo
2300b9c168 [_h_m_t_x] use tuple() instead of list() for metrics dict values
As suggested in https://github.com/fonttools/fonttools/pull/706#commitcomment-19429339
2016-10-14 18:35:33 +01:00
Cosimo Lupo
8a0172a562 [MANIFEST.in] add testdata/*.bin
I had forgotten to add the testdata/C_F_F_.bin file to the manifest.
This means the --pyargs option from c117927 is working as expected! :)

Fixes https://ci.appveyor.com/project/fonttools/fonttools/build/1.0.81/job/ktx2c62c6yug38wk#L1089
2016-10-14 18:35:33 +01:00
Cosimo Lupo
907af836c0 [tox] add 'coverage' toxenv to make local html coverage report
This is useful if one wants to run coverage tests locally, and get a nice HTML report while one is writing tests.

Just run:

$ tox -e coverage -- {optional pytest arguments}

And you get a "htmlcov/index.html" to view in your browser.
2016-10-14 18:35:33 +01:00
Cosimo Lupo
7adfe98690 [_v_m_t_x_test] add test for vmtx table (simply inherits from hmtx one) 2016-10-14 18:35:33 +01:00
Cosimo Lupo
f6b951c6da [_h_m_t_x_test] add test module for hmtx table compiler/decompiler 2016-10-14 18:35:33 +01:00
Cosimo Lupo
115993216a [_h_m_t_x] use list() instead of tuple() in __setitem__
This is for consistency with the way the hmtx `decompile` method already worked.
2016-10-14 18:35:33 +01:00
Cosimo Lupo
2839145c05 [_h_m_t_x] log glyph names with negative advances upon compile; re-raise struct.error as TTLibError with nicer message 2016-10-14 18:35:33 +01:00
Cosimo Lupo
ca6beadd22 [_h_m_t_x] warn if hhea.numberOfHMetrics > maxp.numGlyphs
the comment said "We warn later" but that's not true.
2016-10-14 18:35:33 +01:00
Cosimo Lupo
c8901bf940 [tox] remove unneeded print statements
This information is already displayed by pytest in the header of the test run output
2016-10-14 18:35:33 +01:00
Cosimo Lupo
ce313520cf [tox] use --pyargs fontTools to run tests against package installed in tox env instead of source dir
This will ensure we don't forget to add any data files to the MANIFEST.in (which means test data is not available to the inlined tests).

{posargs} allows to pass extra arguments to the test runner, when runing `tox -- {posargs}` from the command line.

With `--pyargs` option, pytest tries to interpret arguments as python package/module names, and if import fails as regular filesystem paths.
2016-10-14 18:35:33 +01:00
Cosimo Lupo
b1846201ba [_h_m_t_x] set longMetricFormat='Hh' as class attribute
In theory this could be overridden with the old 'hh' struct format, though I wouldn't recommend it.
2016-10-14 18:35:33 +01:00
Cosimo Lupo
1d545b8f91 [_h_m_t_x] Read advanceWidth as unsigned short (uint16); warn on decompile if exceeds 0x7FFF; raise on compile if negative
struct.pack will raise with `argument out of range` when trying to compile a negative integer as unsigned "H".
2016-10-14 18:35:33 +01:00
Cosimo Lupo
8351600bc6 Merge pull request #707 from anthrotype/travis-osx
[Travis] try to speed up osx builds a bit
2016-10-14 18:30:28 +01:00
Cosimo Lupo
30799bb6df [travis] also drop 3.4 for OSX; only run 2.7 and 3.5 2016-10-14 18:07:17 +01:00
Cosimo Lupo
941234c93d [travis] test on latest PyPy 5.4.1 2016-10-14 17:43:05 +01:00
Cosimo Lupo
e4a3d4aba4 [travis] don't test on OSX pypy any more
I believe it's enough to test pypy implementation only on Linux.
We don't really need to also test it in on OSX, as fonttools is a pure python project so it should just work there as well.
Travis CI has just become too slow...
2016-10-14 17:41:22 +01:00
Cosimo Lupo
f6362b0ebf Revert ".travis.yml: also test with built-in Python 2.7 on OSX 10.11"
This reverts commit a63e1ed5d37797ee361b0a23d09bf8a03aaee23d.

The default OSX Travis worker is now osx10.11-xcode7.3 so we don't need to separately test the latter as it's now default.

Also, since the OSX are getting quite slow lately, we can't afford to test two different python2.7 on OSX; so from now on we just test the system Python 2.7.11 that comes with El Capitan (so no more 2.7.5 on Mavericks).
2016-10-14 17:31:16 +01:00
Behdad Esfahbod
72f5cb8579 Fixup 2016-10-13 15:59:25 -07:00
Behdad Esfahbod
3872e3ba3b Revert "remove 'fontTools' symbolic link in Snippets as not cross-plaftorm"
This reverts commit d2e73ca1abf37eaa65a870851cb8427cb6541131.

Even if not cross-platform, this provides useful functionality on Linux and
Mac.
2016-10-13 15:47:49 -07:00
Behdad Esfahbod
37dbb77c67 Make varLib module callable 2016-10-13 15:43:19 -07:00
Behdad Esfahbod
4158b54244 Make subset module callable 2016-10-13 15:42:14 -07:00
Erik van Blokland
58a3667b71 Merge pull request #42 from moyogo/xmlWriter
glifLib: try importing from fontTools.misc.xmlWriter first
2016-10-13 22:50:24 +02:00
Denis Moyogo Jacquerye
e6a1a658f0 glifLib: try importing from fontTools.misc.xmlWriter first
fixes #41
2016-10-13 21:42:51 +01:00
Behdad Esfahbod
b39772b256 [varLib] Fix interpolate_layout for non-similar SinglePos
Has to be ported to varfont merger as well.
2016-10-12 16:11:20 -07:00
Behdad Esfahbod
b9c38af1ff Disable HVAR generation until I fix it
https://github.com/fonttools/fonttools/issues/705
2016-10-12 13:30:52 -07:00
Cosimo Lupo
850293a30a Merge pull request #700 from fonttools/versioneer+bumpversion
version
2016-10-12 11:57:10 +01:00
Sascha Brawer
f5b31db578 [fvar] Omit optional PostScript name when missing; improve tests
If a named instance has a PostScript name, the name is now printed as
a comment into the XML dump. Also, unit tests on `fvar` are now
exercising all code paths, both with and without PostScript names.
2016-10-12 10:58:41 +02:00
Behdad Esfahbod
12d4f277d7 [varLib.merger] Towards supporting merging individual attributes 2016-10-11 20:39:22 -07:00
Cosimo Lupo
f136bfe844 dev-requirements.txt: use bumpversion (fork with annotated tags support) 2016-10-12 00:49:57 +01:00
Cosimo Lupo
b94598e08b setup.cfg: add versioneer and bumpversion configurations
I had to remove the comments because bumpversion will strip them out anyway upon re-writing the updated version string in setup.cfg file.
Similarly, I had to normalize the whitespace like bumpversion would do. :-/

`tag=True` option means a tag is automatically created when bumping the version with bumpversion script.
However, in order to get 'annotated' instead of 'lightweight' tags -- i.e. the tag also contains the tag author, date and message --, we need to (temporarily?) use a fork of bumpversion that includes an unmerged PR: https://github.com/peritus/bumpversion/pull/58
2016-10-12 00:49:57 +01:00
Cosimo Lupo
3acacb592d fontTools: use versioneer to get_versions(); if fails, print warning and fall back to latest known tag 2016-10-12 00:49:57 +01:00
Cosimo Lupo
6df7feb70d add back the MANIFEST.in for all the extra files in sdist
We need this as we no longer use setuptools_scm to retrieve the full list of files under version control.
Instead, we need to spell them out one by one.
Hopefully we don't forget anyone...
2016-10-12 00:49:54 +01:00
Cosimo Lupo
36cc2ed249 add .gitattributes file for versioning git archives (e.g. Github's 'download zip') 2016-10-12 00:40:12 +01:00
Cosimo Lupo
8bc5c6123c .gitignore: remove setuptools_scm 'version.py' 2016-10-12 00:40:06 +01:00
Cosimo Lupo
47cdb2a501 setup.py: use versioneer instead of setuptools_scm 2016-10-12 00:40:06 +01:00
Cosimo Lupo
48b566dc09 check-in auto-generated versioneer.py and _version.py files 2016-10-11 19:01:34 +01:00
James Godfrey-Kittle
5606f47c03 Merge pull request #691 from jamesgk/varlib-usability
varLib usability stuff
2016-10-10 15:20:03 -07:00
Cosimo Lupo
c4c102950d Merge pull request #698 from anthrotype/write-to-version-py
Write version.py file with static string
2016-10-10 16:02:55 +01:00
Cosimo Lupo
b1fae3fe32 ttx/ttLib: use from fontTools import version as before 2016-10-10 15:26:04 +01:00