MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / from_xetex

Method from_xetex

lib/matplotlib/dviread.py:701–709  ·  view source on GitHub ↗
(cls, scale, texname, subfont, effects)

Source from the content-addressed store, hash-verified

699
700 @classmethod
701 def from_xetex(cls, scale, texname, subfont, effects):
702 # utf8 on Windows, not utf16!
703 path = texname.decode("utf8") if os.name == "nt" else os.fsdecode(texname)
704 metrics = TtfMetrics(path)
705 font = cls(scale, metrics, b"[" + texname + b"]", vf=None)
706 font._path = Path(path)
707 font.subfont = subfont
708 font.effects = effects
709 return font
710
711 size = property(lambda self: self._scale * (72.0 / (72.27 * 2**16)))
712

Callers 1

_define_native_fontMethod · 0.80

Calls 2

TtfMetricsClass · 0.85
PathClass · 0.85

Tested by

no test coverage detected