Table of Contents

Class VelvetFontFamily

Namespace
Velvet
Assembly
Velvet.Docs.dll

A named font family — the Velvet counterpart of a font-family entry. A family owns one or more VelvetFontWeightEntry slots keyed by VelvetFontWeight, and is selected through the font-<name> utility class (e.g. font-sans → the family named "sans").

Multilingual (CJK / fallback) coverage is a property of the Font Assets themselves: configure the local fallback table on the Font Asset, or the global fallback list on the panel's UITK Text Settings, or name several families in a font-family list (font-[Inter,Noto_Sans_JP]), which appends the later families' assets to the first one's table. TextCore performs the per-glyph fallback at render time.

[Serializable]
public sealed class VelvetFontFamily
Inheritance
object
VelvetFontFamily

Constructors

VelvetFontFamily()
VelvetFontFamily(string, params VelvetFontWeightEntry[])

Fields

name
weights

Methods

FindClosestWeight(VelvetFontWeight)

Picks the entry CSS's font matching algorithm picks for requested among the entries of normal width: an exact weight if one is registered; otherwise, for a request from 400 to 500, the lightest entry from the request up to 500, then the heaviest below the request, then the lightest above 500; for a request under 400, the heaviest at or below it, then the lightest above; for a request over 500, the lightest at or above it, then the heaviest below. Of two entries at one weight, the later is picked. Returns null when the family has no entries.