430 Commits

Author SHA1 Message Date
Behdad Esfahbod
ecbe4c87b5 2to3 --fix=numliterals with manual cleanup 2013-11-27 03:37:29 -05:00
Behdad Esfahbod
97dea0a5d0 2to3 --fix=xrange 2013-11-27 03:34:48 -05:00
Behdad Esfahbod
3a9fd30180 2to3 equivalent to --fix=tuple_params
I hope I got this all right...
2013-11-27 03:30:21 -05:00
Behdad Esfahbod
dc7e6f3e55 2to3 --fix=repr 2013-11-27 02:44:56 -05:00
Behdad Esfahbod
cd5aad92f2 2to3 --fix=raise 2013-11-27 02:42:28 -05:00
Behdad Esfahbod
180ace6a5f 2to3 --fix=ne 2013-11-27 02:40:30 -05:00
Behdad Esfahbod
2b06aaa2a6 2to3 --fix=import 2013-11-27 02:34:11 -05:00
Behdad Esfahbod
bc5e1cb195 2to3 --fix=has_key 2013-11-27 02:33:03 -05:00
Behdad Esfahbod
66214cbe8c 2to3 --fix=apply 2013-11-27 02:18:18 -05:00
Behdad Esfahbod
3ac9e63fce Load / save FeatureParamSize decipoints values as float 2013-11-26 19:42:55 -05:00
Behdad Esfahbod
862b14722f Improve OS/2 format 5 compile 2013-11-26 19:33:49 -05:00
Behdad Esfahbod
9e1bd2d0b4 Implement FeatureParams
All types of FeatureParams are correctly handled now.

The only thing not handled is broken fonts generated with the
old AFDKO that have their FeatureParams offset computed wrong.
I don't currently plan on handling those.

Fixes https://github.com/behdad/fonttools/issues/38
2013-11-26 19:23:08 -05:00
Behdad Esfahbod
7ab0cb0b09 Fixup cmap lazy loading 2013-11-26 19:22:13 -05:00
Behdad Esfahbod
cb4adf6828 Fix XML->ttf for fonts that have some missing anchors, etc
Eg. EBGaramond12-Regular.ttf.  It has a base anchor missing.
Dropping the empty table from XML changes the size of the base
anchor array, which will then result in an assertion because
all bases should have the same array length.

Fixes many other broken fonts too.
2013-11-26 18:55:23 -05:00
Behdad Esfahbod
2f2fd9ca7c Minor 2013-11-26 18:43:43 -05:00
Behdad Esfahbod
1f0eed8459 Minor 2013-11-26 18:41:53 -05:00
Behdad Esfahbod
f4e61ae637 Undo making subReader lazy
Need this for upcoming FeatureParams implementation.
2013-11-26 17:37:03 -05:00
Behdad Esfahbod
79f734414c Further simplify OTTableReader/Writer 2013-11-26 17:07:37 -05:00
Behdad Esfahbod
13a08d0c3a When compiling cmap format 6, fill in missing codes
They should just map to glyph 0.

Fixes https://github.com/behdad/fonttools/issues/42
2013-11-26 15:49:36 -05:00
Behdad Esfahbod
67eded5efa Remove obsolete comment 2013-11-25 18:23:12 -05:00
Behdad Esfahbod
f1e8c3e8a0 Minor 2013-11-25 08:09:48 -05:00
Behdad Esfahbod
b3c860477c Remove workaround for buggy OS/2 tables
Those fonts should all be gone by now...
2013-11-25 07:27:43 -05:00
Behdad Esfahbod
88a1fabd06 Assert on size of OS/2 version 5
As to reject new bogus fonts.
2013-11-25 07:23:51 -05:00
Behdad Esfahbod
170fc9d40f Use true point sizes in new OS/2 version 5 fields 2013-11-25 07:21:10 -05:00
Behdad Esfahbod
6f3772bcb4 Merge pull request #27 from olivierberten/os2_v5
Support for OS/2 table version 5 as proposed by Microsoft
2013-11-25 04:12:44 -08:00
Behdad Esfahbod
e0c2e8e2af Fixup extension / longoffset 2013-11-25 05:32:17 -05:00
Behdad Esfahbod
f41056dc76 Implement MarkFilteringSet in Lookup 2013-11-25 05:18:00 -05:00
Behdad Esfahbod
4c2f1b6a2c [REGRESSION] _h_m_t_x.py", line 60, in compile metrics = sum(metrics,[])
TypeError: can only concatenate list (not "tuple") to list

Fixes https://github.com/behdad/fonttools/issues/30
2013-11-25 04:47:36 -05:00
Behdad Esfahbod
5b9cabcb9a Implement GDEF MarkGlyphSetsDef
Aka. "Mark filtering sets".

Fixes https://github.com/behdad/fonttools/issues/39
2013-11-25 04:01:56 -05:00
Behdad Esfahbod
6b6e9fae23 Rename repeatOffset to aux
To be used for other purposes soon.
2013-11-24 22:11:41 -05:00
Behdad Esfahbod
d58c38dc36 Seprate longOffset from ExtSubTable 2013-11-24 21:58:53 -05:00
Behdad Esfahbod
fe67e3121e Simplify ExtSubTable 2013-11-24 21:35:56 -05:00
Behdad Esfahbod
58acba2d02 Remove "optimization" re Extension lookups
Historically, Extension lookups were only decompiled upon access,
and decompiled Extension lookups were possibly copied verbatim to
output when compiling.  This discrepancy with all other table types
is confusing and undeed.  The possible time saving is not worth the
loss in possible optimization of table data.  Remove.
2013-11-24 20:08:05 -05:00
Behdad Esfahbod
9e4b640932 Remove unused and unmaintained fontTools.ttLib.test.ttBrowser 2013-11-24 19:59:07 -05:00
Behdad Esfahbod
bdc5a99846 Remove unused method 2013-11-24 19:59:07 -05:00
Behdad Esfahbod
3d8d5cd10d Port ttLib to respect font.lazy
I *hope* I didn't break anything...

Notably, cffLib is not ported yet.
2013-11-24 19:58:57 -05:00
Behdad Esfahbod
7ef23a85ae Add font.lazy 2013-11-24 19:03:18 -05:00
Behdad Esfahbod
3ebfea491e Move fontTools.ttLib.importXML to fontTools.misc.xmlReader
Better matches xmlWriter.
2013-11-24 19:00:59 -05:00
Behdad Esfahbod
38fdae6342 Use True/False instead of 1/0 2013-11-24 18:49:35 -05:00
Behdad Esfahbod
c491f45eff Create subReaders lazily
Should improve memory usage
2013-11-24 18:28:20 -05:00
Behdad Esfahbod
e84f9fd1b5 Minor 2013-11-24 18:15:47 -05:00
Behdad Esfahbod
0fac7fe320 Remove unused parameter 2013-11-24 18:15:47 -05:00
Behdad Esfahbod
ee27eb8517 Only propagate counts that are used in sub-tables 2013-11-24 18:15:47 -05:00
Behdad Esfahbod
2edc2da303 Use tableDict for DeltaValue lookbacks
Was abusing the set/getCount machinery before.
2013-11-24 17:10:55 -05:00
Behdad Esfahbod
078b36325d Instead of countVars, pass down tableDict
This is the tableDict of current struct being loaded.  This does NOT
get propagated down.

Currently unused.
2013-11-24 17:08:06 -05:00
Behdad Esfahbod
7981704a0a Move countVars into reader/writer objects
The countVars arguments are all unused now.  Cleanup coming.
2013-11-24 16:59:42 -05:00
Behdad Esfahbod
7d130307e6 Simplify converter mapping for DeltaValue 2013-11-24 16:13:00 -05:00
Behdad Esfahbod
6f9b64f296 Fixup 41caf2d for DeltaValue tables
Not that I can find any fonts having these... Had to construct one
to test.
2013-11-24 16:09:57 -05:00
Behdad Esfahbod
24f978ccc6 Fixup 41caf2d
Lexical binding...

Fixes https://github.com/behdad/fonttools/issues/40
2013-11-24 15:09:49 -05:00
Behdad Esfahbod
601bb94afc Minor
Followup for 6e556aafc3be5ccf48a01d8113313abd2a633ba6.
2013-11-23 20:20:39 -05:00