Class Font

Hierarchy

  • Font

Constructors

Properties

charGeometryCache: {
    [char: string]: {
        geometry: {
            indices: number[];
            points: number[];
        };
        width: number;
    };
} = {}

Type declaration

  • [char: string]: {
        geometry: {
            indices: number[];
            points: number[];
        };
        width: number;
    }
    • geometry: {
          indices: number[];
          points: number[];
      }
      • indices: number[]
      • points: number[]
    • width: number
data: FontData
isCCW: boolean = false

Methods

  • Parameters

    • text: string
    • fontSize: number
    • Optional lineHeight: number
    • align: "center" | "left" | "right" = 'left'
    • textBaseline: "top" | "bottom" | "alphabetic" | "middle" = 'alphabetic'
    • tabCharWidth: number = 128

    Returns {
        indices: Uint32Array;
        normals: Float32Array;
        uvs: Float32Array;
        vertices: Float32Array;
    }

    • indices: Uint32Array
    • normals: Float32Array
    • uvs: Float32Array
    • vertices: Float32Array
  • Parameters

    • char: string
    • geometry: {
          indices: number[];
          points: number[];
      } = ...
      • indices: number[]
      • points: number[]

    Returns {
        geometry: {
            indices: number[];
            points: number[];
        };
        width: number;
    }

    • geometry: {
          indices: number[];
          points: number[];
      }
      • indices: number[]
      • points: number[]
    • width: number
  • Parameters

    • text: string
    • size: number
    • Optional lineHeight: number
    • align: "center" | "left" | "right" = 'left'

    Returns Shape2[]

Generated using TypeDoc