ReadRoberts
dee5cfee2f
remove duplicated logic in C_F_F_2.py by subclassing from C_F_F_.py.
2017-06-20 16:23:52 -07:00
Behdad Esfahbod
3db5be2195
[gvar] Remove GlyphCoordinates.__abs__()
...
It's not wel-defined, as abs typically is supposed to return a scalar...
Also combine the tolerance-check with the zero-check in varLib.
2017-05-18 16:06:10 -07:00
Behdad Esfahbod
e46f94950c
Change GlyphCoordinates.__bool__() semantics...
...
...to match those of other iterables.
I confused myself once already by having "if not delta" where delta was a list,
not GlyphCoordinates...
2017-05-18 16:06:10 -07:00
Behdad Esfahbod
3ece5d842c
[TupleVariation] Copy items in constructor
...
Avoids surprises when aller modifies those same objects.
2017-05-18 16:06:10 -07:00
Cosimo Lupo
71486bc0a9
[_g_l_y_f] use 'd' instead of 'f' as array.array typecode in GlyphCoordinates
...
Fixes #963
2017-05-16 10:50:56 +01:00
Jens Kutilek
6d5ebcc4a9
Change name of MaxpValues to CompositeMaxpValues
2017-05-04 12:35:09 +02:00
Jens Kutilek
d1cf59d2c9
Use a namedtuple for maxp values
2017-05-04 12:28:02 +02:00
Sascha Brawer
017fa4e9c6
[fvar] Expose flags in XML
...
Fixes https://github.com/fonttools/fonttools/issues/932 .
2017-05-02 00:51:44 +08:00
Sascha Brawer
3f839878eb
[name] Fix issues with name.addMultilingualName()
...
Fixes https://github.com/fonttools/fonttools/issues/931 .
2017-04-21 13:14:24 +08:00
Sascha Brawer
a5c8977dd3
[name] Fix platform ID for names whose language code is in ltag
table
...
https://github.com/fonttools/fonttools/issues/931
2017-04-20 17:38:31 +08:00
Sascha Brawer
e8530360bd
[name] Add helper for building multi-lingual names
...
Fixes https://github.com/fonttools/fonttools/issues/921 .
2017-04-19 02:26:32 +08:00
Sascha Brawer
068ca5afbb
[ltag] Helper method for adding language tags
2017-04-18 18:15:32 +08:00
Behdad Esfahbod
806b7dcd8d
Minor
2017-04-14 14:30:51 -07:00
Behdad Esfahbod
e886617ab0
[avar] Remove fixupSegments
...
Fixes https://github.com/fonttools/fonttools/issues/923
2017-04-13 15:50:44 -07:00
Cosimo Lupo
cca1d20b0e
[loggingTools] added LogMixin class
...
This is useful to quickly add logging functionality to classes, and
to reduce boilerplate.
It adds a 'log' property to the class inheriting from it, which uses
logging.getLogger to get a logging.Logger (sigleton) object named after
<module>.<class> of self.
2017-04-11 18:40:52 +01:00
Cosimo Lupo
f1e9bf30e4
[TSI*] Added docstrings to explain the purpose of VTT private tables
2017-04-11 10:01:47 +01:00
Cosimo Lupo
6567a8bc92
[TSI0] return empty byte string if no 'indices' attribute is set
...
previously it was returning a str on python3
2017-04-10 20:53:02 +01:00
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
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