391 Commits

Author SHA1 Message Date
pabs3
14654b2a88 Apply 1296026: fix tracebacks in some timezones
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@551 4cde692c-a291-49d1-8350-778aa11640f8
2008-05-16 07:17:26 +00:00
jvr
a983e66970 - turned ps exceptions into classes and renamed them
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@550 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-11 07:25:29 +00:00
jvr
e56bc902cf - t1Lib.py can now properly read PFA fonts
- fixed "flex" bug in T1 charstring reader


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@549 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-10 21:58:00 +00:00
jvr
e5b245fd07 added refactoring note
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@548 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 21:43:19 +00:00
jvr
ce47e0d978 minor fix: one zero too many in assert
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@547 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 20:48:45 +00:00
jvr
142506b07d added comment, the OTL Extension mechanism should not be here
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@546 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 20:39:38 +00:00
jvr
1c73452692 fixed some comment typos
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@545 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 20:13:16 +00:00
jvr
cd75d570d4 don't crash on empty VORG table (reported by Werner Lemberg)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@544 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 08:58:36 +00:00
jvr
1ebda677eb squash 2 bugs related to the numpy conversion
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@543 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-08 20:29:30 +00:00
jvr
2a9bcde369 - use the builtin symbols instead of the types module
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@542 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-07 19:56:17 +00:00
jvr
f6ff48be3c better float testing, so numpy.floats also work.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@541 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-07 19:49:25 +00:00
jvr
28afd331e1 initialize data to empty string instead of list
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@539 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-04 15:34:54 +00:00
jvr
91ff4fdfda ar.typecode() doesn't exist in numpy, but then again, this was overkill
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@538 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-04 15:34:22 +00:00
jvr
1b7d54fedc converted usage of Numeric to numpy
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@537 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-04 15:25:27 +00:00
jvr
f5e9825454 note this file is deprecated
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@536 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-04 15:04:09 +00:00
jvr
ccaf0376d6 removed some redundant imports
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@535 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-04 15:02:45 +00:00
jvr
41144b9306 - moved Numeric import to top
- converted tests to doctest


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@534 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-04 14:47:11 +00:00
jvr
a5ed95261c post 2.1 version numbering
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@531 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 17:20:26 +00:00
jvr
b018bf7120 the gasp portion of patch 1675210: support for ClearType
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@529 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 16:43:24 +00:00
jvr
212ea14706 fixed oversight in sys.byteorder transition
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@528 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-01 15:31:01 +00:00
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
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
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