UNPKG

starling-framework

Version:

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

825 lines 85.2 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>BitmapFont | starling-framework</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">starling-framework</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../index.html">starling</a> </li> <li> <a href="../modules/starling.text.html">text</a> </li> <li> <a href="starling.text.bitmapfont.html">BitmapFont</a> </li> </ul> <h1>Class BitmapFont</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The BitmapFont class parses bitmap font files and arranges the glyphs in the form of a text.</p> </div> <p> The class parses the XML format as it is used in the <a href="http://www.angelcode.com/products/bmfont/">AngelCode Bitmap Font Generator</a> or the <a href="http://glyphdesigner.71squared.com/">Glyph Designer</a>. This is what the file format looks like:</p> <pre> &lt;font&gt; &lt;info face="BranchingMouse" size="40" /&gt; &lt;common lineHeight="40" /&gt; &lt;pages&gt; &lt;!-- currently, only one page is supported --&gt; &lt;page id="0" file="texture.png" /&gt; &lt;/pages&gt; &lt;chars&gt; &lt;char id="32" x="60" y="29" width="1" height="1" xoffset="0" yoffset="27" xadvance="8" /&gt; &lt;char id="33" x="155" y="144" width="9" height="21" xoffset="0" yoffset="6" xadvance="9" /&gt; &lt;/chars&gt; &lt;kernings&gt; &lt;!-- Kerning is optional --&gt; &lt;kerning first="83" second="83" amount="-4"/&gt; &lt;/kernings&gt; &lt;/font&gt; </pre> <p> Pass an instance of this class to the method <code>registerBitmapFont</code> of the TextField class. Then, set the <code>fontName</code> property of the text field to the <code>name</code> value of the bitmap font. This will make the text field use the bitmap font.</p> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">BitmapFont</span> </li> </ul> </section> <section class="tsd-panel"> <h3>Implements</h3> <ul class="tsd-hierarchy"> <li><a href="starling.text.itextcompositor.html" class="tsd-signature-type">ITextCompositor</a></li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-external"> <h3>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section tsd-is-external"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#baseline" class="tsd-kind-icon">baseline</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#distancefieldspread" class="tsd-kind-icon">distance<wbr>Field<wbr>Spread</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#lineheight" class="tsd-kind-icon">line<wbr>Height</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#name" class="tsd-kind-icon">name</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#offsetx" class="tsd-kind-icon">offsetX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#offsety" class="tsd-kind-icon">offsetY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#padding" class="tsd-kind-icon">padding</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#size" class="tsd-kind-icon">size</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#smoothing" class="tsd-kind-icon">smoothing</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#type" class="tsd-kind-icon">type</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="starling.text.bitmapfont.html#mini" class="tsd-kind-icon">MINI</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="starling.text.bitmapfont.html#native_size" class="tsd-kind-icon">NATIVE_<wbr>SIZE</a></li> </ul> </section> <section class="tsd-index-section tsd-is-external"> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#addchar" class="tsd-kind-icon">add<wbr>Char</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#arrangechars" class="tsd-kind-icon">arrange<wbr>Chars</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#clearmeshbatch" class="tsd-kind-icon">clear<wbr>Mesh<wbr>Batch</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#createsprite" class="tsd-kind-icon">create<wbr>Sprite</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#dispose" class="tsd-kind-icon">dispose</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#fillmeshbatch" class="tsd-kind-icon">fill<wbr>Mesh<wbr>Batch</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#getchar" class="tsd-kind-icon">get<wbr>Char</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#getcharids" class="tsd-kind-icon">get<wbr>CharIDs</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#getdefaultmeshstyle" class="tsd-kind-icon">get<wbr>Default<wbr>Mesh<wbr>Style</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_baseline" class="tsd-kind-icon">get_<wbr>baseline</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#get_distancefieldspread" class="tsd-kind-icon">get_<wbr>distance<wbr>Field<wbr>Spread</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_lineheight" class="tsd-kind-icon">get_<wbr>line<wbr>Height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_name" class="tsd-kind-icon">get_<wbr>name</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_offsetx" class="tsd-kind-icon">get_<wbr>offsetX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_offsety" class="tsd-kind-icon">get_<wbr>offsetY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_padding" class="tsd-kind-icon">get_<wbr>padding</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_size" class="tsd-kind-icon">get_<wbr>size</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_smoothing" class="tsd-kind-icon">get_<wbr>smoothing</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#get_texture" class="tsd-kind-icon">get_<wbr>texture</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#get_type" class="tsd-kind-icon">get_<wbr>type</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#haschars" class="tsd-kind-icon">has<wbr>Chars</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#set_baseline" class="tsd-kind-icon">set_<wbr>baseline</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#set_distancefieldspread" class="tsd-kind-icon">set_<wbr>distance<wbr>Field<wbr>Spread</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#set_lineheight" class="tsd-kind-icon">set_<wbr>line<wbr>Height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#set_offsetx" class="tsd-kind-icon">set_<wbr>offsetX</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#set_offsety" class="tsd-kind-icon">set_<wbr>offsetY</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#set_padding" class="tsd-kind-icon">set_<wbr>padding</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"><a href="starling.text.bitmapfont.html#set_smoothing" class="tsd-kind-icon">set_<wbr>smoothing</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="starling.text.bitmapfont.html#set_type" class="tsd-kind-icon">set_<wbr>type</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-external"> <a name="constructor" class="tsd-anchor"></a> <h3>constructor</h3> <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">new <wbr>Bitmap<wbr>Font<span class="tsd-signature-symbol">(</span>texture<span class="tsd-signature-symbol">?: </span><a href="starling.textures.texture.html" class="tsd-signature-type">Texture</a>, fontData<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.text.bitmapfont.html" class="tsd-signature-type">BitmapFont</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L56">lib/starling/text/BitmapFont.d.ts:56</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Creates a bitmap font from the given texture and font data. If you don&#39;t pass any data, the &quot;mini&quot; font will be created.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> texture: <a href="starling.textures.texture.html" class="tsd-signature-type">Texture</a></h5> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The texture containing all the glyphs.</p> </div> </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> fontData: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Typically an XML file in the standard AngelCode format. override the the &#39;parseFontData&#39; method to add support for additional formats.</p> </div> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="starling.text.bitmapfont.html" class="tsd-signature-type">BitmapFont</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="baseline" class="tsd-anchor"></a> <h3>baseline</h3> <div class="tsd-signature tsd-kind-icon">baseline<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L139">lib/starling/text/BitmapFont.d.ts:139</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The baseline of the font. This property does not affect text rendering; it&#39;s just an information that may be useful for exact text placement.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="distancefieldspread" class="tsd-anchor"></a> <h3>distance<wbr>Field<wbr>Spread</h3> <div class="tsd-signature tsd-kind-icon">distance<wbr>Field<wbr>Spread<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L123">lib/starling/text/BitmapFont.d.ts:123</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>If the font uses a distance field texture, this property returns its spread (i.e. the width of the blurred edge in points).</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="lineheight" class="tsd-anchor"></a> <h3>line<wbr>Height</h3> <div class="tsd-signature tsd-kind-icon">line<wbr>Height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L128">lib/starling/text/BitmapFont.d.ts:128</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The height of one line in points.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="name" class="tsd-anchor"></a> <h3>name</h3> <div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L109">lib/starling/text/BitmapFont.d.ts:109</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The name of the font as it was parsed from the font file.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="offsetx" class="tsd-anchor"></a> <h3>offsetX</h3> <div class="tsd-signature tsd-kind-icon">offsetX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L145">lib/starling/text/BitmapFont.d.ts:145</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>An offset that moves any generated text along the x-axis (in points). Useful to make up for incorrect font data. @default 0.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="offsety" class="tsd-anchor"></a> <h3>offsetY</h3> <div class="tsd-signature tsd-kind-icon">offsetY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L151">lib/starling/text/BitmapFont.d.ts:151</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>An offset that moves any generated text along the y-axis (in points). Useful to make up for incorrect font data. @default 0.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="padding" class="tsd-anchor"></a> <h3>padding</h3> <div class="tsd-signature tsd-kind-icon">padding<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L158">lib/starling/text/BitmapFont.d.ts:158</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The width of a &quot;gutter&quot; around the composed text area, in points. This can be used to bring the output more in line with standard TrueType rendering: Flash always draws them with 2 pixels of padding. @default 0.0</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="size" class="tsd-anchor"></a> <h3>size</h3> <div class="tsd-signature tsd-kind-icon">size<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L113">lib/starling/text/BitmapFont.d.ts:113</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The native size of the font.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="smoothing" class="tsd-anchor"></a> <h3>smoothing</h3> <div class="tsd-signature tsd-kind-icon">smoothing<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L133">lib/starling/text/BitmapFont.d.ts:133</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The smoothing filter that is used for the texture.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external"> <a name="type" class="tsd-anchor"></a> <h3>type</h3> <div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L117">lib/starling/text/BitmapFont.d.ts:117</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The type of the bitmap font. @see starling.text.BitmapFontType @default standard</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"> <a name="mini" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> MINI</h3> <div class="tsd-signature tsd-kind-icon">MINI<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L56">lib/starling/text/BitmapFont.d.ts:56</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The font name of the embedded minimal bitmap font. Use this e.g. for debug output.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static tsd-is-external"> <a name="native_size" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> NATIVE_<wbr>SIZE</h3> <div class="tsd-signature tsd-kind-icon">NATIVE_<wbr>SIZE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L53">lib/starling/text/BitmapFont.d.ts:53</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Use this constant for the <code>fontSize</code> property of the TextField class to render the bitmap font in exactly the size it was created.</p> </div> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="addchar" class="tsd-anchor"></a> <h3>add<wbr>Char</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">add<wbr>Char<span class="tsd-signature-symbol">(</span>charID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, bitmapChar<span class="tsd-signature-symbol">: </span><a href="starling.text.bitmapchar.html" class="tsd-signature-type">BitmapChar</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L74">lib/starling/text/BitmapFont.d.ts:74</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds a bitmap char with a certain character ID.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>charID: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>bitmapChar: <a href="starling.text.bitmapchar.html" class="tsd-signature-type">BitmapChar</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="arrangechars" class="tsd-anchor"></a> <h3>arrange<wbr>Chars</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">arrange<wbr>Chars<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, text<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, format<span class="tsd-signature-symbol">: </span><a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a>, options<span class="tsd-signature-symbol">: </span><a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Vector</span><span class="tsd-signature-symbol">&lt;</span><a href="starling.text.bitmapcharlocation.html" class="tsd-signature-type">BitmapCharLocation</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L105">lib/starling/text/BitmapFont.d.ts:105</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Arranges the characters of text inside a rectangle, adhering to the given settings. Returns a Vector of BitmapCharLocations.</p> </div> <p>BEWARE: This method uses an object pool for the returned vector and all (returned and temporary) BitmapCharLocation instances. Do not save any references and always call <code>BitmapCharLocation.rechargePool()</code> when you are done processing. </p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>width: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>height: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>text: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>format: <a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a></h5> </li> <li> <h5>options: <a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Vector</span><span class="tsd-signature-symbol">&lt;</span><a href="starling.text.bitmapcharlocation.html" class="tsd-signature-type">BitmapCharLocation</a><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="clearmeshbatch" class="tsd-anchor"></a> <h3>clear<wbr>Mesh<wbr>Batch</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">clear<wbr>Mesh<wbr>Batch<span class="tsd-signature-symbol">(</span>meshBatch<span class="tsd-signature-symbol">: </span><a href="starling.display.meshbatch.html" class="tsd-signature-type">MeshBatch</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L91">lib/starling/text/BitmapFont.d.ts:91</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <dl class="tsd-comment-tags"> <dt>inheritdoc</dt> <dd></dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>meshBatch: <a href="starling.display.meshbatch.html" class="tsd-signature-type">MeshBatch</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="createsprite" class="tsd-anchor"></a> <h3>create<wbr>Sprite</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">create<wbr>Sprite<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, text<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, format<span class="tsd-signature-symbol">: </span><a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a>, options<span class="tsd-signature-symbol">?: </span><a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.display.sprite.html" class="tsd-signature-type">Sprite</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L83">lib/starling/text/BitmapFont.d.ts:83</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Creates a sprite that contains a certain text, made up by one image per char.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>width: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>height: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>text: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>format: <a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="starling.display.sprite.html" class="tsd-signature-type">Sprite</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="dispose" class="tsd-anchor"></a> <h3>dispose</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">dispose<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L68">lib/starling/text/BitmapFont.d.ts:68</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Disposes the texture of the bitmap font!</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="fillmeshbatch" class="tsd-anchor"></a> <h3>fill<wbr>Mesh<wbr>Batch</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">fill<wbr>Mesh<wbr>Batch<span class="tsd-signature-symbol">(</span>meshBatch<span class="tsd-signature-symbol">: </span><a href="starling.display.meshbatch.html" class="tsd-signature-type">MeshBatch</a>, width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, text<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, format<span class="tsd-signature-symbol">: </span><a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a>, options<span class="tsd-signature-symbol">?: </span><a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L87">lib/starling/text/BitmapFont.d.ts:87</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Draws text into a QuadBatch.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>meshBatch: <a href="starling.display.meshbatch.html" class="tsd-signature-type">MeshBatch</a></h5> </li> <li> <h5>width: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>height: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>text: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>format: <a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getchar" class="tsd-anchor"></a> <h3>get<wbr>Char</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Char<span class="tsd-signature-symbol">(</span>charID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.text.bitmapchar.html" class="tsd-signature-type">BitmapChar</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L71">lib/starling/text/BitmapFont.d.ts:71</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns a single bitmap char with a certain character ID.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>charID: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="starling.text.bitmapchar.html" class="tsd-signature-type">BitmapChar</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getcharids" class="tsd-anchor"></a> <h3>get<wbr>CharIDs</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>CharIDs<span class="tsd-signature-symbol">(</span>result<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Vector</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Vector</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L77">lib/starling/text/BitmapFont.d.ts:77</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns a vector containing all the character IDs that are contained in this font.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> result: <span class="tsd-signature-type">Vector</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Vector</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="getdefaultmeshstyle" class="tsd-anchor"></a> <h3>get<wbr>Default<wbr>Mesh<wbr>Style</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get<wbr>Default<wbr>Mesh<wbr>Style<span class="tsd-signature-symbol">(</span>previousStyle<span class="tsd-signature-symbol">: </span><a href="starling.styles.meshstyle.html" class="tsd-signature-type">MeshStyle</a>, format<span class="tsd-signature-symbol">: </span><a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a>, options<span class="tsd-signature-symbol">: </span><a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="starling.styles.meshstyle.html" class="tsd-signature-type">MeshStyle</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L94">lib/starling/text/BitmapFont.d.ts:94</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <dl class="tsd-comment-tags"> <dt>inheritdoc</dt> <dd></dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>previousStyle: <a href="starling.styles.meshstyle.html" class="tsd-signature-type">MeshStyle</a></h5> </li> <li> <h5>format: <a href="starling.text.textformat.html" class="tsd-signature-type">TextFormat</a></h5> </li> <li> <h5>options: <a href="starling.text.textoptions.html" class="tsd-signature-type">TextOptions</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="starling.styles.meshstyle.html" class="tsd-signature-type">MeshStyle</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_baseline" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>baseline</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>baseline<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L140">lib/starling/text/BitmapFont.d.ts:140</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external"> <a name="get_distancefieldspread" class="tsd-anchor"></a> <h3>get_<wbr>distance<wbr>Field<wbr>Spread</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>distance<wbr>Field<wbr>Spread<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L124">lib/starling/text/BitmapFont.d.ts:124</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_lineheight" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>line<wbr>Height</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>line<wbr>Height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L129">lib/starling/text/BitmapFont.d.ts:129</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_name" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>name</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>name<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L110">lib/starling/text/BitmapFont.d.ts:110</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_offsetx" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>offsetX</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>offsetX<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L146">lib/starling/text/BitmapFont.d.ts:146</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_offsety" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> get_<wbr>offsetY</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <li class="tsd-signature tsd-kind-icon">get_<wbr>offsetY<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/openfl/starling/blob/bce2af2/lib/starling/text/BitmapFont.d.ts#L152">lib/starling/text/BitmapFont.d.ts:152</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-external"> <a name="get_padding" class="tsd-anchor"></a> <h3><s