A text compositor arranges letters for Starling's TextField.

### Hierarchy

- ITextCompositor

### Implemented by

- BitmapFont
- TrueTypeCompositor

## Index

### Methods

- clearMeshBatch
- dispose
- fillMeshBatch
- getDefaultMeshStyle

## Methods

### clearMeshBatch

- clearMeshBatch(meshBatch: MeshBatch): void

- - Defined in lib/starling/text/ITextCompositor.d.ts:17

  Clears the MeshBatch (filled by the same class) and disposes any resources that are no longer needed.

  #### Parameters

  - ##### meshBatch: MeshBatch

  #### Returns void

### dispose

- dispose(): void

- - Defined in lib/starling/text/ITextCompositor.d.ts:27

  Frees all resources allocated by the compositor.

  #### Returns void

### fillMeshBatch

- fillMeshBatch(meshBatch: MeshBatch, width: number, height: number, text: string, format: TextFormat, options?: TextOptions): void

- - Defined in lib/starling/text/ITextCompositor.d.ts:12

  Draws the given text into a MeshBatch, using the supplied format and options.

  #### Parameters

  - ##### meshBatch: MeshBatch

  - ##### width: number

  - ##### height: number

  - ##### text: string

  - ##### format: TextFormat

  - ##### Optional options: TextOptions

  #### Returns void

### getDefaultMeshStyle

- getDefaultMeshStyle(previousStyle: MeshStyle, format: TextFormat, options: TextOptions): MeshStyle

- - Defined in lib/starling/text/ITextCompositor.d.ts:23

  Creates and/or sets up the default MeshStyle to be used for rendering. If `previousStyle` has the correct type, it is configured as needed and then returned; otherwise, a new style is created, configured and returned. The method may return `null` if there are no special style requirements.

  #### Parameters

  - ##### previousStyle: MeshStyle

  - ##### format: TextFormat

  - ##### options: TextOptions

  #### Returns MeshStyle

Generated using TypeDoc