public sealed class FontAssetA font asset: a face, the faces behind it, and how it is put in an atlas.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ A document beside the .ttf rather than settings on it, and the reason is the fallback chain. A chain is a property of *this use* of a face: the same NotoSans.ttf is the primary face of one font asset and the CJK fallback of another, and import settings on the file could only express one of those. Doc 11's row names three things — coverage, atlas preview, fallback chain — and the third is what makes this an asset of its own.
⚠ The faces are GUIDs, so moving a .ttf needs nothing done to this file — doc 08's rule, and it is what lets ReferenceIndex report that deleting a font breaks three chains.
Fields and properties (13)
public const int CurrentThe version this reader and writer speak.
public const string ExtensionWhat a font asset is written as.
public int VersionWhich version of the format this file is.
public string NameWhat the font is called, in a style sheet.
public AssetId FaceThe face it is mostly made of.
public int FaceIndexWhich face inside a collection, for a .ttc.
public List<AssetId> FallbacksThe faces consulted, in order, for a code point the primary does not have.
public float PixelSizeHow large a glyph is rasterised, in pixels.
public int AtlasWidthHow wide the atlas page is, in pixels.
public int AtlasHeightAnd how tall.
public int PaddingHow many pixels of margin each glyph gets.
public bool DistanceFieldWhether glyphs are stored as a distance field rather than as coverage.
public List<FontRangeData> RangesThe code-point ranges the atlas is pre-populated with.
Methods (2)
public static FontAsset FromYaml(string yaml)Reads YAML into a font asset.
public string ToYaml()Writes it as YAML.
Used by (5)
- FontAtlasViewVixen.Editor.AssetEditors
- FontDocumentVixen.Editor.AssetEditors
- FontViewVixen.Editor.AssetEditors
- TypeRegistrationVixen.Editor.AssetEditors
- Vixen_Editor_AssetEditors_Fonts_FontAssetSerializerVixen.Editor.AssetEditors