Cosimo Lupo
be9784c916
[TSI0] use unsigned 'L' instead of signed 'l' as textOffset format
...
https://gitter.im/caryll/otfcc?at=58eb78288bb56c2d1192d56c
2017-04-10 19:47:48 +01:00
Cosimo Lupo
0e56002348
[TSI1] Fix computation of the textLength of VTT private tables entries
...
https://gitter.im/caryll/otfcc?at=58e28b284cb8d091735567fe
Thanks Belleve Invis! ;)
2017-04-10 19:47:48 +01:00
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
justvanrossum
8327d73dee
Edge case: Fix logic in choosing CFF vs glyf so we get the correct error if the font has neither.
2017-04-01 14:30:17 +02:00
justvanrossum
5ccc1ec59c
removed unneeded slice/copy, leftover when upgrading from .sort() to sorted()
2017-03-31 00:07:03 +02:00
Cosimo Lupo
6ac3523d74
[_TTGlyphSet] fetch height and tsb from vmtx if available
...
The width and lsb from hmtx are already there
Fixes #893
https://github.com/fonttools/fonttools/pull/880#issuecomment-288558012
2017-03-23 12:51:16 +00:00
Behdad Esfahbod
a2b23811a2
Merge pull request #887 from fonttools/class-kern-merge
...
[varLib.merger] Fix interpolating PairPos Format 2
2017-03-16 16:03:34 -07: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
justvanrossum
b05f2039b5
added missing import
2017-03-14 12:00:13 +01: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
Cosimo Lupo
46d487c728
the Zopfli bindings are finally available from PyPI, change url in the docstring
2017-03-01 14:01:15 +00:00
Cosimo Lupo
8af488a1b3
Revert "explicitly require 'head' table in TTFont.save()"
...
This reverts commit b39f3b613c861539f9ae6e18f5064979f7ad6365.
Requiring 'head' makes it hard to build partial fonts
See https://github.com/fonttools/fonttools/pull/854#issuecomment-283177719
2017-02-28 22:48:28 +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
Cosimo Lupo
b39f3b613c
explicitly require 'head' table in TTFont.save()
...
it's implicitly required anyway, e.g. by ttx's ttCompile, maxp's recalc, OS/2 compile, etc.
2017-02-21 12:57:34 +00:00
justvanrossum
9de3d1a5ae
tweak comment
2017-02-21 13:47:30 +01:00
justvanrossum
c5aa43238f
Make sure to load the 'head' table when recalculating the time stamp. Fixes #847 .
2017-02-21 13:45:50 +01: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
63f5253ec7
[ttLib] don't close stdout in TTFont.saveXML()
...
otherwise when dumping multiple TTX to standard output it raises:
ValueError: I/O operation on closed file
2017-01-18 12:06:46 +00: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