pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
31 lines (30 loc) • 883 B
TypeScript
import type { TextStyle } from '../../text/TextStyle';
import type { AbstractBitmapFont } from '../AbstractBitmapFont';
/**
* The layout data for a bitmap text.
* This contains the width, height, scale, offsetY and lines of text.
* Each line contains its width, character positions, characters, space width and spaces index.
* @category text
* @internal
*/
export interface BitmapTextLayoutData {
width: number;
height: number;
scale: number;
offsetY: number;
lines: {
width: number;
charPositions: number[];
chars: string[];
spaceWidth: number;
spacesIndex: number[];
}[];
}
/**
* @param chars
* @param style
* @param font
* @param trimEnd
* @internal
*/
export declare function getBitmapTextLayout(chars: string[], style: TextStyle, font: AbstractBitmapFont<any>, trimEnd: boolean): BitmapTextLayoutData;