Difference between revisions of "Font"
From GiderosMobile
(----) |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | ||
− | + | '''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/> |
− | ''' | + | '''Inherits from:''' [[FontBase]]<br/> |
− | ''' | + | |
− | === | + | === Description === |
− | + | The [[Font]] class is used to load fonts created by "Gideros Font Creator". | |
− | + | ||
[[File:Font creator.png]]<br /> | [[File:Font creator.png]]<br /> | ||
− | + | ||
− | + | ||
− | Gideros Font Creator exports two files: | + | Gideros Font Creator exports two files: a ''.txt'' file that specifies the positions of character glyph, and a ''.png'' file of font. |
− | === | + | |
+ | === Examples === | ||
'''Use these two files to create `Font` object as:'''<br/> | '''Use these two files to create `Font` object as:'''<br/> | ||
− | <source lang="lua">local font = Font.new("font.txt", "font.png")</source> | + | |
+ | <source lang="lua"> | ||
+ | local font = Font.new("font.txt", "font.png") | ||
+ | </source> | ||
+ | |||
{|- | {|- | ||
+ | |||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | |
− | [[ | + | === Methods === |
− | [[ | + | [[Font.getDefault]] ''Get default font''<br/> |
+ | [[Font.new]] ''creates a new Font object''<br/> | ||
+ | |||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | |
− | === | + | === Events === |
+ | |||
+ | === Constants === | ||
+ | |||
|} | |} | ||
+ | |||
+ | ---- | ||
+ | {{Special:PrefixIndex/Font.}} | ||
+ | <br/> |
Revision as of 20:56, 2 December 2019
Supported platforms:
Available since: Gideros 2011.6
Inherits from: FontBase
Description
The Font class is used to load fonts created by "Gideros Font Creator".
Gideros Font Creator exports two files: a .txt file that specifies the positions of character glyph, and a .png file of font.
Examples
Use these two files to create `Font` object as:
local font = Font.new("font.txt", "font.png")
MethodsFont.getDefault Get default font |
EventsConstants |