UNPKG

starling-framework

Version:

A fast, productive library for 2D cross-platform development.

57 lines 1.62 kB
import Texture from "../textures/Texture"; import Image from "../display/Image"; declare namespace starling.text { /** * A BitmapChar contains the information about one char of a bitmap font. * * <em>You don't have to use this class directly in most cases. * * The TextField class contains methods that handle bitmap fonts for you.</em> * */ export class BitmapChar { /** * Creates a char with a texture and its properties. */ constructor(id: number, texture: Texture, xOffset: number, yOffset: number, xAdvance: number); /** * Adds kerning information relative to a specific other character ID. */ addKerning(charID: number, amount: number): void; /** * Retrieve kerning information relative to the given character ID. */ getKerning(charID: number): number; /** * Creates an image of the char. */ createImage(): Image; /** * The unicode ID of the char. */ get charID(): number; /** * The number of points to move the char in x direction on character arrangement. */ get xOffset(): number; /** * The number of points to move the char in y direction on character arrangement. */ get yOffset(): number; /** * The number of points the cursor has to be moved to the right for the next char. */ get xAdvance(): number; /** * The texture of the character. */ get texture(): Texture; /** * The width of the character in points. */ get width(): number; /** * The height of the character in points. */ get height(): number; } } export default starling.text.BitmapChar;