Behdad Esfahbod
4362cb49f3
In getGlyphSet(), pull glyph advance from hmtx even for CFF fonts
...
That's the right thing to do.
Also fixes this:
https://github.com/robofab-developers/robofab/issues/28
2015-01-08 12:53:58 -08:00
Behdad Esfahbod
8ef5adc4af
Move draw() implementation to a better place
2015-01-08 12:28:42 -08:00
moyogo
450faba7c3
Res is not available in Python 3
2014-11-21 17:07:55 +00:00
Khaled Hosny
f329808703
Fix: 'list' object has no attribute 'tolist'
2014-09-21 19:18:46 +03:00
Behdad Esfahbod
aeeb884b4c
[ttx] Always add raw=True attribute when dumping DefaultTable to XML
...
Needed to avoid surprises when we add new table implementations.
Recently we added VDMX table, and that broke build of projects using
VDMX with DefaultTable, eg:
https://github.com/behdad/fonttools/issues/151
2014-08-24 13:01:27 -04:00
Behdad Esfahbod
e6adebdc4a
Make glyf-table glyph loading lazy by default
...
When I added the font.lazy setting, I made glyf table non-lazy
by default. This is helpful to users who typically access glyphs
like:
glyf_table.glyphs[glyfname]
instead of the correct way:
glyf_table[glyfname]
and also forget to call expand() on the glyph. However, this
significantly slows down most scripts that load the font without
lazy=True... As such, add a third mode to laziness. By default
lazy=None and does NOT expand glyphs. If lazy=False is passed
in, all glyphs are loaded.
I hope this is an acceptable middle ground and not too confusing.
2014-07-14 20:02:37 -04:00
Behdad Esfahbod
9f23ee4cc8
Change cmap-based duplicate-name resolution from n^2 to linear time
...
Similar to 85be2e0a9773acec3c6d14c345b1fd94ab3aa5c3, though much
harder to hit.
2014-06-02 18:09:47 -04:00
Behdad Esfahbod
62dd7b2a0e
Refactor getSearchRange()
2014-05-27 16:01:47 -04:00
Behdad Esfahbod
3012076942
Minor
2014-05-19 12:43:37 -06:00
Behdad Esfahbod
497863a190
Allow disabling 'head' table modified-timestamp recalculation
...
Part of:
https://github.com/behdad/fonttools/issues/115
https://github.com/behdad/fonttools/issues/46
2014-05-01 15:13:22 -07:00
Behdad Esfahbod
4bb028e44f
Fix identifierToTag for Python 3
2014-03-28 15:18:14 -07:00
Behdad Esfahbod
50d6c7298a
Minor
2014-03-28 14:32:24 -07:00
Behdad Esfahbod
d0a31f5a43
Make tag parameter to table constructor optional
...
If not provided, extract from class name.
2014-03-28 14:04:01 -07:00
Behdad Esfahbod
1ae29591ef
from __future__ import absolute_import
...
Such that our Python 2 is closer to Python 3.
Part of https://github.com/behdad/fonttools/issues/77
2014-01-14 15:07:50 +08:00
Behdad Esfahbod
9c5e2ce1b6
Add a get() method to TTFont ala dict.get()
2013-12-19 11:38:56 -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
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
ebefbbaa58
Minor
2013-12-04 22:07:18 -05:00
Behdad Esfahbod
dc87372c88
Use True/False instead of 1/0
2013-12-04 21:28:50 -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
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
5cf4008336
py23 tostr()/tobytes() and using them
...
ttf->xml seems to be mostly working now.
2013-11-28 17:32:43 -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
d2f5d2f8b4
py23 use Tag in ttLib/__init__
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
bb0beb7385
2to3 Use py23 to close some of the bytes/str/unicode gaps
2013-11-27 15:25:00 -05:00
Behdad Esfahbod
c2297cd41d
2to3 --fix=dict with manual cleanup
2013-11-27 14:01:45 -05:00
Behdad Esfahbod
14fb031125
Remove most uses of module string
2013-11-27 14:01:44 -05:00
Behdad Esfahbod
223273f792
2to3 --fix=except
2013-11-27 14:01:37 -05:00
Behdad Esfahbod
b92c08059d
2to3 --fix=imports with manual fixups
2013-11-27 05:05:46 -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
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
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
Roozbeh Pournader
d7921e33d9
Improved support for minimal fonts (with no visible glyphs).
2013-10-08 21:29:22 -07:00
Behdad Esfahbod
805caae0d5
Merge pull request #5 from davelab6/master
...
New -q for Quiet mode
2013-10-01 15:36:55 -07:00
Behdad Esfahbod
f65033e277
Move xmlWriter into fontTools.misc
...
Trying to cleanup our footprint in the Python namespace.
2013-09-17 16:41:32 -04:00
Dave Crossland
d7efd5692c
Make parsing XML quiet
2013-09-04 14:51:16 +01:00
Dave Crossland
85af40e7d8
Adding quiet mode to xmlImport
2013-09-04 13:30:21 +01:00