1000 Commits

Author SHA1 Message Date
jvr
2e4cc02ca3 BasePen should not fail if a base glyph does not exist in the glyph set; added get() method to _TTGlyphSet class
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@497 4cde692c-a291-49d1-8350-778aa11640f8
2005-03-08 09:50:56 +00:00
jvr
31ae380735 fixed problem with empty ClassDef, as well as added some more defenses for possible empty tables
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@484 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-11 19:36:38 +00:00
jvr
7afc6b989c uh, and the other one
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@482 4cde692c-a291-49d1-8350-778aa11640f8
2005-01-24 10:18:58 +00:00
jvr
79c1316d65 fixed buglet in GlyphSet support code
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@481 4cde692c-a291-49d1-8350-778aa11640f8
2005-01-24 10:06:45 +00:00
jvr
1ed5b4746d fixed 2.4 compat issue
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@480 4cde692c-a291-49d1-8350-778aa11640f8
2005-01-24 10:05:52 +00:00
jvr
f34c6f3937 fix for new 2.4 hex() behavior
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@478 4cde692c-a291-49d1-8350-778aa11640f8
2004-12-24 16:07:01 +00:00
jvr
28ae196229 Refactored and enhanced table order support:
- Rewrote sorting function, it was really quite buggy.
- Added reorderFontTables() functions, which reorders the
  tables in a font at the sfnt level.
- TTFont.save() will now by default rewrite the font in the
  optimized order. This is done through a temp file since
  our dependency checking logic gets in the way of writing
  the tables in a predefined order directly (if table A depends
  on B, table B will always be compiled and written first, so
  this prevents A from showing up in the file before B).

sfnt.py:
- removed closeStream option from SFNTWriter.close(); it's better
  done by the caller (TTFont).


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@475 4cde692c-a291-49d1-8350-778aa11640f8
2004-11-16 10:37:59 +00:00
jvr
a4f6688ebe tweak & bugfix
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@474 4cde692c-a291-49d1-8350-778aa11640f8
2004-11-16 09:12:30 +00:00
jvr
427f9802bc make sure that a cmap subtable instance always has a language attr, so __cmp__ can't fail
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@473 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-26 18:32:50 +00:00
jvr
fba0609d54 Fix for [ 808370 ] Dumping Legendum.otf fails on 'kern' table
Work around buggy kern table.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@472 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 10:56:15 +00:00
jvr
1fae9b48d3 [ 637398 ] Failure while parsing OpenType file
Deal with empty Coverage table: it will be None so won't have a .glyphs
attribute.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@471 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 10:31:29 +00:00
jvr
266bf21dbe workaround for bug [ 766694 ] Error from invalid date
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@470 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 10:01:12 +00:00
jvr
980fae897a bug #784690: simple workaround for buggy name table
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@469 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 09:12:00 +00:00
jvr
a84b28d934 - Refactored XML writing, removed lots of code duplicaiton
- Only output unicode names as comments if we're in fact dealing with
  a unicode cmap subtable (and this is -- in theory -- independent of
  cmap format)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@468 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 09:06:58 +00:00
jvr
0cd79a5642 Patch #845571 from Anthony Fok:
- better exception msg in loca table
- renamed "version" to "language" in cmap
- made cmap 12 work (untested by me)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@463 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 07:30:47 +00:00
jvr
7718d95951 whoops, forgot one part os OS/2 version 3 support
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@462 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 07:19:27 +00:00
jvr
30bcb12dcb added support for OS/2 table #3
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@461 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-24 18:33:19 +00:00
jvr
8e1d75b1a3 ReverseChainSingleSubst support from Yannis H. (must get that generate-otdata-from-the-docs working again)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@459 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-22 13:12:55 +00:00
jvr
df1f145e5a bug from the spec leaked into here; pointed out by Yannis H.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@458 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-22 07:09:33 +00:00
jvr
27f108844e this should have been part of the previous path by some fixes from klchxbec
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@450 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-11 07:11:35 +00:00
jvr
3a6aa2359e tweaked doc string
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@445 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-02 19:23:13 +00:00
jvr
5aaeac3333 Ha, a reserved field got eaten. Noticed by Yannis Haralambous.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@443 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-01 15:09:29 +00:00
jvr
1cff4cb190 workaround for buggy 2.2 mac support
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@436 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-28 18:23:43 +00:00
jvr
3430abf7ab whitespace nits
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@435 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-28 18:14:33 +00:00
jvr
bafa66e665 Another patch from rroberts. He writes:
"""It adds full support for cmap format 2, which is what
the Adobe CJK fonts use for the Mac cmap subtable."""


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@434 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-28 18:04:23 +00:00
jvr
d028b7be3c Set .width in _TTGlyph.__init__ after all: these are just this wrapper
objects, _TTGlyphSet doesn't cache them, so setting .width in .draw()
is confusing to say the least.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@430 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-26 19:00:38 +00:00
jvr
6f8f5ded55 fixed AttributeError in _TTGlyphSet.keys()
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@428 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-26 18:19:11 +00:00
jvr
6d9e8e8831 document that this file is generated
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@425 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-25 21:19:09 +00:00
jvr
1c9917bcf4 comment typo fix, reflow
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@422 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-25 13:20:38 +00:00
jvr
8df8f6385e TTFont now has a getGlyphSet() method, which will return a generic
GlyphSet. A GlyphSet is simply a dict-like object mapping glyph names
to glyphs. The glyphs in a GlyphSet have a .draw(pen) method and a
.width attribute. This provides a generic interface for drawing glyphs
or extracting outlines, and works both for CFF-based fonts and TT fonts.

See also fontTools.pens.basePen for a description of what makes a Pen
a Pen.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@420 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-25 13:15:50 +00:00
jvr
731ed49dbc add some more dict-like stuff to the glyf table
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@419 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-25 12:23:01 +00:00
jvr
b47e3ba3ae some fixes from klchxbec
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@409 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 20:21:08 +00:00
jvr
aa2723c559 VORG support by rroberts.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@408 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 20:02:25 +00:00
jvr
700df03131 - attempted to sort tables in order recommended by spec.
TODO: need to fix table dependency order to complete this.
  (Read: would you mind posting a bug report regarding this?)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@406 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 19:44:08 +00:00
jvr
f509c0f070 support for CEF fonts: don't depend on the head table being available
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@405 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 19:38:37 +00:00
jvr
07dd0e4504 recalc numGlyphs upon writing
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@404 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 19:34:48 +00:00
jvr
d407973545 update macUtils to current day MacPython
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@403 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 18:56:01 +00:00
jvr
0bb3ba5222 some modernizations
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@401 4cde692c-a291-49d1-8350-778aa11640f8
2003-08-22 18:52:22 +00:00
jvr
e73b8a53a5 Fix for bug #691744; calc_mac_epoch_diff() was broken when the timezone
was GMT (or perhaps other situations; it's not entirely clear).


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@391 4cde692c-a291-49d1-8350-778aa11640f8
2003-02-23 19:40:07 +00:00
jvr
924e4e274e cmap format 12 support, donated by rroberts: thanks!
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@390 4cde692c-a291-49d1-8350-778aa11640f8
2003-02-08 10:45:23 +00:00
jvr
a87cde236e second try to work around bogus stringOffset value
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@389 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-25 18:20:22 +00:00
jvr
b71d0f46f6 renamed stringoffset to stringOffset as per spec
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@388 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-25 11:15:42 +00:00
jvr
aabca6d793 gracefully handle bogus stringOffset values (thanks to Anthony Fok)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@387 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-25 11:14:59 +00:00
jvr
1332d3e549 clean up checkSumAdjustment XML output: suppress trialing 'L'
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@386 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-10 22:34:13 +00:00
jvr
26fc63c854 fix from Owen Taylor that fixes my previous patch; thanks!
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@385 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-10 22:23:46 +00:00
jvr
df22c27d92 detab table string literal
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@384 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 21:29:23 +00:00
jvr
130c1a0d9c make two fields unsigned, to conform to the spec but also to suppress Python 2.3 warnings for hex(negativenumber).
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@383 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 21:23:04 +00:00
jvr
02e76e905f suppres Python 2.3 warning
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@381 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 20:57:04 +00:00
jvr
257fba7172 make sure Coverage instances have a 'glyphs' attribute
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@379 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 20:54:31 +00:00
jvr
4170cfd5e9 allow OS/2 tables containing too much data
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@378 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 20:52:42 +00:00