gradum-kit - v0.1.0
    Preparing search index...

    Function loadLocalFont

    • Function

      loadLocalFont

      Parameters

      • font: FontProperties

        Describes the font to load. Logs an error if name or pathOrDirectory is missing.

      Returns void

      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.