Skip to main content

FontAsset

class FontAsset(
val id: String? = null,
val mediatype: String? = null,
val src: String? = null,

/**
* Parsed for completeness and deliberately not consulted: an unpublished clip 404s on
* `/json/mediaclip/<id>`, so a clip that arrives at all is one the resolver may use, and
* gating on this string would add a way to reject a font that is demonstrably there.
*/
val status: String? = null
)

One asset of a font [FontClip], i.e. one entry of /json/mediaclip/<id> -> assets[].

A font clip is a single uploaded file the backend converted to several formats, so its assets differ only in [mediatype]:

{ "id": "40001", "mediatype": "woff", "src": "/media/2020/01/14/2495.woff" }
{ "id": "40002", "mediatype": "ttf", "src": "/media/2020/01/14/2495.ttf" }

Unknown keys are ignored, so an asset that carries extra backend fields still decodes.

Properties​

status​

val status: String?

Parsed for completeness and deliberately not consulted: an unpublished clip 404s on /json/mediaclip/<id>, so a clip that arrives at all is one the resolver may use, and gating on this string would add a way to reject a font that is demonstrably there.

format​

val format: String?

Lower-cased, trimmed [mediatype] ("ttf", "otf", "woff", ...), or null when absent.

status​

val status: String?

Parsed, not consulted - see [FontAsset.status].

src​

val src: String?

Top-level clip src. Present but unreliable: on some clips it points at the dead pre-conversion /upload/... path, on others it is the only working path while the per-asset src values are /media/ stubs (#20224). Not used for resolution.