Behdad Esfahbod
c5c942293a
[./fonttools] Add ./Lib to python path
...
See f5bf9b04de (commitcomment-19636642)
2016-10-31 11:55:15 -07:00
Behdad Esfahbod
f5bf9b04de
Add a 'fonttools' command-line tool that simply runs modules
...
ttx is now equivalent to:
$ fonttools ttx
pyftsubset can be called as:
$ fonttools subset
varLib can be called as:
$ fonttools.varLib
Also adds a executable at toplevel called fonttools, such that
with "./fonttools ..." one can run stuff without installing.
Python seems to automatically include ./Lib into its search path.
2016-10-30 15:19:29 +02:00
Behdad Esfahbod
a71faf9322
[perimeterPen] 5x speed-up cubic by using complex numbers as points
2016-10-30 14:28:38 +02:00
Behdad Esfahbod
c5538eaccf
[perimeterPen] Speed up quadratic by using complex numbers for points
2016-10-30 14:28:33 +02:00
Behdad Esfahbod
3a4f1fb170
[Snippets/interpolatable] Skip incompatible glyphs
2016-10-30 14:28:07 +02:00
Behdad Esfahbod
a284865851
Remove unused line
2016-10-30 14:28:07 +02:00
Sascha Brawer
14509af47c
[fvar] Include either all PostScript names, or none
...
The table structure requires that all named instances have the same
record size. Slightly refactored the compilation code to make the
logic easier to understand/maintain.
2016-10-25 00:09:31 +02:00
Sascha Brawer
248336a0fb
Add test case for glyph names with backslash
...
Resolves https://github.com/fonttools/fonttools/issues/457
2016-10-24 22:39:59 +02:00
Cosimo Lupo
38e71cf45a
Merge pull request #276 from moyogo/os2format4
...
warn when fsSelection bits aren’t defined or don’t match head.macStyle bits
2016-10-24 11:20:33 +01:00
moyogo
49ac9ba5cb
OS/2: fsSelection bits 0 and 5 should match head.macStyle bits 1 and 0
2016-10-24 10:03:50 +01:00
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
moyogo
b5002eb5d4
OS/2: if fsSelection bit 6 is on bits then 0 and 5 must be clear
2016-10-22 13:06:30 +01:00
moyogo
c46423df3a
OS/2: warn when fsSelection bits defined in version 4 are on but version < 4
2016-10-22 13:06:30 +01: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