Component:DynamicSpriteFont: Difference between revisions

From Resonite Wiki
Automated: update component fields
add remaining info
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=DynamicSpriteFontComponent.png
|Image=DynamicSpriteFontComponent.png
|Name=Dynamic Sprite Font
|Name=Dynamic Sprite Font
}}
}}
The '''DynamicSpriteFont''' component is used to construct a font asset that can be used to create custom fonts character by character.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|HighPriorityIntegration|Bool|
|HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}}
|MaxSize|Int|
|MaxSize|Int| The max size of a glyph in the font sheet.
|Glyphs|{{RootFieldType|SyncList`1|[[Type:SpriteGlyph|SpriteGlyph]]}}|TypeAdv2=true|
|Glyphs|{{RootFieldType|SyncList`1|[[#SpriteGlyph|SpriteGlyph]]}}|TypeAdv2=true| A list of Font characters that should make up this dynamic font.
}}
 
== SpriteGlyph ==
{{Table TypeFields
|SpriteURL|Uri| The resource URI of the Font character.
|UnicodeCodepoint|UInt| the Unicode number of this Font character. See [https://en.m.wikipedia.org/wiki/List_of_Unicode_characters Wikipedia list of unicode characters].
|SpriteName|String| The name of the Sprite.
|Bearing|Float2| The gap from this glyph from other Glyphs on the sheet.
|Advance|Float2| How much to advance the cursor when making the sheet.
|Size|Float| the size of the glyph on the sheet.
|Tintable|Bool| Whether this glyph is affectable by Font color.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
{{stub}}


<!--T:4-->
<!--T:4-->
Line 23: Line 35:


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Dynamic Sprite Font]]
[[Category:Components{{#translation:}}|Dynamic Sprite Font]]
[[Category:Components:Assets:Procedural Fonts{{#translation:}}|Dynamic Sprite Font]]
[[Category:Components:Assets:Procedural Fonts{{#translation:}}|Dynamic Sprite Font]]
[[Category:Components With Nested Types{{#translation:}}|Dynamic Sprite Font]]

Latest revision as of 00:47, 15 January 2025

Component image 
Dynamic Sprite Font component as seen in the Scene Inspector

The DynamicSpriteFont component is used to construct a font asset that can be used to create custom fonts character by character.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
HighPriorityIntegration Bool If true, integrating this asset (e.g. processing procedural assets) gets higher priority than assets with this flag off. An example is user laser procedural meshes.
MaxSize Int The max size of a glyph in the font sheet.
Glyphs list of SpriteGlyph A list of Font characters that should make up this dynamic font.

SpriteGlyph

Fields
Name Type Description
SpriteURL Uri The resource URI of the Font character.
UnicodeCodepoint UInt the Unicode number of this Font character. See Wikipedia list of unicode characters.
SpriteName String The name of the Sprite.
Bearing Float2 The gap from this glyph from other Glyphs on the sheet.
Advance Float2 How much to advance the cursor when making the sheet.
Size Float the size of the glyph on the sheet.
Tintable Bool Whether this glyph is affectable by Font color.

Usage

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Examples

See Also