Difference between revisions of "CompositeFont.new"
From GiderosMobile
(made it more clear to use curly braces) |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
'''<translate>Available since</translate>:''' Gideros 2019.1<br/> | '''<translate>Available since</translate>:''' Gideros 2019.1<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/CompositeFont|CompositeFont]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/CompositeFont|CompositeFont]]<br/> | ||
− | === | + | === Description === |
Creates a new [[Special:MyLanguage/CompositeFont|CompositeFont]] object. | Creates a new [[Special:MyLanguage/CompositeFont|CompositeFont]] object. | ||
Line 17: | Line 16: | ||
<source lang="lua"> | <source lang="lua"> | ||
− | CompositeFont.new{definition} -- * | + | CompositeFont.new{definition} -- *** PLEASE NOTICE THE CURLY BRACES { } INSTEAD OF ( ) *** |
</source> | </source> | ||
− | '''Note 2''': CompositeFont uses curly braces '''{ }''' instead of | + | '''Note 2''': CompositeFont uses curly braces '''{ }''' instead of parenthesis ( ). |
− | === | + | === Parameters === |
− | '''definition''': (table) | + | '''definition''': (table) a list of layer definition tables<br/> |
{{CompositeFont}} | {{CompositeFont}} |
Revision as of 03:59, 30 March 2020
Available since: Gideros 2019.1
Class: CompositeFont
Description
Creates a new CompositeFont object.
Each layer of the composited font is defined by a table. The following fields are possible:
- font: The font object to use for this layer (mandatory)
- color: The color to use when rendering this layer
- alpha: The alpha value to use with the color
- x: The X offset to apply
- y: The Y offset to apply
Note: TTFont without any character list specification aren't supported in composite fonts.
CompositeFont.new{definition} -- *** PLEASE NOTICE THE CURLY BRACES { } INSTEAD OF ( ) ***
Note 2: CompositeFont uses curly braces { } instead of parenthesis ( ).
Parameters
definition: (table) a list of layer definition tables