Difference between revisions of "Font"
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/FontBase|FontBase]]<br/> | '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/> | ||
| + | |||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
| − | + | The [[Special:MyLanguage/Font|Font]] class is used to load fonts created by "Gideros Font Creator". | |
| − | + | ||
| − | [[File:Font creator.png]] | + | [[File:Font creator.png]] |
| − | + | ||
| − | + | Gideros Font Creator exports two files: A ''.txt'' file that specifies the positions of character glyph a ''.png'' file of font. | |
| − | Gideros Font Creator exports two files: A ''.txt'' file that specifies the positions of character glyph a ''.png'' file of font. | + | |
=== <translate>Examples</translate> === | === <translate>Examples</translate> === | ||
'''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;"| | ||
| Line 20: | Line 24: | ||
[[Special:MyLanguage/Font.getDefault|Font.getDefault]] ''<translate>Get default font</translate>''<br/><!-- GIDEROSMTD:Font.getDefault() Get default font --> | [[Special:MyLanguage/Font.getDefault|Font.getDefault]] ''<translate>Get default font</translate>''<br/><!-- GIDEROSMTD:Font.getDefault() Get default font --> | ||
[[Special:MyLanguage/Font.new|Font.new]] ''<translate>creates a new Font object</translate>''<br/><!-- GIDEROSMTD:Font.new(txtfile,imagefile,filtering) creates a new Font object --> | [[Special:MyLanguage/Font.new|Font.new]] ''<translate>creates a new Font object</translate>''<br/><!-- GIDEROSMTD:Font.new(txtfile,imagefile,filtering) creates a new Font object --> | ||
| + | |||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Events</translate> === | === <translate>Events</translate> === | ||
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
|} | |} | ||
| − | |||
| − | |||
Revision as of 23:28, 9 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 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 |
