Skip to content

hm5-types (source format) / fontMimeOf

Function: fontMimeOf() ​

ts
function fontMimeOf(name): "font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "text/css" | null;

MIME of a font / data file from its name (browsers often give "")

Parameters ​

ParameterType
namestring

Returns ​

"font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "text/css" | null

HereSplash — 2D animation for the web