Difference between revisions of "CompositeFont.new"

From GiderosMobile
Line 3: Line 3:
 
'''<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/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate><br />
+
Creates a new [[Special:MyLanguage/CompositeFont|CompositeFont]] object.
Creates a new [[Special:MyLanguage/CompositeFont|CompositeFont]] object.<br />
+
 
<br />
 
 
Each layer of the composited font is defined by a table. The following fields are possible:
 
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)
 
* font: The font object to use for this layer (mandatory)
Line 14: Line 14:
 
* y: The Y offset to apply
 
* y: The Y offset to apply
  
Note, TTFont without any character list specification aren't supported in composite fonts.
+
'''Note''': TTFont without any character list specification aren't supported in composite fonts.
</translate>
+
 
 
<source lang="lua">
 
<source lang="lua">
CompositeFont.new(definition)
+
CompositeFont.new(definition)
 
</source>
 
</source>
 +
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
'''definition''': (table) <translate>A list of layer definition tables</translate> <br/>
+
'''definition''': (table) <translate>A list of layer definition tables</translate><br/>
 +
 
 +
{{CompositeFont}}

Revision as of 06:27, 10 January 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)

Parameters

definition: (table) A list of layer definition tables