psLib

exception fontTools.misc.psLib.PSError[source]

Bases: Exception

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class fontTools.misc.psLib.PSInterpreter(encoding='ascii')[source]

Bases: PSOperators

call_procedure(proc)[source]
close()[source]

Remove circular references.

do_comment(token)[source]
do_hexstring(token)[source]
do_literal(token)[source]
do_makearray()[source]
do_special(token)[source]
do_string(token)[source]
do_token(token, int=<class 'int'>, float=<class 'float'>, ps_name=<class 'fontTools.misc.psOperators.ps_name'>, ps_integer=<class 'fontTools.misc.psOperators.ps_integer'>, ps_real=<class 'fontTools.misc.psOperators.ps_real'>)[source]
fillsystemdict()[source]
handle_object(object)[source]
interpret(data, getattr=<built-in function getattr>)[source]
pop(*types)[source]
proc_bind(proc)
ps_anchorsearch()
ps_array()
ps_astore()
ps_begin()
ps_bind()
ps_cleartomark()
ps_closefile()
ps_count()
ps_currentdict()
ps_currentfile()
ps_cvn()
ps_cvx()
ps_def()
ps_definefont()
ps_dict()
ps_dup()
ps_eexec()
ps_end()
ps_eq()
ps_exch()
ps_exec()
ps_executeonly()
ps_findfont()
ps_for()
ps_forall()
ps_get()
ps_getinterval()
ps_if()
ps_ifelse()
ps_index()
ps_known()
ps_load()
ps_matrix()
ps_ne()
ps_noaccess()
ps_not()
ps_pop()
ps_print()
ps_put()
ps_putinterval()
ps_readonly()
ps_readstring(ps_boolean=<class 'fontTools.misc.psOperators.ps_boolean'>, len=<built-in function len>)
ps_store()
ps_string()
ps_systemdict()
ps_type()
ps_userdict()
ps_where()
push(object)[source]
resolve_name(name)[source]
suckoperators(systemdict, klass)[source]
exception fontTools.misc.psLib.PSTokenError[source]

Bases: Exception

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class fontTools.misc.psLib.PSTokenizer(buf=b'', encoding='ascii')[source]

Bases: object

close()[source]
getnexttoken(len=<built-in function len>, ps_special=b'()<>[]{}%', stringmatch=<built-in method match of re.Pattern object>, hexstringmatch=<built-in method match of re.Pattern object>, commentmatch=<built-in method match of re.Pattern object>, endmatch=<built-in method match of re.Pattern object>)[source]
read(n=-1)[source]

Read at most ‘n’ bytes from the buffer, or less if the read hits EOF before obtaining ‘n’ bytes. If ‘n’ is negative or omitted, read all data until EOF is reached.

skipwhite(whitematch=<built-in method match of re.Pattern object>)[source]
starteexec()[source]
stopeexec()[source]
fontTools.misc.psLib.suckfont(data, encoding='ascii')[source]
fontTools.misc.psLib.unpack_item(item)[source]