Behdad Esfahbod
ea958e72e4
[varLib] Implement effective-kern-pair from PairPosFormat2
2016-10-23 14:09:49 +02:00
Behdad Esfahbod
b563e6673c
[varLib] Implement GPOS binary interpolation for PairPosFormat1
2016-10-22 22:47:18 +02:00
Cosimo Lupo
8089d64aec
Merge pull request #717 from anthrotype/round-hmtx
...
[hmtx/vmtx] Round float values to int
2016-10-21 14:20:19 +01:00
Cosimo Lupo
0ab640c4bc
[_h_m_t_x_test] add test for rounding floats
2016-10-21 12:42:01 +01:00
Cosimo Lupo
5e3734c91e
[_h_m_t_x] round float values to int
...
No need to issue warnings, as we don't do that either for glyf coordinates.
Fixes #593
2016-10-21 12:40:00 +01:00
Cosimo Lupo
048e995e41
Merge pull request #714 from anthrotype/xmlwriter-newlinestr
...
[ttx/xmlWriter] allow to override OS-specific line endings
2016-10-20 18:15:24 +01:00
Cosimo Lupo
ce609addd0
[ttx] add --newline option to explicitly control line endings
2016-10-20 17:22:12 +01:00
Cosimo Lupo
2552d224a3
[testTools] use 'newlinestr' for makeXMLWriter() helper function
2016-10-20 16:57:49 +01:00
Cosimo Lupo
543be9cfbf
[xmlWriter_test] test custom 'newlinestr' values in XMLWriter constructor
2016-10-20 16:56:41 +01:00
Cosimo Lupo
d235e124b4
[ttLib] add 'newlinestr=None' kwarg to TTFont.saveXML, passed on to XMLWriter instances
2016-10-20 16:54:31 +01:00
Cosimo Lupo
d874782ee4
[xmlWriter] add 'newlinestr' argument for overriding os-specific line endings
...
By default (newlinestr=None), the XMLWriter will still use the `os.linesep` as the
newline string.
Otherwise, it will use the specified `newlinestr`.
This is useful when TTX files under version control are being written from
multiple platforms; in which case, one usually wants to always use one
specific line ending (most likely LF, which is what the XML spec itself
normalizes it to).
2016-10-20 16:53:07 +01:00
moyogo
678876325e
Add hhea tests
2016-10-18 18:18:09 +02:00
moyogo
004a5b7361
feaLib: hhea tableVersion = 0x00010000
2016-10-18 18:18:09 +02:00
moyogo
5b785950f8
feaLib: add test for vhea
2016-10-18 18:18:09 +02:00
moyogo
f55c60c4df
feaLib: add vhea table
2016-10-18 18:18:09 +02:00
moyogo
074f6ea009
Add vhea tests
2016-10-18 18:18:09 +02:00
moyogo
bd4d43e7c5
feaLib: hhea test with hex version
2016-10-18 18:18:09 +02:00
moyogo
6e85a6c4fb
otConverters: use fixedTools fixedToVersion() and versionToFixed()
2016-10-18 18:18:09 +02:00
moyogo
cf2c6ec127
vhea: tableVersion as L instead of 16.16F, hex in XML
2016-10-18 18:18:09 +02:00
moyogo
f67d0eb826
hhea: tableVersion as L instead of 16.16F, hex in XML
2016-10-18 18:18:09 +02:00
moyogo
f591e8c503
fixedTools: add ensureVersionIsLong() and versionToFixed()
2016-10-18 18:18:09 +02:00
moyogo
d7a3ae3f3d
vhea: vhea.reserved0 should be vhea.caretOffset
2016-10-18 18:18:09 +02: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
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
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