def __init__(self, fontconfig="", pre="", post=""): # Use the default TeX escapes, and encoding method LatexCodec.__init__(self, input_encoding="utf8", output_encoding="utf8") # XeTeX font manager if not(fontconfig): fontconfig = os.getenv("DBLATEX_FONTSPEC_FILE", "xefont.xml") # If not proper fontconfig, fallback to default behaviour try: self._fontmgr = FontSpecEncoder(fontconfig) except: self._fontmgr = None return # Ignore the special characters \1 and \2 used as specific # substitution characters self._fontmgr.ignorechars("\1\2\r")
def __init__(self, fontconfig="", pre="", post=""): # Use the default TeX escapes, and encoding method LatexCodec.__init__(self, input_encoding="utf8", output_encoding="utf8") # XeTeX font manager if not (fontconfig): fontconfig = os.getenv("DBLATEX_FONTSPEC_FILE", "xefont.xml") # If not proper fontconfig, fallback to default behaviour try: self._fontmgr = FontSpecEncoder(fontconfig) except: self._fontmgr = None return # Ignore the special characters \1 and \2 used as specific # substitution characters self._fontmgr.ignorechars("\1\2\r")