1050 Commits

Author SHA1 Message Date
Behdad Esfahbod
2d3610bb6b Ignore class=0 when reading & writing ClassDef objects
class=0 items might be added as an optimization.  They have no semantic value.
Ignore them.

Fixes the last of mtiLib tests.
2016-12-26 17:26:14 -05:00
Behdad Esfahbod
101303ab50 [mtiLib] Fix two more tests 2016-12-26 17:14:39 -05:00
Cosimo Lupo
689d0c3fe4
set maxDiff=None attribute only once, using setUpClass method of unittest.TestCase 2016-12-21 13:57:44 +00:00
Cosimo Lupo
f112a05be2
adjust unit tests to expect a list of strings from getXML() 2016-12-21 13:57:44 +00:00
Denis Moyogo Jacquerye
d2f5c63fef STAT: test_compile_* tests (#783) 2016-12-21 10:53:32 +01:00
Denis Moyogo Jacquerye
71df2fe7d5 Add MVAR tests (#781)
* MVAR: add decompile_toXML test

* MVAR: add test_compile_fromXML

* M_V_A_R_test.py: if __name__ == '__main__'
2016-12-21 08:33:55 +01:00
Behdad Esfahbod
d9e915c925 Fix compile of MVAR and STAT tables 2016-12-19 18:21:11 -06:00
Behdad Esfahbod
b4d53811e9 Implement MVAR table 2016-12-18 21:55:45 -06:00
Sascha Brawer
fcd697a328 [STAT] Add test case for decoding version 1.1 of STAT table 2016-12-13 09:44:03 +01:00
Denis Moyogo Jacquerye
250017289b Revert "[STAT] It was decided to NOT bump minor version..."
This reverts commit 06de8ce81824f737a1e35bfb00b1f68db767037e.
2016-12-12 16:42:55 +00:00
Behdad Esfahbod
06de8ce818 [STAT] It was decided to NOT bump minor version...
...since no one implements STAT so far.  So, version stays at 1.0.
2016-12-07 18:11:50 -08:00
Behdad Esfahbod
9ca34a08ec [STAT] Update for version 1.1; hasn't made it into spec yet! 2016-12-04 21:22:47 -08:00
Sascha Brawer
0de6e8d4ff Update table list for STAT table 2016-12-02 19:14:32 -08:00
Sascha Brawer
e32762024c [STAT] Fix unit tests 2016-12-02 19:12:26 -08:00
Sascha Brawer
8b78a7890f [STAT] Fix unit tests and implementation of STAT table
Still need to look at one failing test case. Disabling it for now.
2016-12-02 15:26:49 -08:00
Sascha Brawer
84da076bb9 [STAT] Fix one test case 2016-12-02 14:54:03 -08:00
Sascha Brawer
82b8af68c5 Fix names in test case for STAT table AxisValue format 3 2016-12-02 14:26:59 -08:00
Behdad Esfahbod
d80bb58723 More STAT 2016-12-02 14:14:48 -08:00
Behdad Esfahbod
913b3c477c Finish STAT table
Test needs fix.
2016-12-02 14:06:13 -08:00
Sascha Brawer
59368c424a WIP: Implement STAT table 2016-12-02 13:37:42 -08:00
Masaya Nakamura
08a0d550db Fix "Private Use (plane 15)" range
https://twitter.com/ken_lunde/status/796564061206913024
https://www.microsoft.com/typography/otspec/errata.htm
2016-11-21 11:26:57 +09:00
moyogo
acfb137881 OS2/2: fix checking fsSelection bits matching head.macStyle bits 2016-11-03 11:37:00 +00:00
Cosimo Lupo
dcb72536a0
[C_F_F_test] strip ttFont's 'ttLibVersion' attribute because it may change 2016-11-02 10:05:10 +00:00
Behdad Esfahbod
904b1c5942 Support splitting PairPosFormat1 tables
Fixes https://github.com/googlei18n/fontmake/issues/143
2016-11-01 18:15:21 -07: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
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
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
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
d235e124b4 [ttLib] add 'newlinestr=None' kwarg to TTFont.saveXML, passed on to XMLWriter instances 2016-10-20 16:54:31 +01:00
moyogo
678876325e Add hhea tests 2016-10-18 18:18:09 +02:00
moyogo
074f6ea009 Add vhea tests 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
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
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
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
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
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
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
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
Cosimo Lupo
b1fae3fe32 ttx/ttLib: use from fontTools import version as before 2016-10-10 15:26:04 +01:00