Font¶
Version: v1 Scope: per-tenant Owning service: studio-design-library
A Font records a single typeface file that has been uploaded to a tenant's font library in Studio. It models the CSS @font-face descriptor set needed to declare the font to a web renderer: family name, style, weight, stretch, display strategy, unicode coverage, and the source format. The actual TTF binary lives in LFS; the DTO carries only the metadata and a content-addressed path. Variable fonts (with a weight or stretch range rather than a single value) are explicitly modelled via oneof fields.
ID pattern¶
t/{tenantid}/fonts/{fontid}
| Segment | Meaning |
|---|---|
t/{tenantid} |
Tenant scope — each tenant has its own font library |
fonts |
Fixed collection name |
{fontid} |
Stable identifier, typically a "unified" form such as 1ariallight where the numeric prefix disambiguates fonts with similar names within the tenant |
Schema¶
| Field | Type | Description |
|---|---|---|
id |
string | Full resource name following the ID pattern above |
display_name |
string | PostScript name of the font, used for unique identification (e.g. Arial-BoldMT) |
file_path |
string | LFS path to the TTF file. Format: designer/t/<tenant-id>/fonts/<sha256>.ttf. Content-addressed; the filename is the SHA-256 hex digest of the file content. Updating a font (new TTF, same logical font) changes only file_path and display_name. |
family_name |
string | CSS font-family value — the font family name as it appears in design expressions (e.g. Noto Sans) |
style |
FontStyleValue enum | CSS font-style — whether the face is normal, italic, or oblique |
oblique_angle_range |
optional AngleRange | CSS oblique angle range in degrees; only present when style = OBLIQUE |
static_weight |
int32 (oneof weight) | CSS font-weight for a static font (e.g. 400 for regular, 700 for bold) |
variable_weight_range |
IntRange (oneof weight) | CSS font-weight range for a variable font (e.g. min=100, max=900) |
static_stretch_percent |
float (oneof stretch) | CSS font-stretch as a percentage for a static font (e.g. 100.0 for normal) |
variable_stretch_range_percent |
FloatRange (oneof stretch) | CSS font-stretch range for a variable font |
display |
FontDisplay enum | CSS font-display — controls how the font renders while loading |
format |
string | CSS src: format() hint (e.g. truetype) |
unicode_ranges |
repeated UnicodeRange | CSS unicode-range — the Unicode code point ranges covered by this font file |
FontStyleValue enum¶
| Value | Meaning |
|---|---|
FONT_STYLE_VALUE_UNSPECIFIED (0) |
Unset |
NORMAL (1) |
Normal upright style |
ITALIC (2) |
Italic style |
OBLIQUE (3) |
Oblique style; oblique_angle_range may further specify the supported angle |
FontDisplay enum¶
| Value | Meaning |
|---|---|
FONT_DISPLAY_UNSPECIFIED (0) |
Unset |
AUTO (1) |
Browser default behavior |
BLOCK (2) |
Invisible text during load, then swap |
SWAP (3) |
Fallback text immediately, swap when ready |
FALLBACK (4) |
Very short block period, then fallback; swap only within ~3 s |
OPTIONAL (5) |
Browser decides whether to use the font at all based on network conditions |
Nested message types¶
AngleRange — oblique angle bounds (degrees, inclusive):
- min_degrees float
- max_degrees float
IntRange — integer bounds (inclusive):
- min int32
- max int32
FloatRange — float bounds (inclusive):
- min float
- max float
UnicodeRange — Unicode code point range (inclusive):
- start uint32
- end uint32
Consumed by¶
| Service | Why |
|---|---|
| Studio UI / renderer | Declares @font-face rules so the SVG-based design preview renders with the correct typeface |
studio-design-library |
Resolves font references embedded in design JSON source files |