psLib: Tools for working with PostScript data
- 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.
- 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]
- class fontTools.misc.psLib.PSInterpreter(encoding='ascii')[source]
Bases:
PSOperators