Function
Describes the font to load. Logs an error if name or pathOrDirectory
is missing.
Register a local font with the document, so it can be used by family name in CSS. Generates
the @font-face rules and injects them as a stylesheet. Whether one file or a whole family is loaded is
inferred from the path — see FontProperties.
Note: the passed object is filled in with the defaults it was missing, so it is modified in place.
loadLocalFont