Font
class Font : Object
Description
Represents a font atlas.
Force has a very limited API with Font's because it still BETA (2025.b1), so you can use Font only to set it to some Text component and access as read-only for properties of font atlas.
Properties
channels
Count of channels
of out font texture. 3
== RGB8, 4
== RGBA8. [Read Only]
pixelRange
The pixel component of the total distance range of the font atlas. [Read Only]
miterLimit
The miterLimit
for bounds computation of the font atlas. [Read Only]
padding
The padding
between glyph boxes of the font atlas. [Read Only]
packerScale
The fixed glyphScale
during font packing to font atlas texture. [Read Only]
angleThreshold
Coloring angleThreshold
of font atlas texture. [Read Only]
isPreprocessGeometry
Should geometry of font atlas be a preprocessed
during build font atlas? [Read Only]
isKerningEnabled
Should this font atlas build with kerningEnabled
? [Read Only]
useExpensiveColoring
Should this font atals build with expensiveColoring
? This depends on the channels of atlas. [Read Only].
Inherited Properties
name
Name
of this object.
Constructors
Font
Construct the new Font without Asset attached.
Methods
ToString
The string
representation of Font.
GetAsset
Returns the font asset.
Inherited Methods
GetObjectID
Returns the ID
of current object. ID
is unique only per one runtime session. Each sessions of runtime/play mode will change the ID
of object. Not recommend equal object by ID
if this not one runtime session.
Static Methods
Destroy
Destroyes Component or GameObject or Asset. If Component, GameObject, Asset is null this method does nothing.
If obj is type of GameObject it will be destoryed after OnUpdate()
loop is finished. If object attached to MonoScript, object calls OnDestroy()
method to free all user resources, detach object from script and remove all components. If GameObject is null this method does nothing.
If obj is type of Component then immediately detach Component from assisated instance of GameObject. If component is MonoScript, object calls OnDestroy()
method-event to free all user resources. If Component is null this method does nothing.
If obj is type of Asset (Texture2D, AudioClip, Font, etc) it immidiatly removes it if possible.
See Also
Last updated