fontTools.t1Lib (version 1.0b2)
index
/home/mcfletch/pylive/fontTools/t1Lib.py

fontTools.t1Lib.py -- Tools for PostScript Type 1 fonts
 
Functions for reading and writing raw Type 1 data:
 
read(path)
        reads any Type 1 font file, returns the raw data and a type indicator: 
        'LWFN', 'PFB' or 'OTHER', depending on the format of the file pointed 
        to by 'path'. 
        Raises an error when the file does not contain valid Type 1 data.
 
write(path, data, kind='OTHER', dohex=0)
        writes raw Type 1 data to the file pointed to by 'path'. 
        'kind' can be one of 'LWFN', 'PFB' or 'OTHER'; it defaults to 'OTHER'.
        'dohex' is a flag which determines whether the eexec encrypted
        part should be written as hexadecimal or binary, but only if kind
        is 'LWFN' or 'PFB'.

 
Modules
       
fontTools.misc.eexec
os
re
string

 
Classes
       
Exception(BaseException)
T1Error
T1Font

 
class T1Error(Exception)
    
Method resolution order:
T1Error
Exception
BaseException
object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class T1Font
    Type 1 font class.
 
Uses a minimal interpeter that supports just about enough PS to parse
Type 1 fonts.
 
  Methods defined here:
__getitem__(self, key)
__init__(self, path=None)
getData(self)
getGlyphSet(self)
Return a generic GlyphSet, which is a dict-like object
mapping glyph names to glyph objects. The returned glyph objects
have a .draw() method that supports the Pen protocol, and will
have an attribute named 'width', but only *after* the .draw() method
has been called.
 
In the case of Type 1, the GlyphSet is simply the CharStrings dict.
parse(self)
saveAs(self, path, type)

 
Functions
       
assertType1(data)
deHexString(hexstring)
decryptType1(data)
findEncryptedChunks(data)
isHex(text)
longToString(long)
read(path, onlyHeader=0)
reads any Type 1 font file, returns raw data
readLWFN(path, onlyHeader=0)
reads an LWFN font file, returns raw data
readOther(path)
reads any (font) file, returns raw data
readPFB(path, onlyHeader=0)
reads a PFB font file, returns raw data
stringToLong(str)
write(path, data, kind='OTHER', dohex=0)
writeLWFN(path, data)
writeOther(path, data, dohex=0)
writePFB(path, data)

 
Data
        DEBUG = 0
EEXECBEGIN = 'currentfile eexec'
EEXECBEGINMARKER = '%-- eexec start\r'
EEXECEND = '0000000000000000000000000000000000000000000000000000000000000000'
EEXECENDMARKER = '%-- eexec end\r'
EEXECINTERNALEND = 'currentfile closefile'
HEXLINELENGTH = 80
LWFNCHUNKSIZE = 2000
__author__ = 'jvr'
__file__ = '/home/mcfletch/pylive/fontTools/t1Lib.pyc'
__name__ = 'fontTools.t1Lib'
__package__ = 'fontTools'
__version__ = '1.0b2'
_fontType1RE = <_sre.SRE_Pattern object at 0x4ccf810>
_ishexRE = <_sre.SRE_Pattern object at 0x4c3d420>
haveMacSupport = 0

 
Author
        jvr