psLib

exception fontTools.misc.psLib.PSTokenError[source]

Bases: Exception

exception fontTools.misc.psLib.PSError[source]

Bases: Exception

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

Bases: object

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.

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]
skipwhite(whitematch=<built-in method match of re.Pattern object>)[source]
starteexec()[source]
stopeexec()[source]
class fontTools.misc.psLib.PSInterpreter(encoding='ascii')[source]

Bases: PSOperators

fillsystemdict()[source]
suckoperators(systemdict, klass)[source]
interpret(data, getattr=<built-in function getattr>)[source]
handle_object(object)[source]
call_procedure(proc)[source]
resolve_name(name)[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]
do_comment(token)[source]
do_literal(token)[source]
do_string(token)[source]
do_hexstring(token)[source]
do_special(token)[source]
push(object)[source]
pop(*types)[source]
do_makearray()[source]
close()[source]

Remove circular references.

fontTools.misc.psLib.unpack_item(item)[source]
fontTools.misc.psLib.suckfont(data, encoding='ascii')[source]