reckfellENGINE

Label

Plain text with wrapping, trimming and controlled reveal.

On this page
class LabelReckfellSharpInherits Control

Label displays plain text; use RichTextLabel for BBCode markup and embedded effects. Defaults are Left/Top alignment, wrapping Off, VisibleCharacters = -1 and MouseFilter = Ignore. Text stores the source string; display can be translated and uppercased while GetText returns the source.

For multiline text, set AutowrapMode and constrain width through layout; provide positive CustomMinimumSize.X or a maximum-width constraint. WordSmart wraps words and breaks oversized fragments. Avoid fixed heights without accounting for longer translations. ClipText permits area clipping; TextOverrunBehavior selects trimming/ellipsis — these are separate settings.

ParagraphSeparator defines paragraph splitting with escape-sequence processing; the default \n string means newline. GetLineCount counts laid-out lines after wrapping rather than separators; outside the tree it returns placeholder 1. MaxLinesVisible caps the line window and LinesSkipped skips initial lines without deleting Text. For current measurements, first call GetLineCount or GetMinimumSize, then GetVisibleLineCount/GetLineHeight/GetRenderedFontSize: some getters read already prepared data. GetVisibleLineCount describes fitting lines rather than counting actually painted letters.

For gradual reveal, set Text first, then VisibleCharacters or VisibleRatio. GetTotalCharacterCount counts translated-string Unicode codepoints, including newlines; it is neither C# string.Length, grapheme count nor glyph count. For example, A😀é has 4 codepoints, 5 UTF-16 units and 3 user-perceived text elements. Do not slice a C# string directly using that index.

CharsBeforeShaping is the default: input is cut before shaping, so wrapping and letter joining can change. CharsAfterShaping preserves full prepared layout and limits display by character positions. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than guaranteeing one whole emoji or composed character per step. Choose the mode and verify the relevant font for complex scripts.

Use VisibleCharacters = -1 for all text or a count from 0 through GetTotalCharacterCount. Excess counts are not clamped and can produce VisibleRatio > 1. Reassigning that same Ratio does not normalize the state; explicitly set 1 to show all. Ratios between 0 and 1 round position counts down while retaining the fraction. Replacing Text retains a partial fraction and recalculates position count — reset reveal explicitly for a new dialog line.

LabelSettings is a shared styling resource overriding corresponding theme settings; an absent resource font can fall back to the theme. Editing the shared resource affects every Label using it. ResizeFontToFit chooses a size within the Control area between MinimumFontSize and MaximumFontSize. Supply 1 ≤ minimum ≤ maximum; setters do not enforce this themselves. Even minimum size can fail to fit: fitting does not guarantee untrimmed text. GetRenderedFontSize reports the last calculated size without modifying the font resource.

GetCharacterBounds returns a local cluster-advance rectangle rather than a tight box of painted pixels. Several ligature positions can share a rectangle; missing/skipped positions return empty Rect2. With translations and Uppercase, indices refer to processed text.

LabelSettings.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

LabelConstructor
# Label
C#
public Label();

Creates a plain label: empty Text, Left/Top, AutowrapMode = Off, VisibleCharacters = -1, MouseFilter = Ignore, vertical SizeFlags ShrinkCenter.

Properties25

AutowrapModeProperty
# AutowrapMode
C#
public TextServer.AutowrapMode AutowrapMode { get; set; }

Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.

AutowrapTrimFlagsProperty
# AutowrapTrimFlags
C#
public TextServer.LineBreakFlag AutowrapTrimFlags { get; set; }

Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.

ClipTextProperty
# ClipText
C#
public bool ClipText { get; set; }

Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.

EllipsisCharProperty
# EllipsisChar
C#
public string EllipsisChar { get; set; }

Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.

HorizontalAlignmentProperty
# HorizontalAlignment
C#
public HorizontalAlignment HorizontalAlignment { get; set; }

Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.

JustificationFlagsProperty
# JustificationFlags
C#
public TextServer.JustificationFlag JustificationFlags { get; set; }

Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.

LabelSettingsProperty
# LabelSettings
C#
public LabelSettings LabelSettings { get; set; }

Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.

LanguageProperty
# Language
C#
public string Language { get; set; }

Text-shaping language for this Label. Does not change the global TranslationServer locale or select another translation catalog. Check message selection and glyph processing separately.

LinesSkippedProperty
# LinesSkipped
C#
public int LinesSkipped { get; set; }

Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.

MaxLinesVisibleProperty
# MaxLinesVisible
C#
public int MaxLinesVisible { get; set; }

Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.

MaximumFontSizeProperty
# MaximumFontSize
C#
public int MaximumFontSize { get; set; }

Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.

MinimumFontSizeProperty
# MinimumFontSize
C#
public int MinimumFontSize { get; set; }

Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.

ParagraphSeparatorProperty
# ParagraphSeparator
C#
public string ParagraphSeparator { get; set; }

Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.

ResizeFontToFitProperty
# ResizeFontToFit
C#
public bool ResizeFontToFit { get; set; }

Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.

StructuredTextBidiOverrideProperty
# StructuredTextBidiOverride
C#
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }

Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.

StructuredTextBidiOverrideOptionsProperty
# StructuredTextBidiOverrideOptions
C#
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }

Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.

TabStopsProperty
# TabStops
C#
public float[] TabStops { get; set; }

Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.

TextProperty
# Text
C#
public string Text { get; set; }

Source text or automatic-translation key. Label retains this source value while its internal display text changes with locale and context. Disable automatic translation for player-supplied text. Assigning the same value does not force translation lookup again.

TextDirectionProperty
# TextDirection
C#
public Control.TextDirection TextDirection { get; set; }

Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.

TextOverrunBehaviorProperty
# TextOverrunBehavior
C#
public TextServer.OverrunBehavior TextOverrunBehavior { get; set; }

Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.

UppercaseProperty
# Uppercase
C#
public bool Uppercase { get; set; }

Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.

VerticalAlignmentProperty
# VerticalAlignment
C#
public VerticalAlignment VerticalAlignment { get; set; }

Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.

VisibleCharactersProperty
# VisibleCharacters
C#
public int VisibleCharacters { get; set; }

Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.

VisibleCharactersBehaviorProperty
# VisibleCharactersBehavior
C#
public TextServer.VisibleCharactersBehavior VisibleCharactersBehavior { get; set; }

Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.

VisibleRatioProperty
# VisibleRatio
C#
public float VisibleRatio { get; set; }

Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.

Methods57

GetAutowrapModeTextServer.AutowrapMode
# GetAutowrapMode
C#
public TextServer.AutowrapMode GetAutowrapMode();

Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.

Returns TextServer.AutowrapMode

Stored AutowrapMode setting.

GetAutowrapTrimFlagsTextServer.LineBreakFlag
# GetAutowrapTrimFlags
C#
public TextServer.LineBreakFlag GetAutowrapTrimFlags();

Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.

Returns TextServer.LineBreakFlag

Stored AutowrapTrimFlags setting.

GetCharacterBoundsRect2
# GetCharacterBounds
C#
public Rect2 GetCharacterBounds(int pos);

Local cluster-advance rectangle for a codepoint position. Accounts for layout and skipped lines; multiple positions can share a box. Empty Rect2 means no corresponding box rather than necessarily an error. Not tight pixel bounds.

Parameters
NameTypeDefault
posint—
pos

Codepoint position in processed text rather than a C# UTF-16 index.

Returns Rect2

Local cluster Rect2, or empty Rect2.

GetEllipsisCharstring
# GetEllipsisChar
C#
public string GetEllipsisChar();

Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.

Returns string

Stored EllipsisChar setting.

GetHorizontalAlignmentHorizontalAlignment
# GetHorizontalAlignment
C#
public HorizontalAlignment GetHorizontalAlignment();

Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.

Returns HorizontalAlignment

Stored HorizontalAlignment setting.

GetJustificationFlagsTextServer.JustificationFlag
# GetJustificationFlags
C#
public TextServer.JustificationFlag GetJustificationFlags();

Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.

Returns TextServer.JustificationFlag

Stored JustificationFlags setting.

GetLabelSettingsLabelSettings
# GetLabelSettings
C#
public LabelSettings GetLabelSettings();

Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.

Returns LabelSettings

Shared LabelSettings, or null.

GetLanguagestring
# GetLanguage
C#
public string GetLanguage();

Shaping/case-conversion language; empty uses Control locale. Does not switch application locale or make GetText return translation.

Returns string

Stored language code, or empty for Control locale.

GetLineCountint
# GetLineCount
C#
public int GetLineCount();

Shapes text if needed and returns total wrapped-line count. Returns 1 outside the tree. Before-shaping reveal affects it; it is not the visible-on-screen line count.

Returns int

Prepared text line count; 1 outside the tree.

GetLineHeightint
# GetLineHeight
C#
public int GetLineHeight(int line = -1);

Prepared line height in pixels. -1 or an out-of-range index returns maximum line/font height rather than an error. Prepare layout through GetLineCount before measuring.

Parameters
NameTypeDefault
lineint-1
line

Prepared-line index; default -1 returns maximum height.

Returns int

Line height, or maximum height for -1/out-of-range indices.

GetLinesSkippedint
# GetLinesSkipped
C#
public int GetLinesSkipped();

Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.

Returns int

Skipped-line count.

GetMaxLinesVisibleint
# GetMaxLinesVisible
C#
public int GetMaxLinesVisible();

Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.

Returns int

Line cap; -1 means unlimited.

GetMaximumFontSizeint
# GetMaximumFontSize
C#
public int GetMaximumFontSize();

Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.

Returns int

Stored upper fitting-size bound.

GetMinimumFontSizeint
# GetMinimumFontSize
C#
public int GetMinimumFontSize();

Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.

Returns int

Stored lower fitting-size bound.

GetParagraphSeparatorstring
# GetParagraphSeparator
C#
public string GetParagraphSeparator();

Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.

Returns string

Stored separator string before c_unescape.

GetRenderedFontSizeint
# GetRenderedFontSize
C#
public int GetRenderedFontSize();

Last calculated font size or base size. Getter does not run new fitting: call GetLineCount/GetMinimumSize after area/setting changes first.

Returns int

Current cached or base font size.

GetStructuredTextBidiOverrideTextServer.StructuredTextParser
# GetStructuredTextBidiOverride
C#
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();

Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.

Returns TextServer.StructuredTextParser

Stored StructuredTextBidiOverride setting.

GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
# GetStructuredTextBidiOverrideOptions
C#
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();

Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.

Returns Reckfell.Collections.Array

Shared options Array rather than an independent copy.

GetTabStopsfloat[]
# GetTabStops
C#
public float[] GetTabStops();

Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.

Returns float[]

C# float[] copy of tab-stop positions.

GetTextstring
# GetText
C#
public string GetText();

Source plain text rather than BBCode. Getter returns source while character counts use translated text. Replacing text with partial VisibleRatio recalculates VisibleCharacters from that fraction.

Returns string

Source string before translation/Uppercase/reveal.

GetTextDirectionControl.TextDirection
# GetTextDirection
C#
public Control.TextDirection GetTextDirection();

Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.

Returns Control.TextDirection

Stored TextDirection setting.

GetTextOverrunBehaviorTextServer.OverrunBehavior
# GetTextOverrunBehavior
C#
public TextServer.OverrunBehavior GetTextOverrunBehavior();

Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.

Returns TextServer.OverrunBehavior

Stored TextOverrunBehavior setting.

GetTotalCharacterCountint
# GetTotalCharacterCount
C#
public int GetTotalCharacterCount();

Returns the length of the Label’s internal translated text. Can differ from the length of Text, which retains the source key. This is not a rendered glyph count or a test for clipping.

Returns int

Length of the internal text after automatic translation, not the source-key length or the number of visible lines.

GetVerticalAlignmentVerticalAlignment
# GetVerticalAlignment
C#
public VerticalAlignment GetVerticalAlignment();

Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.

Returns VerticalAlignment

Stored VerticalAlignment setting.

GetVisibleCharactersint
# GetVisibleCharacters
C#
public int GetVisibleCharacters();

Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.

Returns int

Stored position count; -1 means all.

GetVisibleCharactersBehaviorTextServer.VisibleCharactersBehavior
# GetVisibleCharactersBehavior
C#
public TextServer.VisibleCharactersBehavior GetVisibleCharactersBehavior();

Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.

Returns TextServer.VisibleCharactersBehavior

Stored VisibleCharactersBehavior setting.

GetVisibleLineCountint
# GetVisibleLineCount
C#
public int GetVisibleLineCount();

Counts fitting prepared-layout lines subject to LinesSkipped/MaxLinesVisible and height. Does not itself shape: call GetLineCount/GetMinimumSize after changes first. Not a count of actually revealed glyphs.

Returns int

Fitting line count from current prepared layout.

GetVisibleRatiofloat
# GetVisibleRatio
C#
public float GetVisibleRatio();

Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.

Returns float

Stored fraction; VisibleCharacters assignment can put it outside 0…1.

IsClippingTextbool
# IsClippingText
C#
public bool IsClippingText();

Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.

Returns bool

Stored ClipText setting.

IsResizeFontToFitEnabledbool
# IsResizeFontToFitEnabled
C#
public bool IsResizeFontToFitEnabled();

Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.

Returns bool

Stored ResizeFontToFit setting.

IsUppercasebool
# IsUppercase
C#
public bool IsUppercase();

Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.

Returns bool

Stored Uppercase setting.

SetAutowrapModevoid
# SetAutowrapMode
C#
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);

Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.

Parameters
NameTypeDefault
autowrapModeTextServer.AutowrapMode—
autowrapMode

Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.

SetAutowrapTrimFlagsvoid
# SetAutowrapTrimFlags
C#
public void SetAutowrapTrimFlags(TextServer.LineBreakFlag autowrapTrimFlags);

Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.

Parameters
NameTypeDefault
autowrapTrimFlagsTextServer.LineBreakFlag—
autowrapTrimFlags

Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.

SetClipTextvoid
# SetClipText
C#
public void SetClipText(bool enable);

Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.

Parameters
NameTypeDefault
enablebool—
enable

Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.

SetEllipsisCharvoid
# SetEllipsisChar
C#
public void SetEllipsisChar(string @char);

Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.

Parameters
NameTypeDefault
charstring—
char

Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.

SetHorizontalAlignmentvoid
# SetHorizontalAlignment
C#
public void SetHorizontalAlignment(HorizontalAlignment alignment);

Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.

Parameters
NameTypeDefault
alignmentHorizontalAlignment—
alignment

Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.

SetJustificationFlagsvoid
# SetJustificationFlags
C#
public void SetJustificationFlags(TextServer.JustificationFlag justificationFlags);

Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.

Parameters
NameTypeDefault
justificationFlagsTextServer.JustificationFlag—
justificationFlags

Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.

SetLabelSettingsvoid
# SetLabelSettings
C#
public void SetLabelSettings(LabelSettings settings);

Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.

Parameters
NameTypeDefault
settingsLabelSettings—
settings

Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.

SetLanguagevoid
# SetLanguage
C#
public void SetLanguage(string language);

Shaping/case-conversion language; empty uses Control locale. Does not switch application locale or make GetText return translation.

Parameters
NameTypeDefault
languagestring—
language

Shaping/case-conversion language; empty uses Control locale. Does not switch application locale or make GetText return translation.

SetLinesSkippedvoid
# SetLinesSkipped
C#
public void SetLinesSkipped(int linesSkipped);

Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.

Parameters
NameTypeDefault
linesSkippedint—
linesSkipped

Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.

SetMaxLinesVisiblevoid
# SetMaxLinesVisible
C#
public void SetMaxLinesVisible(int linesVisible);

Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.

Parameters
NameTypeDefault
linesVisibleint—
linesVisible

Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.

SetMaximumFontSizevoid
# SetMaximumFontSize
C#
public void SetMaximumFontSize(int size);

Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.

Parameters
NameTypeDefault
sizeint—
size

Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.

SetMinimumFontSizevoid
# SetMinimumFontSize
C#
public void SetMinimumFontSize(int size);

Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.

Parameters
NameTypeDefault
sizeint—
size

Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.

SetParagraphSeparatorvoid
# SetParagraphSeparator
C#
public void SetParagraphSeparator(string paragraphSeparator);

Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.

Parameters
NameTypeDefault
paragraphSeparatorstring—
paragraphSeparator

Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.

SetResizeFontToFitvoid
# SetResizeFontToFit
C#
public void SetResizeFontToFit(bool enabled);

Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.

Parameters
NameTypeDefault
enabledbool—
enabled

Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.

SetStructuredTextBidiOverridevoid
# SetStructuredTextBidiOverride
C#
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);

Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.

Parameters
NameTypeDefault
parserTextServer.StructuredTextParser—
parser

Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.

SetStructuredTextBidiOverrideOptionsvoid
# SetStructuredTextBidiOverrideOptions
C#
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);

Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.

Parameters
NameTypeDefault
argsReckfell.Collections.Array—
args

Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.

SetTabStops2 overloads
# SetTabStops · 1/2
C#
public void SetTabStops(ReadOnlySpan<float> tabStops);

Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.

Parameters
NameTypeDefault
tabStopsReadOnlySpan<float>—
tabStops

Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.

# SetTabStops · 2/2
C#
public void SetTabStops(float[] tabStops);

Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.

Parameters
NameTypeDefault
tabStopsfloat[]—
tabStops

Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.

SetTextvoid
# SetText
C#
public void SetText(string text);

Source plain text rather than BBCode. Getter returns source while character counts use translated text. Replacing text with partial VisibleRatio recalculates VisibleCharacters from that fraction.

Parameters
NameTypeDefault
textstring—
text

Source plain text rather than BBCode. Getter returns source while character counts use translated text. Replacing text with partial VisibleRatio recalculates VisibleCharacters from that fraction.

SetTextDirectionvoid
# SetTextDirection
C#
public void SetTextDirection(Control.TextDirection direction);

Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.

Parameters
NameTypeDefault
directionControl.TextDirection—
direction

Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.

SetTextOverrunBehaviorvoid
# SetTextOverrunBehavior
C#
public void SetTextOverrunBehavior(TextServer.OverrunBehavior overrunBehavior);

Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.

Parameters
NameTypeDefault
overrunBehaviorTextServer.OverrunBehavior—
overrunBehavior

Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.

SetUppercasevoid
# SetUppercase
C#
public void SetUppercase(bool enable);

Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.

Parameters
NameTypeDefault
enablebool—
enable

Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.

SetVerticalAlignmentvoid
# SetVerticalAlignment
C#
public void SetVerticalAlignment(VerticalAlignment alignment);

Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.

Parameters
NameTypeDefault
alignmentVerticalAlignment—
alignment

Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.

SetVisibleCharactersvoid
# SetVisibleCharacters
C#
public void SetVisibleCharacters(int amount);

Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.

Parameters
NameTypeDefault
amountint—
amount

Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.

SetVisibleCharactersBehaviorvoid
# SetVisibleCharactersBehavior
C#
public void SetVisibleCharactersBehavior(TextServer.VisibleCharactersBehavior behavior);

Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.

Parameters
NameTypeDefault
behaviorTextServer.VisibleCharactersBehavior—
behavior

Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.

SetVisibleRatiovoid
# SetVisibleRatio
C#
public void SetVisibleRatio(float ratio);

Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.

Parameters
NameTypeDefault
ratiofloat—
ratio

Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
font_color
Color

Default text Color of the Label.

Default: Color(1, 1, 1, 1)
font_outline_color
Color

The color of text outline.

Default: Color(0, 0, 0, 1)
font_shadow_color
Color

Color of the text's shadow effect.

Default: Color(0, 0, 0, 0)
line_spacing
int

Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.

Default: 3
outline_size
int

Text outline size. Note: If using a font with FontFile.MultichannelSignedDistanceField enabled, its FontFile.MsdfPixelRange must be set to at least twice the value of Label.outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. Note: Using a value that is larger than half the font size is not recommended, as the font outline may fail to be fully closed in this case.

Default: 0
paragraph_spacing
int

Vertical space between paragraphs. Added on top of Label.line_spacing.

Default: 0
shadow_offset_x
int

The horizontal offset of the text's shadow.

Default: 1
shadow_offset_y
int

The vertical offset of the text's shadow.

Default: 1
shadow_outline_size
int

The size of the shadow outline.

Default: 1
font
Font

Font used for the Label's text.

font_size
int

Font size of the Label's text.

focus
StyleBox

StyleBox used when the Label is focused (when used with assistive apps).

normal
StyleBox

Background StyleBox for the Label.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.