Behdad Esfahbod
e93e29125f
Don't write Format for Coverage, ClassDef, Single/Alternate/LigatureSubst
...
The format values for those are automatically handled in
postRead/preWrite to choose optimal format. As such, don't write them
in XML. Reduces noise.
Part of https://github.com/behdad/fonttools/issues/73
2013-12-17 03:06:10 -05:00
Behdad Esfahbod
6ed2eb4092
Write LookupType as a comment
...
We compute LookupType from the type of the subtables, so write it out
as an informative comment in XML as opposed to an element.
2013-12-17 02:57:29 -05:00
Behdad Esfahbod
5fec22bfcd
Compute correct LookupType when compiling font
...
Also ensures that all subtables of a lookup have the same
lookup type.
2013-12-17 02:42:18 -05:00
Behdad Esfahbod
ea82d6dfd1
Handle NULL coverage table in ligature substitute
...
Just to be in line with Single and Alternate subst.
2013-12-17 01:58:26 -05:00
Behdad Esfahbod
dafdb2933a
Further optimize table loading
...
Again, both faster and more memory efficient
2013-12-17 00:58:02 -05:00
Behdad Esfahbod
b4070bd629
Minor optimization of table loading
...
Is both faster and more memory efficient.
2013-12-17 00:44:33 -05:00
Behdad Esfahbod
283fb26820
By default, don't load fonts lazily
...
Lazy loading has implications on how people use objects.
So, by default, don't load lazily. This only affects
GSUB/GDEF/GPOS/etc and is closer to what fonttools used
to do traditionally.
Turn lazy loading on in subset and inspect.
2013-12-16 00:52:29 -05:00
Behdad Esfahbod
43d7ac16b1
py23 Similar encoding fix in post table
2013-12-16 00:05:14 -05:00
Behdad Esfahbod
9041c2ddcd
Actually add M_A_T_H_.py
2013-12-09 02:04:57 -05:00
Behdad Esfahbod
f952a22af7
Implement MATH table
...
Fixes https://github.com/behdad/fonttools/issues/67
2013-12-09 00:40:48 -05:00
Behdad Esfahbod
d76fa68785
Allow specifying table type as converter
...
Needed for upcoming MATH table.
2013-12-09 00:40:24 -05:00
Behdad Esfahbod
6bfee2cde5
Simplify Count writing
...
Needed for MATH table.
2013-12-09 00:35:15 -05:00
Denis Jacquerye
871495aff5
Add support for FontForge time stamp table
...
Fixes https://github.com/behdad/fonttools/issues/56
2013-12-08 19:32:21 -05:00
Behdad Esfahbod
6d658cf0ea
Minor
2013-12-07 16:06:10 -05:00
Behdad Esfahbod
b23b4cefda
Fix ClassDef
...
Ouch. Broke it in 63b257e677993295ee015e02b92ff438a5e91135.
2013-12-07 12:45:28 -05:00
Behdad Esfahbod
1a4f96b787
Remove total_ordering
...
Upon studying further, we don't need it. Since we only expect
comparing objects of the same type, just having __lt__ is enough.
2013-12-07 12:17:32 -05:00
Khaled Hosny
9c573019d5
Fix compiling back Times New Roman font
...
This has been broken since f2c2b4d38bd7bba23db71936262db984e4b7aebb,
assigning a new object to a function argument will not change the
original one, so we need to return the modified list.
2013-12-07 12:08:09 -05:00
Behdad Esfahbod
273a90074a
Return NotImplemented
2013-12-07 03:40:44 -05:00
Behdad Esfahbod
56da965344
Add @total_ordering to classes with __lt__
2013-12-07 03:35:16 -05:00
Behdad Esfahbod
8ea6439d3b
Implement __ne__ when __eq__ is defined
2013-12-06 22:25:48 -05:00
Behdad Esfahbod
98753abb91
Update table list for sbix
2013-12-06 19:55:29 -05:00
Behdad Esfahbod
de85e4599f
2to3 sbix code
...
This seems to work now.
At some point we should go back and clean up and merge datastructures
between the four different color font formats.
2013-12-06 19:53:28 -05:00
Behdad Esfahbod
1b8cde1b6f
Fix imports
2013-12-06 19:41:49 -05:00
Behdad Esfahbod
4801a3ae39
Whitespace
2013-12-06 19:40:00 -05:00
Behdad Esfahbod
f1394f3fdd
Initial sbix support from Jens Kutilek
2013-12-06 19:35:09 -05:00
Behdad Esfahbod
d0a85754fe
Remove unused data
2013-12-06 17:56:28 -05:00
Behdad Esfahbod
1112495ae5
Simplify mac_epoch_diff
2013-12-06 17:56:09 -05:00
Behdad Esfahbod
65d3a02d16
Simplify date parsing
2013-12-06 17:47:14 -05:00
Behdad Esfahbod
b8e1afa809
Use struct format 'Q' to read/write 64bit integers
2013-12-06 17:26:09 -05:00
Behdad Esfahbod
5e36f854aa
Remove redundant code
2013-12-06 17:16:57 -05:00
Behdad Esfahbod
650a38fffc
Relax some warnings
2013-12-04 22:52:57 -05:00
Behdad Esfahbod
e5bee3716e
Allow converting 'glyphXXX' to glyphID
...
There was an inconsistency: when allowVID was False, we were allowing
gid->glyphXXX, but not the reverse. This was allowing some fonts to
be loaded, but then not to be written back. Fix that.
2013-12-04 22:46:29 -05:00
Behdad Esfahbod
e06166b83a
Fix SingleSubstFormat1 modulo math
2013-12-04 22:46:11 -05:00
Behdad Esfahbod
ebefbbaa58
Minor
2013-12-04 22:07:18 -05:00
Behdad Esfahbod
9a980a8d2d
Minor
2013-12-04 22:00:31 -05:00
Behdad Esfahbod
43f6e36347
Simplify Coverage table postRead
2013-12-04 21:54:12 -05:00
Behdad Esfahbod
63b257e677
Handle out-of-range glyphIDs in ClassDef
2013-12-04 21:49:00 -05:00
Behdad Esfahbod
dc87372c88
Use True/False instead of 1/0
2013-12-04 21:28:50 -05:00
Behdad Esfahbod
f4e39bf363
Convert warning to warnings module
2013-12-04 21:17:13 -05:00
Behdad Esfahbod
9e6ef94b55
Use "is None" instead of "== None"
...
The latter hits the __eq__ method and can fail because we now
do not allow comparing objects of different types.
For example, was failing subsetting Andika-R.ttf.
2013-12-04 16:35:10 -05:00
Behdad Esfahbod
153ec40209
Fix a few pychecker warnings
...
Fixes https://github.com/behdad/fonttools/issues/58
2013-12-04 01:15:46 -05:00
Behdad Esfahbod
83e2f34194
Implement compiling to ClassDef Format=1
2013-12-02 03:06:44 -05:00
Behdad Esfahbod
f2c2b4d38b
Improve composite glyph bounds calculation
...
Extend GlyphCoordinates to transparently support float coordinates.
As a result, transformed glyph components now don't have their
coordinates rounded anymore. This slightly changes bounding box
calculations.
There's also code added, but disabled, to calculate exact glyph
bounding box, but we don't seem to actually want that.
2013-12-01 13:36:09 -05:00
Behdad Esfahbod
81acddadbd
Add optional progress to DefaultTable
...
Such that if dumping glyf/CFF failed and falling back to DefaultTable
implementation, toXML will match.
2013-12-01 04:05:40 -05:00
Behdad Esfahbod
f918ab4cf6
Fix typos
...
From
4d2d8c9642
2013-11-29 17:12:43 -05:00
Denis Jacquerye
af1c9968b2
from __future__ imports must be first for python 3.3.2
...
adding \ to break lines in fontTools/misc/transorm.py
unneeded closing parenthesis in T_S_I__1.py
2013-11-29 16:03:42 -05:00
Behdad Esfahbod
3fa26d783f
py23 Use fixedToFloat() for fixed version numbers
2013-11-28 18:53:30 -05:00
Behdad Esfahbod
1336105c31
py23 Use fixedToFloat() in glyf table
...
Sample output:
Before: <component ... scale="0.599975585938" flags="0x1004"/>
After: <component ... scale="0.6" flags="0x1004"/>
Now the Python 2 and 3 outputs agree on these.
2013-11-28 18:53:30 -05:00
Behdad Esfahbod
fd68c9d251
py23 Fixup SING/META tables
...
They have been totally broken for years.
2013-11-28 18:53:30 -05:00
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