Function load_font

  • Allegro

    Loads font from file.

    Parameters

    • filename: string

      Font file URL

    • size: number = 12

    Returns FONT

    font object

    1.18.2

    Remarks

    This actually creates a style element, puts code inside and appends it to class. I heard it works all the time most of the time. Note that this function won't make ready() wait, as it's not possible to consistently tell if a font has been loaded in js, thus load your fonts first thing, and everything should be fine.

Generated using TypeDoc