Scripting API
Scripting API
FontFiles
Class in Abyss.Core, from Abyss.Core.
A font's file: .ttf or .otf, TrueType or OpenType, as bevy_text reads it. A stylesheet draws text in it by naming it in an @font-face rule — by its path from the sheet's folder, or from the asset root after a slash, as a web page's sheet names one; see StyleSheetFiles.Resolved — and then the family that rule calls it in font-family:
@font-face { font-family: "Pixel"; src: url("/fonts/Pixel.ttf"); }.title { font-family: "Pixel"; }A build packs it as it is, with the sheet that names it.
public static class FontFilesProperties
Extensions
public static IReadOnlyList<string> Extensions { get; }The extensions a font has.
Methods
Is
public static bool Is(string path)Whether a path names a font, by its extension.
Parameters
path
NamedIn
public static IEnumerable<string> NamedIn(string css)The fonts a stylesheet's @font-face rules name, as the sheet writes them: src: url("/fonts/Pixel.ttf"); and src: "../fonts/Pixel.ttf";; StyleSheetFiles.Resolved gives the file each names. A face of the system's, src: local(...), names no file.
Parameters
css
