Behdad Esfahbod
e388db566b
py23 Use new-style classes
...
Such that we get the same semantics in both Python 2 and 3.
2013-11-28 18:53:30 -05:00
Behdad Esfahbod
c0a9d697f6
Simplify read/writeUint24()
2013-11-28 17:32:44 -05:00
Behdad Esfahbod
18316aa769
ps23 More bytes fixes. All ''join()'s fixed
2013-11-28 17:32:43 -05:00
Behdad Esfahbod
821572c9a9
py23 Add bytesjoin()
2013-11-28 17:32:43 -05:00
Behdad Esfahbod
b7fd2e1913
py23 Remove uses of __cmp__ and cmp()
2013-11-28 17:32:42 -05:00
Behdad Esfahbod
960280bbd6
py23 Use more Tag()
2013-11-28 17:32:42 -05:00
Behdad Esfahbod
319c5fd10e
py23 introduce byteord() and use it
2013-11-28 17:32:42 -05:00
Behdad Esfahbod
32c10eecff
py23 from __future__ import division and adjust divisions
2013-11-28 17:32:42 -05:00
Behdad Esfahbod
30e691edd0
py23 from __future__ import print_function
2013-11-27 17:27:45 -05:00
Behdad Esfahbod
b7a2d797a4
py23 Use bytechr() instead of chr()
2013-11-27 15:25:00 -05:00
Behdad Esfahbod
7ed91eca1e
py23 import in all nontrivial source files and unused import cleanup
2013-11-27 15:25:00 -05:00
Behdad Esfahbod
b774f9f684
2to3 --fix=types manual additions
...
Don't know why the tool didn't catch these.
2013-11-27 14:01:44 -05:00
Behdad Esfahbod
3ec6a25823
2to3 --fix=print with manual fixup
2013-11-27 04:57:33 -05:00
Behdad Esfahbod
ac1b435946
2to3 --fix=idioms
2013-11-27 04:15:34 -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
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
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
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
67eded5efa
Remove obsolete comment
2013-11-25 18:23:12 -05:00
Behdad Esfahbod
e0c2e8e2af
Fixup extension / longoffset
2013-11-25 05:32:17 -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
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
bdc5a99846
Remove unused method
2013-11-24 19:59:07 -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
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
Behdad Esfahbod
3879cf9439
Use slots for OTTableReader
...
Slight performance gain even.
2013-11-22 19:34:57 -05:00
Behdad Esfahbod
6e556aafc3
Make ValueRecordFactory() immutable
...
Gives another 3% speedup.
2013-11-22 19:34:46 -05:00
Behdad Esfahbod
41caf2dea1
Remove tableStack in favor of countVars
...
We only needed tableStack to look back for counts. So, just store
counts. Gives ~8 speedup for large fonts I tested. We are not
faster than not loading fonts lazily without this patch, so the
laziness patch combined with this doesn't have a net negative
performance impact anymore.
2013-11-22 19:13:14 -05:00
Behdad Esfahbod
0585b64f70
Minor
2013-11-22 16:46:03 -05:00
Behdad Esfahbod
d01c44a59b
When lazy-loading tables, copy ValueFormat
...
Otherwise it may be overwritten before we use it.
2013-11-22 15:21:41 -05:00
Behdad Esfahbod
f50d0dff86
Load all OpenType sub-structures lazily
...
Huge win for subsetter and anyone else who doesn't need the entire
tables. Subsetting a huge font (eg. NotoSans-Regular.ttf) to a
small set (say, main Cyrillic characters) is something like six
times faster now. Bulk of time was being spent in blowing up the
GPOS kerning pairs and attach points. Now we don't load those if
they won't be in the final subset.
Slight slowdown for usecases that need the entire table.
2013-11-20 19:07:08 -05:00
Behdad Esfahbod
5988cc32cb
Make BaseTable a new-style object
2013-11-19 17:40:46 -05:00