Adrien Tétar
a4a3ae6d49
EBLC: fixes for py3 zip
...
Closes #909 .
2017-04-10 01:10:45 +02:00
Behdad Esfahbod
e5a9fd7faa
[otTables] When splitting PairPos subtable, don't set class=0
...
Doesn't matter when compiling to binary, but makes Python objects cleaner.
2017-04-06 15:34:00 +02:00
Behdad Esfahbod
33d57dc2c3
[glyf] Add getter to fetch raw array
2017-04-05 15:43:14 +02:00
Behdad Esfahbod
fdbf066a8c
[glyf] Add __bool__ / __nonzero__ to GlyphCoordintes
...
I'm really unhappy that doctests do NOT work anymore :(.
2017-04-05 15:43:14 +02:00
Cosimo Lupo
23511fd302
[varLib.merger] set ClassDef{1,2}.Format using same logic as otTables.ClassDef.preWrite
2017-03-14 16:14:08 +00:00
Sascha Brawer
ea1adf42a7
[AAT] Add Char64 converter for 64-byte ASCII character strings
...
Used by Apple Advanced Typography tables, for example `gcid`.
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gcid.html
https://github.com/fonttools/fonttools/issues/178
2017-03-10 20:20:22 +08:00
Cosimo Lupo
6731a906b4
[T_S_I_*] in VOLT's ascii tables, replace '\r' with '\n' when dumping XML
...
and viceversa, convert '\n' back to '\r' when reading from XML.
This restores the original newline handling of asciiTable, but only for VOLT's private tables.
2017-03-07 13:00:37 +00:00
Cosimo Lupo
996b4ba1bf
[asciiTable] don't normalize newlines when in {from,to}XML
...
b12a59c5e7 (commitcomment-21184558)
2017-03-07 12:59:32 +00:00
Behdad Esfahbod
b12a59c5e7
Actually add TTFA impl
2017-03-07 00:21:40 -08:00
Behdad Esfahbod
48bb7cda7c
Add 'TTFA' table
...
Apparently this is an ASCII table used by ttfautohint to record
used settings.
2017-03-06 18:08:19 -08:00
ReadRoberts
f208bf3421
1) Fold back in the changes introduced by Just van Possum in patch 744
...
2) Moved the C_F_F__2_test.py files and script under Tests/, paralleling what was done the C_F_F test files.
2017-03-05 22:53:05 +00:00
ReadRoberts
2b2aca1290
Add CFF2 support.
2017-03-05 22:53:04 +00:00
Cosimo Lupo
7562115fc4
move calculation of NumShorts from otTables to varLib.builder
2017-03-01 17:27:41 +00:00
Denis Moyogo Jacquerye
891405fd68
TupleVariation: round deltas before encoding ( #861 )
...
* TupleVariationTest.test_compileDeltaValues(): also test floats
* TupleVariation: round deltas before encoding
Python 3 was raising 'struct.error: required argument is not an integer' and Python 2 was truncating when deltas are floats
2017-02-24 08:58:41 -08:00
Sascha Brawer
706858646a
Preserve ordering of glyph alternates when round-tripping through TTX
...
Also fixes a bug where glyph alternates in MTI feature files were
wrongly sorted by glyph name. After this change, the output is using
the same ordering as in the input MTI feature file.
Fixes https://github.com/fonttools/fonttools/issues/833 .
2017-02-11 17:08:56 +01:00
Behdad Esfahbod
e45297bf4b
Populate defaults even for tables that have postRead
...
Implement custom populateDefaults for them.
2017-02-03 14:33:57 -08:00
Behdad Esfahbod
b887860b65
Fix compiling of MultipleSubstFormat1 with zero out glyphs
...
str.split('') returns [''], whereas we expect [].
Fix that.
2017-02-02 15:49:09 -08:00
Cosimo Lupo
3c46a4280f
[_g_l_y_f] use short empty element notation for glyf instructions
2017-01-24 18:33:57 +00:00
Cosimo Lupo
0918f7cf3e
[_g_l_y_f] factor out code for writing instructions in toXML
2017-01-24 17:33:53 +00:00
Cosimo Lupo
0aa086a94b
[_f_p_g_m] remove writer.newline() as it's now implied by self.program.toXML()
...
this also applies to table_p_r_e_p
2017-01-24 17:27:01 +00:00
Cosimo Lupo
f9071139b1
[ttProgram] don't write empty <assembly> or <bytecode> elements
...
That means that, when reading from XML, we fallback to empty lists in case 'assembly' or 'bytecode' attrs are not there.
2017-01-24 14:35:46 +00:00
Cosimo Lupo
499bc960f9
[_g_l_y_f/ttProgram] Move writer.newline() to Program.toXML()
2017-01-24 14:35:46 +00:00
Jens Kutilek
bbc9f63627
Use indentation amount from XMLWriter.indentwhite
2017-01-24 13:07:20 +01:00
Jens Kutilek
07e4f242b8
Fix linebreaks/indentation in instruction element
2017-01-24 13:05:58 +01:00
Jens Kutilek
bec499ac05
Indent XML output for TT assembly instructions
...
Indentation for TTX XMLF is 2 spaces. I chose 4 spaces for indentation of instructions to make it more noticeable. I hope it’s not a problem, because assembly code lines are usually very short.
2017-01-23 16:10:48 +01:00
Cosimo Lupo
78ad48eaf3
Move all *_test.py modules and test data to external Tests/ folder
2017-01-16 09:14:12 +00:00
Sascha Brawer
849734d5b5
[avar] Adjust avar header to OpenType 1.8.1 erratum
...
https://www.microsoft.com/typography/otspec/errata.htm
No behavioral changes, no changes in API, no changes in binary format.
Resolves https://github.com/fonttools/fonttools/issues/807
2017-01-13 15:46:20 +01:00
Sascha Brawer
3ef8b0dbba
[gvar] Add unit tests for gvar.fromXML() and gvar.toXML()
2017-01-11 15:35:56 +01:00
Sascha Brawer
f5465d6d6e
[gvar] Add unit tests for gvar.compile() and gvar.decompile()
2017-01-11 15:15:44 +01:00
Cosimo Lupo
49bcbb916b
consistently do sys.exit(unittest.main()) in all test modules
...
So that when run as scrips they report test failures with exit code
Follow up on b7bb391033ef3255c90134da3d7aef50d2d5326d
2017-01-11 13:05:35 +00:00
Behdad Esfahbod
0cc1721b8d
[MVAR] Update for OT 1.8.1 rename
2017-01-10 11:01:06 -08:00
Behdad Esfahbod
84c584cfc9
[cmap] When compiling format 0, fill in non-existing entries
...
Fixup for 88026de5100e4b3cedf0424bcc033f76782eb99e
Fixes https://github.com/fonttools/fonttools/issues/800
2017-01-10 10:48:48 -08:00
Sascha Brawer
155ec67ae6
[cvar] Implement cvar table
2017-01-10 17:57:04 +01:00
Sascha Brawer
7dd5c6e358
[cvar] Add test case for round-tripping TupleVariationStore for cvar
2017-01-10 10:52:19 +01:00
Sascha Brawer
6a67c6ee0f
[cvar] Fix crashing cvar compilation if deltas are None
2017-01-10 10:45:41 +01:00
Sascha Brawer
317c26418a
[cvar] Compile tuple variations whose deltas affect constants
2017-01-10 10:10:21 +01:00
Sascha Brawer
552b72c3d6
[gvar] Cosmetic cleanup of unit tests
2017-01-10 10:10:21 +01:00
Behdad Esfahbod
3e5335d335
When promoting a lookup to Extension type, set LookupType
...
Fixes https://github.com/fonttools/fonttools/issues/798
2017-01-09 19:52:32 -08:00
Sascha Brawer
689008a4f5
[gvar/cvar] Rename decompileVariationTuples to decompileVariationTupleStore
...
For consistency with the terminology of the OpenType 1.8 specification,
and for symetry with the compileVariationTupleStore function.
2017-01-09 19:00:39 +01:00
Sascha Brawer
5d3eae404c
[cvar] Compile TupleVariationStores in common library
2017-01-09 17:34:45 +01:00
Sascha Brawer
c3d68a684e
[cvar] Move compileSharedTuples() to module TupleVariation
2017-01-09 17:01:43 +01:00
Sascha Brawer
87d854e881
[cvar] Move decompilation of shared tuples to TupleVariation.py
2017-01-09 14:25:16 +01:00
Sascha Brawer
24a02fedd7
[cvar] Refactor decompilation of tuple variation stores
2017-01-09 14:05:52 +01:00
Sascha Brawer
625460836a
[cvar] Pass table tag to point decompilation routine
2017-01-09 13:23:51 +01:00
Sascha Brawer
de55ab2889
[cvar] Rename numPointsInGlyph to pointCount so it works for cvar
...
There are no glyphs in the `cvar` table.
2017-01-09 13:21:51 +01:00
Sascha Brawer
7c082600d3
[cvar] Move decompilation for single TupleVariation out of gvar
...
Rename local variables to match terminology of OpenType 1.8 specification
2017-01-09 12:14:12 +01:00
Behdad Esfahbod
dc1a3bdb1d
[OS/2] Don't fail if font does not have cmap table
2017-01-09 01:09:21 -08:00
Behdad Esfahbod
aeafda539b
Oops!
2017-01-09 00:38:46 -08:00
Behdad Esfahbod
e4d88b5a38
Extra protection
...
Fixes https://github.com/fonttools/fonttools/issues/797
Although for the XML->binary case, that bug was already fixed
on master because of the XML populate-default changes.
This adds extra protection!
2017-01-08 23:47:29 -08:00
Behdad Esfahbod
80535c224e
Fix XML->binary when LookupOrder is NOT specified
...
Fix for 495c6831e19ff9992fb801d2930e79c7d13736ae; bringing the intended
behavior documented in that commit.
2017-01-08 23:45:03 -08:00