FontSpec#
Import |
|
Defined in |
|
Install |
|
Since |
0.11 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.FontSpec[source]#
Bases:
StrictThe font files a panel is lettered in, each a path relative to the document.
Paths, never names: a font is a declared file and never a system lookup, so a document letters the same on every machine. They are read relative to the folder the document is in, and an absolute one is refused; see
scenet.paths.Example
>>> from scenet import FontSpec, parse_panel >>> font = parse_panel("lettering: {font: fonts/Comic.ttf}").lettering.font >>> isinstance(font, FontSpec), font.regular (True, 'fonts/Comic.ttf')
See also
LetteringSpec, whosefonttakes one.FontMetrics, a font read for measuring.- regular: str#
The font file dialogue and
spokencaptions are lettered in, relative to the document. Written alone, asfont: fonts/Comic.ttf, it letters every face.
- italic: str | None#
The font file every caption but a
spokenone is lettered in. Left out, they are set inregular.