Options
All
  • Public
  • Public/Protected
  • All
Menu

FontFaceObserverFontManager loads fonts (using FontFace or fontfaceobserver library) from the game resources (see loadFonts), and allow to access to the font families of the loaded fonts during the game (see getFontFamily).

Hierarchy

  • FontFaceObserverFontManager

Index

Constructors

Methods

  • getFontFamily(resourceName: string): string
  • Return the font family associated to the specified font resource name. The font resource must have been loaded before. If that's not the case, a default font family will be returned ("Arial").

    Parameters

    • resourceName: string

      The name of the resource to get.

    Returns string

    The font family to be used for this font resource, or "Arial" if not loaded.

  • getFontFile(resourceName: string): string
  • Return the font file associated to the specified font resource name. The font resource must have been loaded before. If that's not the case, the resource name will be returned (to keep compatibility with GDevelop 5.0-beta56 and previous).

    Should only be useful for renderers running on a non HTML5/non browser environment.

    Parameters

    • resourceName: string

      The name of the resource to get.

    Returns string

    The file of the font resource.

  • loadFonts(onProgress: any, onComplete: any): any
  • setResources(resources: ResourceData[]): void

Generated using TypeDoc