FontFile
Font data, rasterization settings and caches.
FontFile is a resource assigned to a UI element or used to measure and draw text. Load an imported project resource with ResourceLoader.Load<FontFile>. LoadDynamicFont reads an external dynamic font; LoadBitmapFont reads a bitmap BMFont and its page images. External files must exist on the user’s machine. The font license determines redistribution rights.
In 1.0.0 LoadDynamicFont resets previous state, reads bytes and returns Error.Ok without validating decoding. Check file availability and acceptable size, nonempty Data, required glyphs and rendered output. Nonempty bytes do not establish format validity either. For replacement, create a separate FontFile and retain the previous resource until you accept the new one: there is no automatic rollback. Configure options after loading, because loading resets them.
LoadBitmapFont reads text BMFont or binary BMFont version 3; page images are resolved relative to the description file. Check Error and diagnostics. Failure may already have partially changed the resource, so use a separate instance for reloading too. Data is not a complete portable bitmap-font package including page images.
Data/GetData return a managed byte copy. Assign an edited copy back to apply it. SetData updates existing cache data but does not reset every option or emit Changed itself. Plan consumer updates before modifying a shared resource used by UI.
GetCacheCount counts cache slots rather than characters, pages or successfully decoded faces. Metadata access can lazily create the first slot. RemoveCache shifts subsequent indices; ClearCache retains source Data. FontName, StyleName, FontStyle, FontWeight and FontStretch set first-cache metadata rather than guaranteeing generated bold or italic shapes. Use the appropriate file or variation settings for the desired appearance.
AllowSystemFallback defaults to true. System fonts depend on the OS: ship required fonts and configure fallback explicitly for consistent results. FixedSize controls rasterization rather than the UI element’s text size.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
FontFileConstructor
public FontFile();Creates an empty resource without a loaded font. Load data, then configure options and assign it to a consumer.
Properties22
AllowSystemFallbackProperty
public bool AllowSystemFallback { get; set; }Allows missing characters to use system fonts; true by default. Results depend on the OS and installed fonts. Changing it emits Changed.
AntialiasingProperty
public TextServer.FontAntialiasing Antialiasing { get; set; }Raster glyph antialiasing: None is one-bit, Gray grayscale, Lcd screen subpixels. Default Gray. Lcd suits horizontal unscaled 2D text; separate from SubpixelPositioning. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
DataProperty
public byte[] Data { get; set; }Dynamic-font bytes. Getter returns a managed copy; assign an edited copy back. Setter neither validates the format nor emits Changed. Not a complete BMFont package with images.
DisableEmbeddedBitmapsProperty
public bool DisableEmbeddedBitmaps { get; set; }Disables embedded bitmap strikes in a dynamic font; true by default. Does not disable loading a separate BMFont. Color and bitmap-only fonts have format/backend limitations. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
FixedSizeProperty
public int FixedSize { get; set; }Fixed rasterization size; 0 disables a forced size. Not the Control text size. A change updates caches and emits Changed; loading resets it.
FixedSizeScaleModeProperty
public TextServer.FixedSizeScaleMode FixedSizeScaleMode { get; set; }Scaling with positive FixedSize: Disable does not scale, IntegerOnly uses an integer multiple, Enabled permits fractional scaling. Default Disable. For pixel bitmap fonts choose IntegerOnly and check the actual UI scale. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
FontNameProperty
public string FontName { get; set; }Family-name metadata in the first cache. Changing it neither loads another file nor emits Changed itself.
FontStretchProperty
public int FontStretch { get; set; }First-cache stretch metadata, 50–200, normal 100. The Advanced backend clamps the range; not a Transform scale or guaranteed glyph stretching. Setter does not emit Changed.
FontStyleProperty
public TextServer.FontStyle FontStyle { get; set; }First-cache style metadata flags. Do not guarantee synthetic bold or italic shapes; setter does not emit Changed.
FontWeightProperty
public int FontWeight { get; set; }First-cache weight metadata: 100–999, regular 400, bold 700. The Advanced backend clamps this range. Does not replace the required face or emit Changed.
ForceAutohinterProperty
public bool ForceAutohinter { get; set; }Prefers automatic hinting over embedded dynamic-font instructions; false by default. Does not replace Hinting or add hinting to MSDF. Compare small text at the target scale. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
GenerateMipmapsProperty
public bool GenerateMipmaps { get; set; }Generates mip levels for font textures; false by default. Can help minified text but needs memory and suitable consumer filtering. Enabling it does not guarantee sharper text. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
HintingProperty
public TextServer.Hinting Hinting { get; set; }Fits a dynamic raster font to the pixel grid: None, Light or Normal; default Light. Normal can alter metrics along both axes, including monospace character widths. MSDF does not support hinting. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
KeepRoundingRemaindersProperty
public bool KeepRoundingRemainders { get; set; }Carries rounding remainders during pixel alignment to reduce accumulated spacing error; true by default. With subpixel positioning the corresponding horizontal-advance rounding is bypassed. Does not enable kerning. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
ModulateColorGlyphsProperty
public bool ModulateColorGlyphs { get; set; }Applies RGB modulation to color glyphs too; false by default. When false, color glyphs retain their own RGB while draw opacity still applies. Does not add missing color characters. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
MsdfPixelRangeProperty
public int MsdfPixelRange { get; set; }MSDF distance range around the contour. A new FontFile uses 16; after LoadDynamicFont it is 14. For outlines use at least twice the largest outline width. Applies with MSDF enabled; a larger value alone does not increase precision. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
MsdfSizeProperty
public int MsdfSize { get; set; }MSDF generation source size rather than the Control text size. A new FontFile uses 48; after LoadDynamicFont it is 128. Increase only for visible precision problems: generation and memory costs grow. Requires MSDF enabled. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
MultichannelSignedDistanceFieldProperty
public bool MultichannelSignedDistanceField { get; set; }Uses a multichannel distance field for scalable glyphs from vector data; false by default. Configure MsdfSize and MsdfPixelRange after loading. Hinting is unavailable, small text may look worse, and overlapping contours need checking. Not a guarantee of cost-free scaling or quality with every file. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
OpentypeFeatureOverridesProperty
public Reckfell.Collections.Dictionary OpentypeFeatureOverrides { get; set; }Shared OpenType feature settings: a tag key such as liga or kern and an integer value. 0 disables, positive values enable or select an alternative; negative values are skipped during shaping. Separate from variable-font axes. Dictionary storage is shared: use Duplicate for an independent snapshot. Neither the setter nor Dictionary edits emit Changed; do not rely on automatic reflow of already prepared text. Configure before use and inspect GetSupportedFeatureList for font support. File loading retains settings.
OversamplingProperty
public float Oversampling { get; set; }Dynamic-font rasterization factor: a positive value overrides the viewport setting; 0 leaves it in control. An explicit positive draw-method argument takes precedence. MSDF and positive FixedSize bypass oversampling. Not a text scale; account for memory and generation time. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
StyleNameProperty
public string StyleName { get; set; }Style-name metadata in the first cache, for example Regular. Does not automatically select another font file or emit Changed.
SubpixelPositioningProperty
public TextServer.SubpixelPositioning SubpixelPositioning { get; set; }Horizontal glyph-position precision: Disabled, Auto, OneHalf or OneQuarter. A new FontFile uses Auto; after LoadDynamicFont it uses Disabled. Additional positions can require more cached glyph variants. Separate from Lcd antialiasing. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
Methods108
ClearCachevoid
public void ClearCache();Clears caches and emits Changed while retaining Data and resource options. Does not unload all font bytes.
ClearGlyphsvoid
public void ClearGlyphs(int cacheIndex, Vector2I size);Deletes glyph records for the chosen size/outline while retaining pages and manual kerning. Dynamic glyphs may be recreated on demand; restore manually supplied bitmap records yourself. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
ClearKerningMapvoid
public void ClearKerningMap(int cacheIndex, int size);Clears the size’s manual pair map without disabling source-font kerning. GetKerning need not return zero afterward. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
ClearSizeCachevoid
public void ClearSizeCache(int cacheIndex);Deletes all size caches of the selected RID, including glyphs, pages and manual metrics. Retains source Data and the FontFile slot itself. Emits no Changed. Rebuild data for a manual bitmap cache.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
ClearTexturesvoid
public void ClearTextures(int cacheIndex, Vector2I size);Clears pages while retaining glyph records and page indices. A later query may detect an invalid atlas and attempt rerasterization; insufficient for a manual bitmap cache. Rebuild the whole size or use a new FontFile. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
GetAntialiasingTextServer.FontAntialiasing
public TextServer.FontAntialiasing GetAntialiasing();Reads Antialiasing without evaluating rendered quality. Raster glyph antialiasing: None is one-bit, Gray grayscale, Lcd screen subpixels. Default Gray. Lcd suits horizontal unscaled 2D text; separate from SubpixelPositioning.
TextServer.FontAntialiasingCurrent Antialiasing value. New resource: TextServer.FontAntialiasing.Gray.
GetCacheAscentfloat
public float GetCacheAscent(int cacheIndex, int size);Reads the distance above the baseline. Querying can create a size cache; for MSDF/scalable FixedSize the backend rescales the result to the requested size.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
floatCurrent effective metric for the requested size; not necessarily the raw setter value with MSDF/FixedSize.
GetCacheCountint
public int GetCacheCount();Returns the number of internal font RID slots. Not a glyph, file or validated-face count; metadata access can create a slot lazily.
intCache slot count rather than a font-data validation result.
GetCacheDescentfloat
public float GetCacheDescent(int cacheIndex, int size);Reads the distance below the baseline. Querying can create a size cache; for MSDF/scalable FixedSize the backend rescales the result to the requested size.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
floatCurrent effective metric for the requested size; not necessarily the raw setter value with MSDF/FixedSize.
GetCacheScalefloat
public float GetCacheScale(int cacheIndex, int size);Reads the color bitmap-cache scale. Querying can create a size cache; for MSDF/scalable FixedSize the backend rescales the result to the requested size.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
floatCurrent effective metric for the requested size; not necessarily the raw setter value with MSDF/FixedSize.
GetCacheUnderlinePositionfloat
public float GetCacheUnderlinePosition(int cacheIndex, int size);Reads the underline position relative to the baseline. Querying can create a size cache; for MSDF/scalable FixedSize the backend rescales the result to the requested size.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
floatCurrent effective metric for the requested size; not necessarily the raw setter value with MSDF/FixedSize.
GetCacheUnderlineThicknessfloat
public float GetCacheUnderlineThickness(int cacheIndex, int size);Reads the underline thickness. Querying can create a size cache; for MSDF/scalable FixedSize the backend rescales the result to the requested size.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
floatCurrent effective metric for the requested size; not necessarily the raw setter value with MSDF/FixedSize.
GetCharFromGlyphIndexlong
public long GetCharFromGlyphIndex(int size, int glyphIndex);Looks up a Unicode code point from a first-cache glyph index. For a dynamic font this is a cmap lookup rather than inverse string shaping: several characters can share one glyph. Not suitable for restoring ligatures, UTF-16 positions or arbitrary bitmap caches.
| Name | Type | Default |
|---|---|---|
size | int | — |
glyphIndex | int | — |
sizePositive font size rather than a page index or file byte length.
glyphIndexFirst-cache glyph index; reverse lookup does not guarantee a unique original character.
longNumeric Unicode code point or 0 without a dynamic-font mapping; not a string.
GetDatabyte[]
public byte[] GetData();Returns a managed copy of source bytes. Editing the result does not modify FontFile; use SetData. BMFont page images are not packaged into this result.
byte[]New byte[] containing data, possibly empty.
GetDisableEmbeddedBitmapsbool
public bool GetDisableEmbeddedBitmaps();Reads DisableEmbeddedBitmaps without evaluating rendered quality. Disables embedded bitmap strikes in a dynamic font; true by default. Does not disable loading a separate BMFont. Color and bitmap-only fonts have format/backend limitations.
boolCurrent DisableEmbeddedBitmaps value. New resource: true.
GetEmboldenfloat
public float GetEmbolden(int cacheIndex);Reads synthetic embolden strength of the selected cache; default 0. Not the weight of a genuine face.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
floatCurrent stored value of the chosen cache rather than visual-result validation.
GetExtraBaselineOffsetfloat
public float GetExtraBaselineOffset(int cacheIndex);Reads extra baseline offset as a fraction of font height; default 0. Not pixels.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
floatCurrent stored value of the chosen cache rather than visual-result validation.
GetExtraSpacinglong
public long GetExtraSpacing(int cacheIndex, TextServer.SpacingType spacing);Reads additional spacing of the chosen type in pixels rather than a font-size factor. Default 0.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
spacing | TextServer.SpacingType | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
spacingGlyph, Space, Top or Bottom from TextServer.SpacingType.
longCurrent stored value of the chosen cache rather than visual-result validation.
GetFaceIndexlong
public long GetFaceIndex(int cacheIndex);Reads the stored collection face index, default 0. The getter alone does not establish that the file contains that face.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
longCurrent stored value of the chosen cache rather than visual-result validation.
GetFixedSizeint
public int GetFixedSize();Reads FixedSize without measuring text or glyph height.
intCurrent integer FixedSize; default 0.
GetFixedSizeScaleModeTextServer.FixedSizeScaleMode
public TextServer.FixedSizeScaleMode GetFixedSizeScaleMode();Reads FixedSizeScaleMode without evaluating rendered quality. Scaling with positive FixedSize: Disable does not scale, IntegerOnly uses an integer multiple, Enabled permits fractional scaling. Default Disable. For pixel bitmap fonts choose IntegerOnly and check the actual UI scale.
TextServer.FixedSizeScaleModeCurrent FixedSizeScaleMode value. New resource: TextServer.FixedSizeScaleMode.Disable.
GetGenerateMipmapsbool
public bool GetGenerateMipmaps();Reads GenerateMipmaps without evaluating rendered quality. Generates mip levels for font textures; false by default. Can help minified text but needs memory and suitable consumer filtering. Enabling it does not guarantee sharper text.
boolCurrent GenerateMipmaps value. New resource: false.
GetGlyphAdvanceVector2
public Vector2 GetGlyphAdvance(int cacheIndex, int size, int glyph);Reads pen advance, creating a dynamic glyph if needed. MSDF/FixedSize, embolden and rounding can affect the result. Not visible pixel bounds or the size of a complete shaped string.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
glyph | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
Vector2Vector2 pen advance, possibly Zero; not image size.
GetGlyphIndexint
public int GetGlyphIndex(int size, long @char, long variationSelector);Maps a Unicode code point and optional variation selector to a first-cache glyph index. Not a UTF-16 string index or full shaping: TextServer handles ligatures/contextual forms. For a manual bitmap font the backend can use the character code itself as a key.
| Name | Type | Default |
|---|---|---|
size | int | — |
char | long | — |
variationSelector | long | — |
sizePositive font size rather than a page index or file byte length.
charValid Unicode scalar value 0–0x10FFFF excluding surrogates 0xD800–0xDFFF. Pass a supplementary character as one code point rather than a UTF-16 surrogate.
variationSelector0 without a selector, or a valid Unicode variation selector supported by the file. Not a variable-font axis tag.
intGlyph index; 0 normally indicates no dynamic-font mapping rather than successful shaping.
GetGlyphListint[]
public int[] GetGlyphList(int cacheIndex, Vector2I size);Returns keys of existing glyph records in the chosen cache rather than every character in the font file. Keys may include subpixel/LCD cache variants; order is unspecified. The managed result is a copy.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
int[]New int[] of record keys, empty without glyphs; order unspecified.
GetGlyphOffsetVector2
public Vector2 GetGlyphOffset(int cacheIndex, Vector2I size, int glyph);Reads the local glyph offset with supported MSDF/FixedSize scaling. Not an Entity or Control position. Querying can prepare a dynamic record.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
Vector2Local offset Vector2, possibly Zero.
GetGlyphSizeVector2
public Vector2 GetGlyphSize(int cacheIndex, Vector2I size, int glyph);Returns the drawn rectangle size, possibly zero for a nonvisual character. MSDF/FixedSize scaling can affect it. Not character advance.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
Vector2Drawn rectangle dimensions Vector2, possibly Zero.
GetGlyphTextureIdxint
public int GetGlyphTextureIdx(int cacheIndex, Vector2I size, int glyph);Reads the page index; the Advanced backend returns -1 without a drawable texture/prepared glyph. Check against GetTextureCount. After RemoveTexture even an in-range index may refer to a different page.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
intPage index or -1 without an available texture in the Advanced backend.
GetGlyphUVRectRect2
public Rect2 GetGlyphUVRect(int cacheIndex, Vector2I size, int glyph);Reads the source rectangle in atlas-page pixels. Neither screen coordinates nor normalized UVs. Querying can create a dynamic glyph.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
Rect2Rect2 in source-page pixels.
GetHintingTextServer.Hinting
public TextServer.Hinting GetHinting();Reads Hinting without evaluating rendered quality. Fits a dynamic raster font to the pixel grid: None, Light or Normal; default Light. Normal can alter metrics along both axes, including monospace character widths. MSDF does not support hinting.
TextServer.HintingCurrent Hinting value. New resource: TextServer.Hinting.Light.
GetKeepRoundingRemaindersbool
public bool GetKeepRoundingRemainders();Reads KeepRoundingRemainders without evaluating rendered quality. Carries rounding remainders during pixel alignment to reduce accumulated spacing error; true by default. With subpixel positioning the corresponding horizontal-advance rounding is bypassed. Does not enable kerning.
boolCurrent KeepRoundingRemainders value. New resource: true.
GetKerningVector2
public Vector2 GetKerning(int cacheIndex, int size, Vector2I glyphPair);Reads a manual pair adjustment; without one the backend may query source-font data. Not the result of full string shaping or a list of OpenType rules.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
glyphPair | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
glyphPairVector2I(left glyph index, right glyph index); order matters. Not two Unicode code points for a dynamic font.
Vector2Vector2 adjustment depending on the manual entry/backend/source file.
GetKerningListReckfell.Collections.Array<Vector2I>
public Reckfell.Collections.Array<Vector2I> GetKerningList(int cacheIndex, int size);Returns glyph pairs in this size’s manual kerning map rather than every pair in the source OpenType file. Order is unspecified. Typed Array is not IDisposable.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
Reckfell.Collections.Array<Vector2I>Typed Array of ordered pairs in the manual map.
GetLanguageSupportOverridebool
public bool GetLanguageSupportOverride(string language);Reads only the explicit language entry. false means either a missing entry or an explicit denial; distinguish them with GetLanguageSupportOverrides. Does not resolve the wildcard entry here. Not a character-coverage check.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageExact language key such as en or ru, or the wildcard for a general decision. These methods do not normalize case/format; use consistent keys.
boolStored bool, or false without an exact key.
GetLanguageSupportOverridesstring[]
public string[] GetLanguageSupportOverrides();Returns explicit language override keys, including false entries and the wildcard. Order is unspecified; not a list of every language the font can display.
string[]New managed string[] of keys; empty without explicit entries.
GetMsdfPixelRangeint
public int GetMsdfPixelRange();Reads MsdfPixelRange without evaluating rendered quality. MSDF distance range around the contour. A new FontFile uses 16; after LoadDynamicFont it is 14. For outlines use at least twice the largest outline width. Applies with MSDF enabled; a larger value alone does not increase precision.
intCurrent MsdfPixelRange value. New resource: 16; LoadDynamicFont: 14.
GetMsdfSizeint
public int GetMsdfSize();Reads MsdfSize without evaluating rendered quality. MSDF generation source size rather than the Control text size. A new FontFile uses 48; after LoadDynamicFont it is 128. Increase only for visible precision problems: generation and memory costs grow. Requires MSDF enabled.
intCurrent MsdfSize value. New resource: 48; LoadDynamicFont: 128.
GetOpentypeFeatureOverridesReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary GetOpentypeFeatureOverrides();Returns a Dictionary sharing the resource’s OpenType feature table. Editing it changes resource data without Changed; Duplicate provides a separate table. Dispose the managed wrapper after reading. An entry does not establish support by the file.
Reckfell.Collections.DictionaryShared Dictionary wrapper rather than a deep copy; initially empty.
GetOversamplingfloat
public float GetOversampling();Reads Oversampling without evaluating rendered quality. Dynamic-font rasterization factor: a positive value overrides the viewport setting; 0 leaves it in control. An explicit positive draw-method argument takes precedence. MSDF and positive FixedSize bypass oversampling. Not a text scale; account for memory and generation time.
floatCurrent Oversampling value. New resource: 0.
GetScriptSupportOverridebool
public bool GetScriptSupportOverride(string script);Reads an explicit writing-script entry. Also returns false without an entry; check presence through GetScriptSupportOverrides. Does not resolve the wildcard or inspect glyphs, and is unrelated to C# scripts.
| Name | Type | Default |
|---|---|---|
script | string | — |
scriptWriting-script code such as Latn or Cyrl, or the wildcard. Keys match exactly; not a script filename.
boolStored bool, or false without an exact key.
GetScriptSupportOverridesstring[]
public string[] GetScriptSupportOverrides();Returns writing-script override keys, including false entries and the wildcard, in unspecified order. Not the file’s automatically detected script list.
string[]New managed string[] of keys; empty without explicit entries.
GetSizeCacheListReckfell.Collections.Array<Vector2I>
public Reckfell.Collections.Array<Vector2I> GetSizeCacheList(int cacheIndex);Lists ordinary size caches of the selected font RID as Vector2I(font size, outline thickness). The Advanced backend excludes viewport-oversampling entries; not a complete memory report. Querying can lazily create a RID and base size cache.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
Reckfell.Collections.Array<Vector2I>Typed Array of Vector2I keys; not IDisposable or a complete list of viewport-oversampling caches.
GetSubpixelPositioningTextServer.SubpixelPositioning
public TextServer.SubpixelPositioning GetSubpixelPositioning();Reads SubpixelPositioning without evaluating rendered quality. Horizontal glyph-position precision: Disabled, Auto, OneHalf or OneQuarter. A new FontFile uses Auto; after LoadDynamicFont it uses Disabled. Additional positions can require more cached glyph variants. Separate from Lcd antialiasing.
TextServer.SubpixelPositioningCurrent SubpixelPositioning value. New resource: TextServer.SubpixelPositioning.Auto; LoadDynamicFont: Disabled.
GetTextureCountint
public int GetTextureCount(int cacheIndex, Vector2I size);Atlas page count for a size/outline, rather than glyph count. Querying can create the size cache. Does not establish that every glyph points to the correct page.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
intPage count of this cache, possibly 0.
GetTextureImageImage
public Image GetTextureImage(int cacheIndex, Vector2I size, int textureIndex);Returns the page’s shared Image rather than a pixel copy or screenshot. Editing Image can affect other consumers; copy it for independent editing. Image edits alone do not guarantee atlas-texture recreation.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
textureIndex | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
textureIndexExisting page index from 0 to GetTextureCount()-1; SetTextureImage/SetTextureOffsets can grow the table for a higher nonnegative index.
ImageShared page Image rather than an independent copy.
GetTextureOffsetsint[]
public int[] GetTextureOffsets(int cacheIndex, Vector2I size, int textureIndex);Reads page shelf data in x, y, width, height groups. C# returns an int[] copy; apply edits through SetTextureOffsets. Not glyph rectangles.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
textureIndex | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
textureIndexExisting page index from 0 to GetTextureCount()-1; SetTextureImage/SetTextureOffsets can grow the table for a higher nonnegative index.
int[]New int[] in groups of four: x, y, width, height.
GetTransformTransform2D
public Transform2D GetTransform(int cacheIndex);Reads the outline transform matrix; default Identity. Not the Control global transform.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
Transform2DCurrent stored value of the chosen cache rather than visual-result validation.
GetVariationCoordinatesReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary GetVariationCoordinates(int cacheIndex);Returns the selected cache’s shared axis-coordinate table. Unlike FontVariation, this getter does not create an independent copy. Editing an alias bypasses the setter/cache reset; Duplicate it and call SetVariationCoordinates to apply changes.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
Reckfell.Collections.DictionaryShared Dictionary wrapper; Duplicate for an independent snapshot.
IsAllowSystemFallbackbool
public bool IsAllowSystemFallback();Reads the system fallback permission rather than font or character availability.
boolCurrent permission; default true.
IsForceAutohinterbool
public bool IsForceAutohinter();Reads ForceAutohinter without evaluating rendered quality. Prefers automatic hinting over embedded dynamic-font instructions; false by default. Does not replace Hinting or add hinting to MSDF. Compare small text at the target scale.
boolCurrent ForceAutohinter value. New resource: false.
IsModulateColorGlyphsbool
public bool IsModulateColorGlyphs();Reads ModulateColorGlyphs without evaluating rendered quality. Applies RGB modulation to color glyphs too; false by default. When false, color glyphs retain their own RGB while draw opacity still applies. Does not add missing color characters.
boolCurrent ModulateColorGlyphs value. New resource: false.
IsMultichannelSignedDistanceFieldbool
public bool IsMultichannelSignedDistanceField();Reads MultichannelSignedDistanceField without evaluating rendered quality. Uses a multichannel distance field for scalable glyphs from vector data; false by default. Configure MsdfSize and MsdfPixelRange after loading. Hinting is unavailable, small text may look worse, and overlapping contours need checking. Not a guarantee of cost-free scaling or quality with every file.
boolCurrent MultichannelSignedDistanceField value. New resource: false.
LoadBitmapFontError
public Error LoadBitmapFont(string path);Loads text BMFont or binary BMFont version 3 with page images relative to its directory. Resets previous state; failure may leave partial changes. Check Error and diagnostics.
| Name | Type | Default |
|---|---|---|
path | string | — |
pathFileAccess path: asset://, user:// or an accessible OS path. BMFont also requires its page images.
ErrorError.Ok on loader completion or an error; opening, version or page failures can produce Error.CantCreate. Check diagnostics.
LoadDynamicFontError
public Error LoadDynamicFont(string path);Resets state and reads a file into Data. In 1.0.0 Error.Ok does not establish successful reading or decoding: check the file, data, required glyphs and rendering. Configure options after loading; there is no rollback.
| Name | Type | Default |
|---|---|---|
path | string | — |
pathFileAccess path: asset://, user:// or an accessible OS path. BMFont also requires its page images.
ErrorIn this implementation Error.Ok after the read attempt; do not use it as the sole success criterion.
RemoveCachevoid
public void RemoveCache(int cacheIndex);Removes a slot, frees its RID, shifts subsequent indices and emits Changed. Recheck retained indices after removal.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
cacheIndexCurrent index from 0 to GetCacheCount()-1; removal shifts later indices.
RemoveGlyphvoid
public void RemoveGlyph(int cacheIndex, Vector2I size, int glyph);Deletes one cache record while retaining pages, kerning and font data. Does not remove a character from the source file; a dynamic record can reappear on demand. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
RemoveKerningvoid
public void RemoveKerning(int cacheIndex, int size, Vector2I glyphPair);Removes an ordered pair’s manual adjustment and restores normal backend/file behavior. Does not remove glyphs; a missing entry is a no-op. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
glyphPair | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
glyphPairVector2I(left glyph index, right glyph index); order matters. Not two Unicode code points for a dynamic font.
RemoveLanguageSupportOverridevoid
public void RemoveLanguageSupportOverride(string language);Removes an exact key if present and propagates removal to existing caches. Restores normal selection/the wildcard rather than explicitly denying support. A missing key is a no-op; does not emit Changed.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageExact language key such as en or ru, or the wildcard for a general decision. These methods do not normalize case/format; use consistent keys.
RemoveScriptSupportOverridevoid
public void RemoveScriptSupportOverride(string script);Removes an explicit writing-script decision and restores selection from the file/the wildcard. Does not remove glyphs. A missing key is ignored; does not emit Changed.
| Name | Type | Default |
|---|---|---|
script | string | — |
scriptWriting-script code such as Latn or Cyrl, or the wildcard. Keys match exactly; not a script filename.
RemoveSizeCachevoid
public void RemoveSizeCache(int cacheIndex, Vector2I size);Deletes one size/outline cache while retaining the RID and source data. Use a key from GetSizeCacheList; MSDF, FixedSize and oversampling affect effective keys. A missing entry is a no-op. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
RemoveTexturevoid
public void RemoveTexture(int cacheIndex, Vector2I size, int textureIndex);Removes a page and shifts subsequent pages. In 1.0.0 glyph indices are not remapped: an old in-range index can point to the wrong image, while an out-of-range index can trigger diagnostics/rerasterization. Rebuild all dependent records when removing a page from an active bitmap atlas. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
textureIndex | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
textureIndexExisting page index from 0 to GetTextureCount()-1; SetTextureImage/SetTextureOffsets can grow the table for a higher nonnegative index.
RenderGlyphvoid
public void RenderGlyph(int cacheIndex, Vector2I size, int index);Prepares a dynamic glyph and required variants in the cache. Takes a glyph index rather than a Unicode code point. Does not draw text on screen or fill a missing manual bitmap atlas. Configure quality before preparation.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
index | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
indexDynamic glyph index from GetGlyphIndex or shaping rather than a Unicode code point.
RenderRangevoid
public void RenderRange(int cacheIndex, Vector2I size, long start, long end);Prepares dynamic glyphs for a Unicode range including both endpoints. Not a glyph-index or UTF-16 range. Limit it to needed characters: broad ranges consume time and memory. Neither replaces shaping nor draws text.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
start | long | — |
end | long | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
startFirst Unicode code point, inclusive; use valid scalar values and a small required range.
endLast Unicode code point, inclusive and at least start. Not an exclusive endpoint.
SetAllowSystemFallbackvoid
public void SetAllowSystemFallback(bool allowSystemFallback);Allows missing characters to use system fonts; true by default. Results depend on the OS and installed fonts. Changing it emits Changed.
| Name | Type | Default |
|---|---|---|
allowSystemFallback | bool | — |
allowSystemFallbacktrue permits OS fallback; false disables it without adding missing glyphs.
SetAntialiasingvoid
public void SetAntialiasing(TextServer.FontAntialiasing antialiasing);Raster glyph antialiasing: None is one-bit, Gray grayscale, Lcd screen subpixels. Default Gray. Lcd suits horizontal unscaled 2D text; separate from SubpixelPositioning. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
antialiasing | TextServer.FontAntialiasing | — |
antialiasingNew Antialiasing value. Raster glyph antialiasing: None is one-bit, Gray grayscale, Lcd screen subpixels. Default Gray. Lcd suits horizontal unscaled 2D text; separate from SubpixelPositioning.
SetCacheAscentvoid
public void SetCacheAscent(int cacheIndex, int size, float ascent);Sets the size cache’s distance above the baseline. Manual metadata rather than a change to source outlines or Control size. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
ascent | float | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
ascentFinite distance above the baseline in size coordinates, normally nonnegative.
SetCacheDescentvoid
public void SetCacheDescent(int cacheIndex, int size, float descent);Sets the size cache’s distance below the baseline. Manual metadata rather than a change to source outlines or Control size. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
descent | float | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
descentFinite distance below the baseline in size coordinates, normally nonnegative.
SetCacheScalevoid
public void SetCacheScale(int cacheIndex, int size, float scale);Sets the size cache’s color bitmap-cache scale. Manual metadata rather than a change to source outlines or Control size. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
scale | float | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
scaleFinite positive bitmap-cache scale rather than the UI element Transform.
SetCacheUnderlinePositionvoid
public void SetCacheUnderlinePosition(int cacheIndex, int size, float underlinePosition);Sets the size cache’s underline position relative to the baseline. Manual metadata rather than a change to source outlines or Control size. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
underlinePosition | float | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
underlinePositionFinite underline offset from the baseline.
SetCacheUnderlineThicknessvoid
public void SetCacheUnderlineThickness(int cacheIndex, int size, float underlineThickness);Sets the size cache’s underline thickness. Manual metadata rather than a change to source outlines or Control size. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
underlineThickness | float | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
underlineThicknessFinite nonnegative underline thickness.
SetData2 overloads
public void SetData(byte[] data);Replaces font bytes and passes them to existing caches. Does not fully reset state or emit Changed; empty or malformed bytes do not become a validated font.
| Name | Type | Default |
|---|---|---|
data | byte[] | — |
dataSupported dynamic-format bytes; passing them does not validate decoding. The C# overload copies input data.
public void SetData(ReadOnlySpan<byte> data);Replaces font bytes and passes them to existing caches. Does not fully reset state or emit Changed; empty or malformed bytes do not become a validated font.
| Name | Type | Default |
|---|---|---|
data | ReadOnlySpan<byte> | — |
dataSupported dynamic-format bytes; passing them does not validate decoding. The C# overload copies input data.
SetDisableEmbeddedBitmapsvoid
public void SetDisableEmbeddedBitmaps(bool disableEmbeddedBitmaps);Disables embedded bitmap strikes in a dynamic font; true by default. Does not disable loading a separate BMFont. Color and bitmap-only fonts have format/backend limitations. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
disableEmbeddedBitmaps | bool | — |
disableEmbeddedBitmapsNew DisableEmbeddedBitmaps value. Disables embedded bitmap strikes in a dynamic font; true by default. Does not disable loading a separate BMFont. Color and bitmap-only fonts have format/backend limitations.
SetEmboldenvoid
public void SetEmbolden(int cacheIndex, float strength);Sets synthetic outline emboldening: 0 unchanged, positive thickens, negative thins. Not a replacement for a genuine face or weight axis. Changing it can clear backend caches. Direct cache edits do not emit Changed; configure before using the resource.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
strength | float | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
strengthFinite synthetic embolden strength, 0 unchanged.
SetExtraBaselineOffsetvoid
public void SetExtraBaselineOffset(int cacheIndex, float baselineOffset);Sets extra baseline offset as a fraction of font height rather than pixels. Separate from SetGlyphOffset or the Control Transform. Direct cache edits do not emit Changed; configure before using the resource.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
baselineOffset | float | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
baselineOffsetFinite offset as a fraction of font height rather than pixels.
SetExtraSpacingvoid
public void SetExtraSpacing(int cacheIndex, TextServer.SpacingType spacing, long value);Sets extra pixels for Glyph, Space, Top or Bottom. Not a pair-kerning map or font size. Direct cache edits do not emit Changed; configure before using the resource.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
spacing | TextServer.SpacingType | — |
value | long | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
spacingGlyph, Space, Top or Bottom from TextServer.SpacingType.
valueExtra spacing in pixels; account for overlap with negative values.
SetFaceIndexvoid
public void SetFaceIndex(int cacheIndex, long faceIndex);Selects a face inside a font collection; index must be nonnegative, below 32767 and below the actual face count. Not a variation/cache index. A numerically accepted value does not establish file decoding. Direct cache edits do not emit Changed; configure before using the resource.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
faceIndex | long | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
faceIndexExisting collection face index; 0 for an ordinary single-face file.
SetFixedSizevoid
public void SetFixedSize(int fixedSize);Fixed rasterization size; 0 disables a forced size. Not the Control text size. A change updates caches and emits Changed; loading resets it.
| Name | Type | Default |
|---|---|---|
fixedSize | int | — |
fixedSize0 to disable a forced size, or a positive rasterization size.
SetFixedSizeScaleModevoid
public void SetFixedSizeScaleMode(TextServer.FixedSizeScaleMode fixedSizeScaleMode);Scaling with positive FixedSize: Disable does not scale, IntegerOnly uses an integer multiple, Enabled permits fractional scaling. Default Disable. For pixel bitmap fonts choose IntegerOnly and check the actual UI scale. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
fixedSizeScaleMode | TextServer.FixedSizeScaleMode | — |
fixedSizeScaleModeNew FixedSizeScaleMode value. Scaling with positive FixedSize: Disable does not scale, IntegerOnly uses an integer multiple, Enabled permits fractional scaling. Default Disable. For pixel bitmap fonts choose IntegerOnly and check the actual UI scale.
SetFontNamevoid
public void SetFontName(string name);Family-name metadata in the first cache. Changing it neither loads another file nor emits Changed itself.
| Name | Type | Default |
|---|---|---|
name | string | — |
nameFirst-cache metadata name rather than a file path.
SetFontStretchvoid
public void SetFontStretch(int stretch);First-cache stretch metadata, 50–200, normal 100. The Advanced backend clamps the range; not a Transform scale or guaranteed glyph stretching. Setter does not emit Changed.
| Name | Type | Default |
|---|---|---|
stretch | int | — |
stretchStretch value 50–200, normal 100.
SetFontStylevoid
public void SetFontStyle(TextServer.FontStyle style);First-cache style metadata flags. Do not guarantee synthetic bold or italic shapes; setter does not emit Changed.
| Name | Type | Default |
|---|---|---|
style | TextServer.FontStyle | — |
styleTextServer.FontStyle mask describing the face.
SetFontStyleNamevoid
public void SetFontStyleName(string name);Style-name metadata in the first cache, for example Regular. Does not automatically select another font file or emit Changed.
| Name | Type | Default |
|---|---|---|
name | string | — |
nameFirst-cache metadata name rather than a file path.
SetFontWeightvoid
public void SetFontWeight(int weight);First-cache weight metadata: 100–999, regular 400, bold 700. The Advanced backend clamps this range. Does not replace the required face or emit Changed.
| Name | Type | Default |
|---|---|---|
weight | int | — |
weightWeight 100–999; regular 400, bold 700.
SetForceAutohintervoid
public void SetForceAutohinter(bool forceAutohinter);Prefers automatic hinting over embedded dynamic-font instructions; false by default. Does not replace Hinting or add hinting to MSDF. Compare small text at the target scale. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
forceAutohinter | bool | — |
forceAutohinterNew ForceAutohinter value. Prefers automatic hinting over embedded dynamic-font instructions; false by default. Does not replace Hinting or add hinting to MSDF. Compare small text at the target scale.
SetGenerateMipmapsvoid
public void SetGenerateMipmaps(bool generateMipmaps);Generates mip levels for font textures; false by default. Can help minified text but needs memory and suitable consumer filtering. Enabling it does not guarantee sharper text. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
generateMipmaps | bool | — |
generateMipmapsNew GenerateMipmaps value. Generates mip levels for font textures; false by default. Can help minified text but needs memory and suitable consumer filtering. Enabling it does not guarantee sharper text.
SetGlyphAdvancevoid
public void SetGlyphAdvance(int cacheIndex, int size, int glyph, Vector2 advance);Sets pen advance after a glyph in the unoutlined cache. Not the visible rectangle width: a space can advance without an image. Creates/updates a record rather than its page or outline. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
glyph | int | — |
advance | Vector2 | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
advanceX/Y pen advance in size-cache coordinates rather than visible image size.
SetGlyphOffsetvoid
public void SetGlyphOffset(int cacheIndex, Vector2I size, int glyph, Vector2 offset);Sets the glyph rectangle’s local offset from its draw position. Does not change page UVs or advance. Keep all bitmap-atlas record fields consistent. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
offset | Vector2 | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
offsetGlyph offset from its draw position in size coordinates.
SetGlyphSizevoid
public void SetGlyphSize(int cacheIndex, Vector2I size, int glyph, Vector2 glSize);Sets the drawn glyph rectangle size rather than font size or advance. Does not create an image by itself. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
glSize | Vector2 | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
glSizeNonnegative glyph rectangle width/height in size coordinates.
SetGlyphTextureIdxvoid
public void SetGlyphTextureIdx(int cacheIndex, Vector2I size, int glyph, int textureIdx);Sets a glyph record’s page index without assigning Image or validating the complete atlas. Requires the correct existing page; -1 denotes no texture. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
textureIdx | int | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
textureIdxCorrect page of this cache; -1 without a texture. Setter does not create the image.
SetGlyphUVRectvoid
public void SetGlyphUVRect(int cacheIndex, Vector2I size, int glyph, Rect2 uVRect);Sets a rectangle in atlas-image pixels rather than normalized 0–1 UVs. Must match the GlyphTextureIdx page and its dimensions. Does not set font size. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
glyph | int | — |
uVRect | Rect2 | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
glyphGlyph index/key for this cache rather than a string position. Obtain dynamic indices through GetGlyphIndex or shaping; do not reuse across different files/faces.
uVRectRectangle in page pixels consistent with Image and page index; not 0–1 UVs.
SetHintingvoid
public void SetHinting(TextServer.Hinting hinting);Fits a dynamic raster font to the pixel grid: None, Light or Normal; default Light. Normal can alter metrics along both axes, including monospace character widths. MSDF does not support hinting. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
hinting | TextServer.Hinting | — |
hintingNew Hinting value. Fits a dynamic raster font to the pixel grid: None, Light or Normal; default Light. Normal can alter metrics along both axes, including monospace character widths. MSDF does not support hinting.
SetKeepRoundingRemaindersvoid
public void SetKeepRoundingRemainders(bool keepRoundingRemainders);Carries rounding remainders during pixel alignment to reduce accumulated spacing error; true by default. With subpixel positioning the corresponding horizontal-advance rounding is bypassed. Does not enable kerning. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
keepRoundingRemainders | bool | — |
keepRoundingRemaindersNew KeepRoundingRemainders value. Carries rounding remainders during pixel alignment to reduce accumulated spacing error; true by default. With subpixel positioning the corresponding horizontal-advance rounding is bypassed. Does not enable kerning.
SetKerningvoid
public void SetKerning(int cacheIndex, int size, Vector2I glyphPair, Vector2 kerning);Sets a manual adjustment for an ordered glyph-index pair. Does not create glyphs or enable the OpenType kern feature. MSDF/FixedSize affect effective values. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | int | — |
glyphPair | Vector2I | — |
kerning | Vector2 | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizePositive font size rather than a page index or file byte length.
glyphPairVector2I(left glyph index, right glyph index); order matters. Not two Unicode code points for a dynamic font.
kerningManual Vector2 pair adjustment consistent with cache size and text direction.
SetLanguageSupportOverridevoid
public void SetLanguageSupportOverride(string language, bool supported);Sets an explicit decision for the exact language key and updates existing font RIDs. The wildcard supplies the result without an exact entry. Adds neither glyphs nor shaping and emits no Changed. Configure before using the resource. File loading retains these entries.
| Name | Type | Default |
|---|---|---|
language | string | — |
supported | bool | — |
languageExact language key such as en or ru, or the wildcard for a general decision. These methods do not normalize case/format; use consistent keys.
supportedExplicit true/false decision. false creates a denying entry; remove the entry to restore automatic selection.
SetModulateColorGlyphsvoid
public void SetModulateColorGlyphs(bool modulate);Applies RGB modulation to color glyphs too; false by default. When false, color glyphs retain their own RGB while draw opacity still applies. Does not add missing color characters. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
modulate | bool | — |
modulateNew ModulateColorGlyphs value. Applies RGB modulation to color glyphs too; false by default. When false, color glyphs retain their own RGB while draw opacity still applies. Does not add missing color characters.
SetMsdfPixelRangevoid
public void SetMsdfPixelRange(int msdfPixelRange);MSDF distance range around the contour. A new FontFile uses 16; after LoadDynamicFont it is 14. For outlines use at least twice the largest outline width. Applies with MSDF enabled; a larger value alone does not increase precision. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
msdfPixelRange | int | — |
msdfPixelRangeNew MsdfPixelRange value. MSDF distance range around the contour. A new FontFile uses 16; after LoadDynamicFont it is 14. For outlines use at least twice the largest outline width. Applies with MSDF enabled; a larger value alone does not increase precision.
SetMsdfSizevoid
public void SetMsdfSize(int msdfSize);MSDF generation source size rather than the Control text size. A new FontFile uses 48; after LoadDynamicFont it is 128. Increase only for visible precision problems: generation and memory costs grow. Requires MSDF enabled. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
msdfSize | int | — |
msdfSizeNew MsdfSize value. MSDF generation source size rather than the Control text size. A new FontFile uses 48; after LoadDynamicFont it is 128. Increase only for visible precision problems: generation and memory costs grow. Requires MSDF enabled.
SetMultichannelSignedDistanceFieldvoid
public void SetMultichannelSignedDistanceField(bool msdf);Uses a multichannel distance field for scalable glyphs from vector data; false by default. Configure MsdfSize and MsdfPixelRange after loading. Hinting is unavailable, small text may look worse, and overlapping contours need checking. Not a guarantee of cost-free scaling or quality with every file. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
msdf | bool | — |
msdfNew MultichannelSignedDistanceField value. Uses a multichannel distance field for scalable glyphs from vector data; false by default. Configure MsdfSize and MsdfPixelRange after loading. Hinting is unavailable, small text may look worse, and overlapping contours need checking. Not a guarantee of cost-free scaling or quality with every file.
SetOpentypeFeatureOverridesvoid
public void SetOpentypeFeatureOverrides(Reckfell.Collections.Dictionary overrides);Shared OpenType feature settings: a tag key such as liga or kern and an integer value. 0 disables, positive values enable or select an alternative; negative values are skipped during shaping. Separate from variable-font axes. Dictionary storage is shared: use Duplicate for an independent snapshot. Neither the setter nor Dictionary edits emit Changed; do not rely on automatic reflow of already prepared text. Configure before use and inspect GetSupportedFeatureList for font support. File loading retains settings.
| Name | Type | Default |
|---|---|---|
overrides | Reckfell.Collections.Dictionary | — |
overridesDictionary mapping feature tags to integer values. An empty table replaces previous settings; passing it does not copy its contents.
SetOversamplingvoid
public void SetOversampling(float oversampling);Dynamic-font rasterization factor: a positive value overrides the viewport setting; 0 leaves it in control. An explicit positive draw-method argument takes precedence. MSDF and positive FixedSize bypass oversampling. Not a text scale; account for memory and generation time. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
oversampling | float | — |
oversamplingNew Oversampling value. Dynamic-font rasterization factor: a positive value overrides the viewport setting; 0 leaves it in control. An explicit positive draw-method argument takes precedence. MSDF and positive FixedSize bypass oversampling. Not a text scale; account for memory and generation time.
SetScriptSupportOverridevoid
public void SetScriptSupportOverride(string script, bool supported);Sets a decision for an exact writing-script code such as Latn or Cyrl; the wildcard applies without an exact key. Does not change character shapes or add missing glyphs. Updates existing font RIDs without Changed; file loading retains entries.
| Name | Type | Default |
|---|---|---|
script | string | — |
supported | bool | — |
scriptWriting-script code such as Latn or Cyrl, or the wildcard. Keys match exactly; not a script filename.
supportedExplicit true/false decision. false creates a denying entry; remove the entry to restore automatic selection.
SetSubpixelPositioningvoid
public void SetSubpixelPositioning(TextServer.SubpixelPositioning subpixelPositioning);Horizontal glyph-position precision: Disabled, Auto, OneHalf or OneQuarter. A new FontFile uses Auto; after LoadDynamicFont it uses Disabled. Additional positions can require more cached glyph variants. Separate from Lcd antialiasing. Changing the value emits Changed; assigning the same value does not. Loading resets this option.
| Name | Type | Default |
|---|---|---|
subpixelPositioning | TextServer.SubpixelPositioning | — |
subpixelPositioningNew SubpixelPositioning value. Horizontal glyph-position precision: Disabled, Auto, OneHalf or OneQuarter. A new FontFile uses Auto; after LoadDynamicFont it uses Disabled. Additional positions can require more cached glyph variants. Separate from Lcd antialiasing.
SetTextureImagevoid
public void SetTextureImage(int cacheIndex, Vector2I size, int textureIndex, Image image);Assigns a nonnull Image to an atlas page and creates its texture; a higher index grows the page table. Image is retained as a shared resource. Does not set glyph rectangles/metrics or emit Changed. Build a consistent cache before use.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
textureIndex | int | — |
image | Image | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
textureIndexExisting page index from 0 to GetTextureCount()-1; SetTextureImage/SetTextureOffsets can grow the table for a higher nonnegative index.
imageNonnull Image containing page data; retained as a shared reference.
SetTextureOffsets2 overloads
public void SetTextureOffsets(int cacheIndex, Vector2I size, int textureIndex, int[] offset);Replaces internal atlas shelf-packing data: groups of four ints, x, y, width, height. Length must be divisible by 4. Not an individual glyph offset or UV array. C# copies input; array and span overloads are equivalent. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
textureIndex | int | — |
offset | int[] | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
textureIndexExisting page index from 0 to GetTextureCount()-1; SetTextureImage/SetTextureOffsets can grow the table for a higher nonnegative index.
offsetShelf x, y, width, height groups, length divisible by 4; C# copies the array/span.
public void SetTextureOffsets(int cacheIndex, Vector2I size, int textureIndex, ReadOnlySpan<int> offset);Replaces internal atlas shelf-packing data: groups of four ints, x, y, width, height. Length must be divisible by 4. Not an individual glyph offset or UV array. C# copies input; array and span overloads are equivalent. Emits no Changed.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
size | Vector2I | — |
textureIndex | int | — |
offset | ReadOnlySpan<int> | — |
cacheIndexNonnegative font RID slot, usually 0. A new index can grow the table and create a cache; intermediate slots also count in GetCacheCount. Use small controlled indices.
sizeVector2I(positive font size, nonnegative outline thickness); MSDF/FixedSize can select another effective cache.
textureIndexExisting page index from 0 to GetTextureCount()-1; SetTextureImage/SetTextureOffsets can grow the table for a higher nonnegative index.
offsetShelf x, y, width, height groups, length divisible by 4; C# copies the array/span.
SetTransformvoid
public void SetTransform(int cacheIndex, Transform2D transform);Sets an outline transform such as slant or rotation. A synthetic glyph change rather than moving UI; do not use Origin as the text position. Direct cache edits do not emit Changed; configure before using the resource.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
transform | Transform2D | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
transformFinite outline matrix; Identity unchanged.
SetVariationCoordinatesvoid
public void SetVariationCoordinates(int cacheIndex, Reckfell.Collections.Dictionary variationCoordinates);Copies a flat axis → number table into the chosen cache; obtain axes/ranges from GetSupportedVariationList. Prefer numeric tags from TextServer.NameToTag. These are variable-font axes rather than liga/kern features. The backend clears its cache when the table changes. Direct cache edits do not emit Changed; configure before using the resource.
| Name | Type | Default |
|---|---|---|
cacheIndex | int | — |
variationCoordinates | Reckfell.Collections.Dictionary | — |
cacheIndexNonnegative font RID index, usually 0; a new index can lazily grow the cache table.
variationCoordinatesFlat Dictionary mapping numeric axis tags to finite values within file ranges. Setter copies the table.