Font: Difference between revisions

From GiderosMobile
Undo revision 13875 by MoKaLux (talk)
Tag: Undo
Undo revision 13700 by MoKaLux (talk)
Tag: Undo
Line 1: Line 1:
__NOTOC__
__NOTOC__
 
<languages />
'''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/>
<!-- GIDEROSOBJ:Font -->
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Supported platforms</translate>:''' [[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/>
'''Inherits from:''' [[FontBase]]<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/>
=== Description ===
=== <translate>Description</translate> ===
The [[Font]] class is used to load fonts created by "Gideros Font Creator".
<translate>The [[Special:MyLanguage/Font|Font]] class is used to load fonts created by "Gideros Font Creator".<br />
 
<br />
[[File:Font creator.png]]<br />
[[File:Font creator.png]]<br />
 
<br />
 
<br />
Gideros Font Creator exports two files: a ''.txt'' file that specifies the positions of character glyph, and 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.<br /></translate>
 
=== <translate>Examples</translate> ===
=== 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;"|
 
=== <translate>Methods</translate> ===
=== Methods ===
[[Special:MyLanguage/Font.getDefault|Font.getDefault]] ''<translate>Get default font</translate>''<br/><!-- GIDEROSMTD:Font.getDefault() Get default font -->
[[Font.getDefault]] ''Get default font''<br/>
[[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 -->
[[Font.new]] ''creates a new Font object''<br/>
 
| style="width: 50%; vertical-align:top;"|
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
=== Events ===
=== <translate>Constants</translate> ===
 
=== Constants ===
 
|}
|}
----
{{Special:PrefixIndex/Font.}}
<br/>

Revision as of 10:13, 4 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")

Methods

Font.getDefault Get default font
Font.new creates a new Font object

Events

Constants