521 Commits

Author SHA1 Message Date
jvr
9be387c94f Use sys.byteorder, getting rid of ttLib.endian
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@527 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 11:43:01 +00:00
jvr
45d1f3b3b5 - removed support for Python 2.2 on MacOS 10.2
- worked around a bug in GetCreatorType() on intel Macs


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@526 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 11:34:54 +00:00
jvr
1bcc11dcf6 Expose ignoreDecompileErrors as a command line option (-e, to set
ignoreDecompileErrors to to false)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@525 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 09:42:58 +00:00
jvr
2545f16b54 Make a hidden feature accessible: optionally ignore decompilation errors,
falling back to DefaultTable, retaining the binary data. It's a bit
dangerous to enable this by default, since it can lead to hiding other
errors or bugs (in the font or fonttools itself).


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@524 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 09:30:17 +00:00
jvr
2db352c748 - skip subtables of length zero
- minor tweak in cmap 4 logic
contributed by rroberts


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@523 4cde692c-a291-49d1-8350-778aa11640f8
2008-02-29 14:43:49 +00:00
jvr
8633195104 fixed problem with private VTT table, found by Peter Bilak
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@522 4cde692c-a291-49d1-8350-778aa11640f8
2008-02-19 18:49:14 +00:00
pabs3
e307d81d4b Update changelog
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@520 4cde692c-a291-49d1-8350-778aa11640f8
2008-01-28 07:11:06 +00:00
pabs3
67584d842d Woops, missed a version number
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@519 4cde692c-a291-49d1-8350-778aa11640f8
2008-01-28 07:09:27 +00:00
pabs3
043d41f2c6 Add a MANIFEST file so that we don't forget files in the source distribution
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@518 4cde692c-a291-49d1-8350-778aa11640f8
2008-01-28 04:59:14 +00:00
pabs3
af37f54e52 Update the changelog from the CVS history
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@517 4cde692c-a291-49d1-8350-778aa11640f8
2008-01-28 04:22:26 +00:00
pabs3
d80c13e389 Get ready to release version 2.1
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@516 4cde692c-a291-49d1-8350-778aa11640f8
2008-01-28 04:19:40 +00:00
pabs3
fb8e53bfcf Just use fonttools as the tarball name.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@515 4cde692c-a291-49d1-8350-778aa11640f8
2008-01-28 04:00:14 +00:00
pabs3
9728601b44 Fix 1762552: traceback on amd64 with DejaVuSans.ttf
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@514 4cde692c-a291-49d1-8350-778aa11640f8
2007-11-14 07:06:39 +00:00
jvr
4acb76de2e added 'support' for OS/2 version 4: can anyone verify this is correct? I can't seem to find an OS/2 v4 spec...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@513 4cde692c-a291-49d1-8350-778aa11640f8
2007-10-22 09:31:02 +00:00
pabs3
26a46b7fce Patch #1296028 from Tomasz Wegrzanowski: improve performance with CJK fonts
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@512 4cde692c-a291-49d1-8350-778aa11640f8
2007-08-25 06:19:37 +00:00
jvr
823f8cd15f Misc patches from rroberts:
fontTools/ttx.py
  # support virtual GIDs, support handling some GSUB offset overflows.

fontTools/ttlib/__init__.py
# 1) make getReverseGlyphMap  a public function; I find a reverse map
to often be useful
# 2) support virtual glyphs, e.g. references to GID's that are not in the font.
# Added the TTFont argument allowVID (default 0) to turn this off and on;
# added the arg requireReal ( default 0) so as to get the obvious
default behaviour when
# allowVID is 0 or 1, but to allow requiring a true GID when allowVID is 1.

fontTools/ttlib/tables/otBase.py
fontTools/ttlib/tables/otConverters.py
fontTools/ttlib/tables/otData.py
fontTools/ttlib/tables/otTables.py
# 1) speed optimization
# - collapse for loops
# - do not decompile extension lookups until a record is requested
from within the lookup.
# 2) handling offset overflows
# 3) support of extension lookups
# 4) Fixed FetauresParam converter class def so as to survive a font
that has this offset non-NULL.
# This fixes a stack dump.
# The data will now just get ignored


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@511 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 14:12:38 +00:00
jvr
d299b55d14 patches from rroberts:
# 1) Switched to using Numeric module arrays rather than array modules arrays,
#  because of a memory leak in array.array when handling elements > 1 byte.
# 2) speed optimizations:
# -  For loops are collapsed when possible
# - the data for a subtable is parsed only if a mapping value is requested
# - if two subtables share the same data offset, then on
decompilation, they will
# share the same cmap dict, and not get decompiled twice. Same for compiling.
# - as before, two tables with the same contents will get compiled to a single
# data block in the font.
# 3) added  (self.platformID, self.platEncID) == (3, 10) to the list
of subtables that
# get Unicode comments.
# 4) allow item reference by GID as well as by name. I did this when
experimenting to see if using GID references only would speed the
compile; it didn't but it seemed useful enough to leave in.
# 5) Fixed compile to/from XML: for cmap type unknown ( aka cmap
format 10, in practice.)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@510 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 13:54:30 +00:00
jvr
c60a44fa03 Some edits from rroberts:
# 1) speed optimizations
# 2) fixed parseCharset0 to support CFF-CID fonts.
# 3) fixed CharsetConverter.read to work a font that actually has one
of the pre-canned encodings.
# This fixes a stack dump.
# I did not try to support using these encodings when writing a font,
# as the cases will be so rare as to not justify the processing
overhead for all other fonts.

(Read: I took out some of your loop optimizations since I believe they
made the code a lot less clear. I also have my doubts whether they were
actually performance improvements.)


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@509 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 13:41:18 +00:00
jvr
bc6e55b31e Speed optimizations from rroberts
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@508 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 13:29:47 +00:00
jvr
4cc0051c08 Some non-official OT tables from rrboerts. He wrote:
There are also some new files, for SING glyphlet support, that you
may or may not want to add, because they are not in the OpenType spec.

M_E_T_A_.py # SING glyphlet meta data table. see
'http://partners.adobe.com/public/developer/opentype/gdk/topic.html"
S_I_N_G_.py # SING glyphlet basic info. See same web site as for META
data table.

G_M_A_P_.py # Summary of sing glyphlet info that has been stuck into
a parent font. Not documented anywhere yet.
G_P_K_G_.py # Opaque wrapper for SING glyphlet info; travels with
application document. Is also stuck into augmented parent font. Not
documented anywhere yet


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@507 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 13:27:25 +00:00
jvr
192655c661 make this module work with semi-recent MacPython
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@506 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 13:16:51 +00:00
jvr
7099f4c0f9 support the deprecated dotsection T2 operator
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@505 4cde692c-a291-49d1-8350-778aa11640f8
2006-02-25 21:39:33 +00:00
fcoiffie
3a3721cb1c In some bad fonts, kern table is incomplete (it only contains a version number). In this case, the code accept a table without kernTables.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@504 4cde692c-a291-49d1-8350-778aa11640f8
2006-01-25 15:24:37 +00:00
fcoiffie
dc66e7e118 LTSH length can be different of numGlyphs as the table length must be 4-bytes aligned (assertion changed to (len(data) % numGlyphs) < 4)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@503 4cde692c-a291-49d1-8350-778aa11640f8
2006-01-25 15:21:22 +00:00
fcoiffie
83f069d66c The dates are stored in 8-bytes fields (Microsoft reference document) but Macintosh dates are only coded with 4-bytes. In some fonts, these date fields are badly coded and 8-bytes are used. So, a ValueError occurs.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@502 4cde692c-a291-49d1-8350-778aa11640f8
2006-01-25 15:12:14 +00:00
fcoiffie
04985bfdde Unsigned long data field must be packed with "L" instead of "l" (sometimes an OverflowError can occur)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@501 4cde692c-a291-49d1-8350-778aa11640f8
2006-01-12 14:04:40 +00:00
jvr
e895dce25d Hmm, fondLib has been broken on Python.framework for a while: I used
the native struct alignment, which is different on OSX. Changed all
struct calls to explicitly use big endian (ready for x86...), which
also fixes the alignment issue.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@500 4cde692c-a291-49d1-8350-778aa11640f8
2005-06-24 09:35:16 +00:00
jvr
d4561ec1b4 some flex hint fixes from rroberts
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@499 4cde692c-a291-49d1-8350-778aa11640f8
2005-05-07 08:41:12 +00:00
jvr
a5c92986dd avoid glyphSet.get(): not all glyphsets in use implement it.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@498 4cde692c-a291-49d1-8350-778aa11640f8
2005-04-10 13:18:42 +00:00
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
3a98ae5baf added _endPath method; without it, we'd fail on open paths (which requires pen.endPath() to be called instead of pen.closePath())
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@496 4cde692c-a291-49d1-8350-778aa11640f8
2005-03-08 09:40:25 +00:00
jvr
c53569efef use highly unscientific epsilon value
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@495 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 22:31:39 +00:00
jvr
86c07d2b9a more doco, reformatted __all__
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@494 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 12:51:49 +00:00
jvr
441fdd1e9f reworked test code and results, to make the results more readable
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@493 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 12:40:52 +00:00
jvr
10de259aec Refactored splitting logic; added splitQuadraticAtT() and splitCubicAtT()
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@492 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 12:28:45 +00:00
jvr
0ec07f2dbc show/test that _testrepr() reprs Numeric arrays nicely, too
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@491 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 10:47:36 +00:00
jvr
82fdf153ac added a comment
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@490 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 10:42:29 +00:00
jvr
befd485af5 factored out param -> points conversion
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@489 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 10:40:07 +00:00
jvr
9369c20087 renamed and rewrote _tuplify() to _testrepr(), added tests for splitCubic()
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@488 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 10:33:47 +00:00
jvr
8ee2561bc1 some refactoring, some doctests
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@487 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-25 10:11:30 +00:00
jvr
cecd58c31c hm, it's been more than a year and a half since I regenerated ChangeLog.txt...
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@486 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-23 22:15:14 +00:00
jvr
95c9e9fc11 This patch fixes two things
- in T2 charstrings, a byte code of 255 is followed by a 16.16 fixed
  point number, not a 4-byte int as in T1. Noted by rroberts.
- some integers were not correctly encoded in the T1 compiler.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@485 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-23 21:22:27 +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
10fd22a989 expose onlyHeader keyword arg to generic read() func
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@483 4cde692c-a291-49d1-8350-778aa11640f8
2005-01-25 19:06:51 +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
90beb95b77 - rename file to fileOrPath
- check for capability, not type, so XMLWriter can hanlde unicode
  filenames (on OS-es that support them).


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@479 4cde692c-a291-49d1-8350-778aa11640f8
2005-01-17 21:34:06 +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
e0912bb819 fix for new 2.4 hex() behavior
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@477 4cde692c-a291-49d1-8350-778aa11640f8
2004-12-24 15:59:35 +00:00