(cls, scale, texname, subfont, effects)
| 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 |
no test coverage detected