Skip to main content

FontCache

Index

Constructors

constructor

Properties

publicstaticFONT_TIMEOUT

FONT_TIMEOUT: number = 500

Accessors

publicstaticcacheSize

  • get cacheSize(): number
  • Returns number

Methods

staticcheckAndClearCache

  • checkAndClearCache(): void
  • Returns void

publicstaticclearCache

  • clearCache(): void
  • Force clear all cached text bitmaps


    Returns void

staticgetTextInstance

  • getTextInstance(text: string, font: Font, color: Color): FontTextInstance
  • Parameters

    Returns FontTextInstance

staticmeasureText

  • Parameters

    • text: string
    • font: Font
    • optionalmaxWidth: number

    Returns BoundingBox