Class Font

A Font is used in conjunction with the Text primitive to render text, such as axis labels.

Font image and data files can be generated with msdf-bmfont:

$ npm i -g msdf-bmfont-xml
$ msdf-bmfont -f json -s 24 -t sdf --smart-size Lato-Regular.ttf

Hierarchy

  • Font

Constructors

Properties

Methods

Constructors

  • Parameters

    • cg: CandyGraph
    • image: HTMLImageElement

      The image produced by msdf-bmfont.

    • json: any

      The json object produced by msdf-bmfont.

    Returns Font

Properties

kernTable: Int8Array
maxid: number

Methods

  • Release all GPU resources and render this Font instance unusable.

    Returns void

Generated using TypeDoc