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
f3a8aeada3
Remove unused fontTools.misc.psOperators
2013-11-24 19:59:07 -05:00
Behdad Esfahbod
e0f84aabfa
Remove unused fontTools.misc.psLib
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
188f2a398a
Default to non-lazy for ttx
2013-11-24 19:04:25 -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
c386d54fe3
Allow passing in locals variables to safeEval()
2013-11-24 09:37:49 -05:00
Behdad Esfahbod
601bb94afc
Minor
...
Followup for 6e556aafc3be5ccf48a01d8113313abd2a633ba6.
2013-11-23 20:20:39 -05:00
Behdad Esfahbod
ffc3cfeed1
Allow using binary / octal / hex numbers in XML
...
In OpenType Layout tables that is. Most (all) of the other
tables already use safeEval() which accepts these kinds of
things.
2013-11-23 20:18:24 -05:00
Behdad Esfahbod
a221a57ccd
Improve Version handling
...
Version is really just a major.minor, NOT a Fixed. But it has
been implemented as Fixed. We now:
1. Check that major is 1,
2. If minor is not 0 (only defined for GDEF so far), then
print the whole thing as hex in XML,
3. When reading the XML, accept hex,
4. In all four methods dealing with Version, support both
fixed version (ie. 1.0), and long version (ie. 0x00010000).
2013-11-23 19:45:29 -05:00
Behdad Esfahbod
0b18ef6111
Remove Fixed vs fixed32 inconsistency
2013-11-23 19:21:24 -05:00
Behdad Esfahbod
ea017bd66f
Remove USHORT vs uint16 inconsistency
2013-11-23 19:19:48 -05:00
Behdad Esfahbod
5962268b79
Remove unused "LONG" converter
...
LONG was replaced by Fixed long time ago.
2013-11-23 19:18:53 -05:00
Behdad Esfahbod
0de65295f6
Remove script to build otData.py
...
The was was originally generated, but is static now and this
allows cleaning it up and modifying it.
2013-11-23 19:12:11 -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
fc10b20c25
Minor
2013-11-20 21:50:16 -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
Behdad Esfahbod
98769437cd
[subset] Fix against missing AttachList entries
2013-11-19 14:40:57 -05:00
Olivier Berten
70343cc48e
Catch TTLibError raised when missing (or wrong) -y argument on a ttc file
2013-11-19 10:32:09 +01:00
Behdad Esfahbod
1117445fab
[subset] Protect against missing rulesets
...
Fixes subsetting Molengo-Regular.ttf.
2013-11-18 20:20:49 -05:00
Olivier Berten
aa37c0aa7d
Support for OS/2 table version 5 as proposed by Microsoft
...
https://github.com/fontforge/fontforge/issues/956
2013-11-19 00:44:38 +01:00
Paul Wise
0fff29aee5
Switched VCS from Subversion to git.
2013-11-19 00:37:29 +01:00
Behdad Esfahbod
fc4f438496
Fix parsing of hinting instructions that end in a PUSHB
...
Sounds useless, but MReifutaiM-Regular.ttf seems to have that, and the
parsing back from XML was failing because we expected a token whereas
after dropping whitespace there wasn't any left.
2013-11-18 16:06:01 -05:00
Behdad Esfahbod
17700bf926
Handle and warn about out-of-order Coverage table entries
...
Apparently the SIL Gentium fonts have wrong sorting in Coverage
tables. That's broken by the spec, but shapers still work with
such fonts. So, we warn when reading, and when writing, such
out-of-order coverage tables.
2013-11-18 16:05:00 -05:00
Behdad Esfahbod
846d09e380
Allow None for globalSubrs in T2CharString
2013-11-18 14:11:30 -05:00
Behdad Esfahbod
7e97247925
[subset] Handle inexistent feature / lookup lists
2013-11-15 17:57:15 -05:00
Behdad Esfahbod
6e70667659
Support loading broken Coverage tables
...
Hit by Google Fonts's font "Cabin" for example and a handful
of others.
2013-11-15 17:00:38 -05:00
Behdad Esfahbod
db0b1b8a34
Update to AGLFN version 1.7
...
Patch from Miguel Sousa.
Fixes https://github.com/behdad/fonttools/pull/18
2013-11-14 22:35:26 -05:00
Behdad Esfahbod
271f25feed
More fixup
2013-11-14 21:57:25 -05:00