Difference between revisions of "FontBase"

From GiderosMobile
(template)
Line 5: Line 5:
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate><br />
+
[[Special:MyLanguage/FontBase|FontBase]] is the base class for [[Special:MyLanguage/Font|Font]] and [[Special:MyLanguage/TTFont|TTFont]] classes.
[[Special:MyLanguage/FontBase|FontBase]] is the base class for [[Special:MyLanguage/Font|Font]] and [[Special:MyLanguage/TTFont|TTFont]] classes.<br />
+
 
<br /></translate>
 
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
Line 18: Line 18:
 
[[Special:MyLanguage/FontBase:getLineHeight|FontBase:getLineHeight]] ''<translate>returns the distance from one base line to the next</translate>''<br/><!-- GIDEROSMTD:FontBase:getLineHeight() returns the distance from one base line to the next -->
 
[[Special:MyLanguage/FontBase:getLineHeight|FontBase:getLineHeight]] ''<translate>returns the distance from one base line to the next</translate>''<br/><!-- GIDEROSMTD:FontBase:getLineHeight() returns the distance from one base line to the next -->
 
[[Special:MyLanguage/FontBase:layoutText|FontBase:layoutText]] ''<translate>compute layout of text with given constraints</translate>''<br/><!-- GIDEROSMTD:FontBase:layoutText(text,width,height,flags,letterSpacing,lineSpacing,tabSpace,breakChar) compute layout of text with given constraints -->
 
[[Special:MyLanguage/FontBase:layoutText|FontBase:layoutText]] ''<translate>compute layout of text with given constraints</translate>''<br/><!-- GIDEROSMTD:FontBase:layoutText(text,width,height,flags,letterSpacing,lineSpacing,tabSpace,breakChar) compute layout of text with given constraints -->
 +
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
Line 42: Line 43:
 
[[Special:MyLanguage/FontBase.TLF_NOSHAPING|FontBase.TLF_NOSHAPING]]<br/><!-- GIDEROSCST:FontBase.TLF_NOSHAPING TLF_NOSHAPING-->
 
[[Special:MyLanguage/FontBase.TLF_NOSHAPING|FontBase.TLF_NOSHAPING]]<br/><!-- GIDEROSCST:FontBase.TLF_NOSHAPING TLF_NOSHAPING-->
 
|}
 
|}
 
{{FontBase}}
 

Revision as of 23:29, 9 December 2019


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2011.6
Inherits from: Object

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_ASCENT
FontBase.TLF_REF_DESCENT
FontBase.TLF_REF_MEDIAN
FontBase.TLF_REF_TOP
FontBase.TLF_RIGHT
FontBase.TLF_TOP
FontBase.TLF_VCENTER
FontBase.TLF_RTL
FontBase.TLF_LTR
FontBase.TLF_NOBIDI
FontBase.TLF_NOSHAPING