Difference between revisions of "FontBase"

From GiderosMobile
(Undo revision 13879 by MoKaLux (talk))
Tag: Undo
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
+
<!-- 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/>
 
'''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/>
Line 6: Line 6:
  
 
=== Description ===
 
=== Description ===
[[FontBase]] is the base class for [[Font]] and [[TTFont]] classes.
+
'''FontBase''' is the base class for Font and TTFont classes.
  
 
{|-
 
{|-
 
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
 
=== Methods ===
 
=== Methods ===
[[FontBase:getAdvanceX]] <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]] ''returns the ascender of the font''<br/>
+
[[FontBase:getAscender]] ''returns the ascender of the font''<br/><!--GIDEROSMTD:FontBase:getAscender() returns the ascender of the font-->
[[FontBase:getBounds]] ''returns the tight bounding rectangle of the characters in the string specified by text''<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]] <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]] ''returns the distance from one base line to the next''<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]] ''compute layout of text with given constraints''<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_LTR]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_LEFT TLF_LEFT-->
[[FontBase.TLF_NOBIDI]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_LTR TLF_LTR-->
[[FontBase.TLF_NOSHAPING]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_NOBIDI TLF_NOBIDI-->
[[FontBase.TLF_NOWRAP]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_NOSHAPING TLF_NOSHAPING-->
[[FontBase.TLF_REF_ASCENT]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_NOWRAP TLF_NOWRAP-->
[[FontBase.TLF_REF_BASELINE]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_ASCENT TLF_REF_ASCENT-->
[[FontBase.TLF_REF_BOTTOM]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_BASELINE TLF_REF_BASELINE-->
[[FontBase.TLF_REF_DESCENT]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_BOTTOM TLF_REF_BOTTOM-->
[[FontBase.TLF_REF_MEDIAN]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_DESCENT TLF_REF_DESCENT-->
[[FontBase.TLF_REF_MIDDLE]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_LINETOP TLF_REF_LINETOP-->
[[FontBase.TLF_REF_TOP]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_MEDIAN TLF_REF_MEDIAN-->
[[FontBase.TLF_RIGHT]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_MIDDLE TLF_REF_MIDDLE-->
[[FontBase.TLF_RTL]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_REF_TOP TLF_REF_TOP-->
[[FontBase.TLF_TOP]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_RIGHT TLF_RIGHT-->
[[FontBase.TLF_VCENTER]]<br/>
+
<!--GIDEROSCST:FontBase.TLF_RTL TLF_RTL-->
 
+
<!--GIDEROSCST:FontBase.TLF_TOP TLF_TOP-->
 +
<!--GIDEROSCST:FontBase.TLF_VCENTER TLF_VCENTER-->
 
|}
 
|}
  
----
+
{{GIDEROS IMPORTANT LINKS}}
{{Special:PrefixIndex/FontBase:}}
 
<br/>
 
 
 
{{Special:PrefixIndex/FontBase.TLF}}
 
<br/>
 

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