Capítulo 549 de 859

Chapter 549: Font

Core Idea

Class representing a font.

Key Concepts

  • data : Object: The font data as JSON.
  • isFont : boolean (readonly): This flag can be used for type testing.

Reference Tables

Constructor

Signature
new Font( data : Object )

Properties

PropertyDescription
.data : ObjectThe font data as JSON.
.isFont : boolean (readonly)This flag can be used for type testing.

Methods

MethodDescription
.generateShapes( text : string, size : number, direction : string ) : Array.<Shape>Generates geometry shapes from the given text and size. The result of this method should be used with ShapeGeometry to generate the actual geometry data.

Key Takeaways

  1. Most relevant properties: data, isFont.
  2. Key methods: generateShapes.

Connects To