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

Implements

Index

Constructors

Methods

  • dispose(): void
  • 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.

  • getResourceKinds(): ResourceKind[]
  • loadResource(resourceName: string): Promise<void>
  • processResource(resourceName: string): Promise<void>

Generated using TypeDoc