Difference between revisions of "FontBase"

From GiderosMobile
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' android, ios, mac, pc<br/>
+
<!-- GIDEROSOBJ:FontBase -->
 +
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Inherits from:''' [[Object]]<br/>
 +
 
=== Description ===
 
=== Description ===
<translate><br />
+
'''FontBase''' is the base class for Font and TTFont classes.
[[FontBase]] is the base class for [[Font]] and [[TTFont]] classes.<br />
+
 
<br /></translate>
 
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[FontBase:getAdvanceX]] ''<translate></translate>''<br/>
+
[[FontBase:getAdvanceX]] ''returns the width of the first character''<br/><!--GIDEROSMTD:FontBase:getAdvanceX(text,letterSpacing,size) returns the width of the first character-->
[[FontBase:getAscender]] ''<translate>returns the ascender of the font</translate>''<br/>
+
[[FontBase:getAscender]] ''returns the ascender of the font''<br/><!--GIDEROSMTD:FontBase:getAscender() returns the ascender of the font-->
[[FontBase:getBounds]] ''<translate>returns the tight bounding rectangle of the characters in the string specified by text</translate>''<br/>
+
[[FontBase:getBounds]] ''returns the tight bounding rectangle of the characters in the string specified by text''<br/><!--GIDEROSMTD:FontBase:getBounds(text) returns the tight bounding rectangle of the characters in the string specified by text-->
[[FontBase:getCharIndexAtOffset]] ''<translate></translate>''<br/>
+
[[FontBase:getCharIndexAtOffset]] ''returns the offset within the given text string''<br/><!--GIDEROSMTD:FontBase:getCharIndexAtOffset(text,offset,letterSpacing,size) returns the offset within the given text string-->
[[FontBase:getLineHeight]] ''<translate>returns the distance from one base line to the next</translate>''<br/>
+
[[FontBase:getLineHeight]] ''returns the distance from one base line to the next''<br/><!--GIDEROSMTD:FontBase:getLineHeight() returns the distance from one base line to the next-->
[[FontBase:layoutText]] ''<translate>compute layout of text with given constraints</translate>''<br/>
+
[[FontBase:layoutText]] ''computes the text layout with given constraints''<br/><!--GIDEROSMTD:FontBase:layoutText(text,width,height,flags,letterSpacing,lineSpacing,tabSpace,breakChar) computes the text layout with given constraints-->
 +
 
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
[[FontBase.TLF_BOTTOM]]<br/>
+
'''[[FontBase Constants]]'''
[[FontBase.TLF_BREAKWORDS]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_BOTTOM TLF_BOTTOM-->
[[FontBase.TLF_CENTER]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_BREAKWORDS TLF_BREAKWORDS-->
[[FontBase.TLF_JUSTIFIED]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_CENTER TLF_CENTER-->
[[FontBase.TLF_LEFT]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_JUSTIFIED TLF_JUSTIFIED-->
[[FontBase.TLF_NOWRAP]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_LEFT TLF_LEFT-->
[[FontBase.TLF_REF_BASELINE]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_LTR TLF_LTR-->
[[FontBase.TLF_REF_BOTTOM]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_NOBIDI TLF_NOBIDI-->
[[FontBase.TLF_REF_MIDDLE]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_NOSHAPING TLF_NOSHAPING-->
[[FontBase.TLF_REF_TOP]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_NOWRAP TLF_NOWRAP-->
[[FontBase.TLF_RIGHT]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_ASCENT TLF_REF_ASCENT-->
[[FontBase.TLF_TOP]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_BASELINE TLF_REF_BASELINE-->
[[FontBase.TLF_VCENTER]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_BOTTOM TLF_REF_BOTTOM-->
 +
<!--GIDEROSCST:FontBase.TLF_REF_DESCENT TLF_REF_DESCENT-->
 +
<!--GIDEROSCST:FontBase.TLF_REF_LINETOP TLF_REF_LINETOP-->
 +
<!--GIDEROSCST:FontBase.TLF_REF_MEDIAN TLF_REF_MEDIAN-->
 +
<!--GIDEROSCST:FontBase.TLF_REF_MIDDLE TLF_REF_MIDDLE-->
 +
<!--GIDEROSCST:FontBase.TLF_REF_TOP TLF_REF_TOP-->
 +
<!--GIDEROSCST:FontBase.TLF_RIGHT TLF_RIGHT-->
 +
<!--GIDEROSCST:FontBase.TLF_RTL TLF_RTL-->
 +
<!--GIDEROSCST:FontBase.TLF_TOP TLF_TOP-->
 +
<!--GIDEROSCST:FontBase.TLF_VCENTER TLF_VCENTER-->
 
|}
 
|}
 +
 +
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 18:11, 17 November 2023

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 returns the width of the first character
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 returns the offset within the given text string
FontBase:getLineHeight returns the distance from one base line to the next
FontBase:layoutText computes the text layout with given constraints

Events

Constants

FontBase Constants