Module Js_of_ocaml.FontFace

CSS Font Loading API binding.

This is a partial binding to the CSS Font Loading API.

class type fontFace = object ... end
class type fontFaceSet = object ... end
val is_supported : unit -> bool

is_supported () is true if the FontFace constructor of the CSS Font Loading API is available in the current environment.

create family source wraps new FontFace(family, source), where source is a CSS src descriptor string (e.g. "url(font.woff2)").

create_from_buffer family data wraps new FontFace(family, data) with the font's binary data as data, for fonts loaded from raw bytes.