CompositeFont.new: Difference between revisions
From GiderosMobile
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
''' | '''Available since:''' Gideros 2019.1<br/> | ||
''' | '''Class:''' [[CompositeFont]]<br/> | ||
=== Description === | === Description === | ||
Creates a new | Creates a new '''CompositeFont''' object. | ||
<source lang="lua"> | |||
CompositeFont.new(definition) | |||
</source> | |||
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: | * font: the font object to use for this layer (mandatory) | ||
* color: | * color: the color to use when rendering this layer | ||
* alpha: | * alpha: the alpha value to use with the color | ||
* x: | * x: the X offset to apply | ||
* y: | * y: the Y offset to apply | ||
* name: A name for this layer (since 2021.9) | * name: A name for this layer (since 2021.9) | ||
'''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. | ||
=== Parameters === | === Parameters === | ||
Revision as of 22:31, 5 June 2023
Available since: Gideros 2019.1
Class: CompositeFont
Description
Creates a new CompositeFont object.
CompositeFont.new(definition)
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
- name: A name for this layer (since 2021.9)
Note: TTFont without any character list specification aren't supported in composite fonts.
Parameters
definition: (table) a list of layer definition tables