Constructor

new(fontData:BitmapFontData, pages:Map<String, Texture>)

Variables

@:value(new IntMap(16, 0.5, true))pages:IntMap<Texture> = new IntMap(16, 0.5, true)

The map of font texture pages to their id.

read onlymsdf:Bool

spaceChar:BitmapFontCharacter

Cached reference of the ' '(32) character, for sizing on tabs/spaces

@:value(null)pageShaders:Map<Int, Shader> = null

Shaders used to render the characters. If null, uses default shader. When loading MSDF fonts, ceramic's MSDF shader will be assigned here. Stored per page

@:value(null)preRenderedPages:Map<Int, Map<Int, Texture>> = null

When using MSDF fonts, or fonts with custom shaders, it is possible to pre-render characters onto a RenderTexture to use it like a regular texture later with default shader. Useful in some situations to reduce draw calls.

Methods

preRenderAtSize(pixelSize:Int, done:() ‑> Void):Void

inlinekerning(first:Int, second:Int):Float

Returns the kerning between two glyphs, or 0 if none. A glyph int id is the value from 'c'.charCodeAt(0)

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

read onlyhasData:Bool

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

@editablecomponents:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun

Creates a new Autorun instance with the given callback associated with the current entity.

Parameters:

run

The run callback

Returns:

The autorun instance

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

component<C>(?name:String, ?component:Null<C>):C