Difference between revisions of "FontBase"

From GiderosMobile
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
<translate><br />
 
<translate><br />
[[FontBase]] is the base class for [[Font]] and [[TTFont]] classes.<br />
+
[[Special:MyLanguage/FontBase|FontBase]] is the base class for [[Special:MyLanguage/Font|Font]] and [[Special:MyLanguage/TTFont|TTFont]] classes.<br />
 
<br /></translate>
 
<br /></translate>
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[FontBase:getAdvanceX]] <br/>
+
[[Special:MyLanguage/FontBase:getAdvanceX|FontBase:getAdvanceX]] <br/>
[[FontBase:getAscender]] ''<translate>returns the ascender of the font</translate>''<br/>
+
[[Special:MyLanguage/FontBase:getAscender|FontBase:getAscender]] ''<translate>returns the ascender of the font</translate>''<br/>
[[FontBase:getBounds]] ''<translate>returns the tight bounding rectangle of the characters in the string specified by text</translate>''<br/>
+
[[Special:MyLanguage/FontBase:getBounds|FontBase:getBounds]] ''<translate>returns the tight bounding rectangle of the characters in the string specified by text</translate>''<br/>
[[FontBase:getCharIndexAtOffset]] <br/>
+
[[Special:MyLanguage/FontBase:getCharIndexAtOffset|FontBase:getCharIndexAtOffset]] <br/>
[[FontBase:getLineHeight]] ''<translate>returns the distance from one base line to the next</translate>''<br/>
+
[[Special:MyLanguage/FontBase:getLineHeight|FontBase:getLineHeight]] ''<translate>returns the distance from one base line to the next</translate>''<br/>
[[FontBase:layoutText]] ''<translate>compute layout of text with given constraints</translate>''<br/>
+
[[Special:MyLanguage/FontBase:layoutText|FontBase:layoutText]] ''<translate>compute layout of text with given constraints</translate>''<br/>
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
[[FontBase.TLF_BOTTOM]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_BOTTOM|FontBase.TLF_BOTTOM]]<br/>
[[FontBase.TLF_BREAKWORDS]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_BREAKWORDS|FontBase.TLF_BREAKWORDS]]<br/>
[[FontBase.TLF_CENTER]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_CENTER|FontBase.TLF_CENTER]]<br/>
[[FontBase.TLF_JUSTIFIED]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_JUSTIFIED|FontBase.TLF_JUSTIFIED]]<br/>
[[FontBase.TLF_LEFT]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_LEFT|FontBase.TLF_LEFT]]<br/>
[[FontBase.TLF_NOWRAP]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_NOWRAP|FontBase.TLF_NOWRAP]]<br/>
[[FontBase.TLF_REF_BASELINE]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_REF_BASELINE|FontBase.TLF_REF_BASELINE]]<br/>
[[FontBase.TLF_REF_BOTTOM]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_REF_BOTTOM|FontBase.TLF_REF_BOTTOM]]<br/>
[[FontBase.TLF_REF_MIDDLE]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_REF_MIDDLE|FontBase.TLF_REF_MIDDLE]]<br/>
[[FontBase.TLF_REF_TOP]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_REF_TOP|FontBase.TLF_REF_TOP]]<br/>
[[FontBase.TLF_RIGHT]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_RIGHT|FontBase.TLF_RIGHT]]<br/>
[[FontBase.TLF_TOP]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_TOP|FontBase.TLF_TOP]]<br/>
[[FontBase.TLF_VCENTER]]<br/>
+
[[Special:MyLanguage/FontBase.TLF_VCENTER|FontBase.TLF_VCENTER]]<br/>
 
|}
 
|}

Revision as of 17:35, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


FontBase is the base class for Font and TTFont classes.

Methods

FontBase:getAdvanceX
FontBase:getAscender returns the ascender of the font
FontBase:getBounds returns the tight bounding rectangle of the characters in the string specified by text
FontBase:getCharIndexAtOffset
FontBase:getLineHeight returns the distance from one base line to the next
FontBase:layoutText compute layout of text with given constraints

Events

Constants

FontBase.TLF_BOTTOM
FontBase.TLF_BREAKWORDS
FontBase.TLF_CENTER
FontBase.TLF_JUSTIFIED
FontBase.TLF_LEFT
FontBase.TLF_NOWRAP
FontBase.TLF_REF_BASELINE
FontBase.TLF_REF_BOTTOM
FontBase.TLF_REF_MIDDLE
FontBase.TLF_REF_TOP
FontBase.TLF_RIGHT
FontBase.TLF_TOP
FontBase.TLF_VCENTER