Table of Contents

Class TextServerExtension

Namespace
Godot
Assembly
GodotSharp.dll

External TextServer implementations should inherit from this class.

public class TextServerExtension : TextServer, IDisposable
Inheritance
TextServerExtension
Implements
Derived
Inherited Members

Constructors

TextServerExtension()

public TextServerExtension()

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

_Cleanup()

Optional.

This method is called before text server is unregistered.

public virtual void _Cleanup()

_CreateFont()

Required.

Creates a new, empty font cache entry resource.

public virtual Rid _CreateFont()

Returns

Rid

_CreateFontLinkedVariation(Rid)

Optional, implement if font supports extra spacing or baseline offset.

Creates a new variation existing font which is reusing the same glyph cache and font data.

public virtual Rid _CreateFontLinkedVariation(Rid fontRid)

Parameters

fontRid Rid

Returns

Rid

_CreateShapedText(Direction, Orientation)

Required.

Creates a new buffer for complex text layout, with the given direction and orientation.

public virtual Rid _CreateShapedText(TextServer.Direction direction, TextServer.Orientation orientation)

Parameters

direction TextServer.Direction
orientation TextServer.Orientation

Returns

Rid

_DrawHexCodeBox(Rid, long, Vector2, long, Color)

Optional.

Draws box displaying character hexadecimal code.

public virtual void _DrawHexCodeBox(Rid canvas, long size, Vector2 pos, long index, Color color)

Parameters

canvas Rid
size long
pos Vector2
index long
color Color

_FontClearGlyphs(Rid, Vector2I)

Required.

Removes all rendered glyph information from the cache entry.

public virtual void _FontClearGlyphs(Rid fontRid, Vector2I size)

Parameters

fontRid Rid
size Vector2I

_FontClearKerningMap(Rid, long)

Optional.

Removes all kerning overrides.

public virtual void _FontClearKerningMap(Rid fontRid, long size)

Parameters

fontRid Rid
size long

_FontClearSizeCache(Rid)

Required.

Removes all font sizes from the cache entry.

public virtual void _FontClearSizeCache(Rid fontRid)

Parameters

fontRid Rid

_FontClearTextures(Rid, Vector2I)

Required.

Removes all textures from font cache entry.

public virtual void _FontClearTextures(Rid fontRid, Vector2I size)

Parameters

fontRid Rid
size Vector2I

_FontDrawGlyph(Rid, Rid, long, Vector2, long, Color)

Required.

Draws single glyph into a canvas item at the position, using fontRid at the size size.

public virtual void _FontDrawGlyph(Rid fontRid, Rid canvas, long size, Vector2 pos, long index, Color color)

Parameters

fontRid Rid
canvas Rid
size long
pos Vector2
index long
color Color

_FontDrawGlyphOutline(Rid, Rid, long, long, Vector2, long, Color)

Required.

Draws single glyph outline of size outlineSize into a canvas item at the position, using fontRid at the size size.

public virtual void _FontDrawGlyphOutline(Rid fontRid, Rid canvas, long size, long outlineSize, Vector2 pos, long index, Color color)

Parameters

fontRid Rid
canvas Rid
size long
outlineSize long
pos Vector2
index long
color Color

_FontGetAntialiasing(Rid)

Optional.

Returns font anti-aliasing mode.

public virtual TextServer.FontAntialiasing _FontGetAntialiasing(Rid fontRid)

Parameters

fontRid Rid

Returns

TextServer.FontAntialiasing

_FontGetAscent(Rid, long)

Required.

Returns the font ascent (number of pixels above the baseline).

public virtual double _FontGetAscent(Rid fontRid, long size)

Parameters

fontRid Rid
size long

Returns

double

_FontGetBaselineOffset(Rid)

Optional.

Returns extra baseline offset (as a fraction of font height).

public virtual double _FontGetBaselineOffset(Rid fontRid)

Parameters

fontRid Rid

Returns

double

_FontGetCharFromGlyphIndex(Rid, long, long)

Required.

Returns character code associated with glyphIndex, or 0 if glyphIndex is invalid.

public virtual long _FontGetCharFromGlyphIndex(Rid fontRid, long size, long glyphIndex)

Parameters

fontRid Rid
size long
glyphIndex long

Returns

long

_FontGetDescent(Rid, long)

Required.

Returns the font descent (number of pixels below the baseline).

public virtual double _FontGetDescent(Rid fontRid, long size)

Parameters

fontRid Rid
size long

Returns

double

_FontGetDisableEmbeddedBitmaps(Rid)

Optional.

Returns whether the font's embedded bitmap loading is disabled.

public virtual bool _FontGetDisableEmbeddedBitmaps(Rid fontRid)

Parameters

fontRid Rid

Returns

bool

_FontGetEmbolden(Rid)

Optional.

Returns font embolden strength.

public virtual double _FontGetEmbolden(Rid fontRid)

Parameters

fontRid Rid

Returns

double

_FontGetFaceCount(Rid)

Optional.

Returns number of faces in the TrueType / OpenType collection.

public virtual long _FontGetFaceCount(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontGetFaceIndex(Rid)

Optional.

Returns an active face index in the TrueType / OpenType collection.

public virtual long _FontGetFaceIndex(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontGetFixedSize(Rid)

Required.

Returns bitmap font fixed size.

public virtual long _FontGetFixedSize(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontGetFixedSizeScaleMode(Rid)

Required.

Returns bitmap font scaling mode.

public virtual TextServer.FixedSizeScaleMode _FontGetFixedSizeScaleMode(Rid fontRid)

Parameters

fontRid Rid

Returns

TextServer.FixedSizeScaleMode

_FontGetGenerateMipmaps(Rid)

Optional.

Returns true if font texture mipmap generation is enabled.

public virtual bool _FontGetGenerateMipmaps(Rid fontRid)

Parameters

fontRid Rid

Returns

bool

_FontGetGlobalOversampling()

Optional.

Returns the font oversampling factor, shared by all fonts in the TextServer.

public virtual double _FontGetGlobalOversampling()

Returns

double

_FontGetGlyphAdvance(Rid, long, long)

Required.

Returns glyph advance (offset of the next glyph).

public virtual Vector2 _FontGetGlyphAdvance(Rid fontRid, long size, long glyph)

Parameters

fontRid Rid
size long
glyph long

Returns

Vector2

_FontGetGlyphContours(Rid, long, long)

Optional.

Returns outline contours of the glyph.

public virtual Dictionary _FontGetGlyphContours(Rid fontRid, long size, long index)

Parameters

fontRid Rid
size long
index long

Returns

Dictionary

_FontGetGlyphIndex(Rid, long, long, long)

Required.

Returns the glyph index of a char, optionally modified by the variationSelector.

public virtual long _FontGetGlyphIndex(Rid fontRid, long size, long @char, long variationSelector)

Parameters

fontRid Rid
size long
char long
variationSelector long

Returns

long

_FontGetGlyphList(Rid, Vector2I)

Required.

Returns list of rendered glyphs in the cache entry.

public virtual int[] _FontGetGlyphList(Rid fontRid, Vector2I size)

Parameters

fontRid Rid
size Vector2I

Returns

int[]

_FontGetGlyphOffset(Rid, Vector2I, long)

Required.

Returns glyph offset from the baseline.

public virtual Vector2 _FontGetGlyphOffset(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

Returns

Vector2

_FontGetGlyphSize(Rid, Vector2I, long)

Required.

Returns size of the glyph.

public virtual Vector2 _FontGetGlyphSize(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

Returns

Vector2

_FontGetGlyphTextureIdx(Rid, Vector2I, long)

Required.

Returns index of the cache texture containing the glyph.

public virtual long _FontGetGlyphTextureIdx(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

Returns

long

_FontGetGlyphTextureRid(Rid, Vector2I, long)

Required.

Returns resource ID of the cache texture containing the glyph.

public virtual Rid _FontGetGlyphTextureRid(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

Returns

Rid

_FontGetGlyphTextureSize(Rid, Vector2I, long)

Required.

Returns size of the cache texture containing the glyph.

public virtual Vector2 _FontGetGlyphTextureSize(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

Returns

Vector2

_FontGetGlyphUVRect(Rid, Vector2I, long)

Required.

Returns rectangle in the cache texture containing the glyph.

public virtual Rect2 _FontGetGlyphUVRect(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

Returns

Rect2

_FontGetHinting(Rid)

Optional.

Returns the font hinting mode. Used by dynamic fonts only.

public virtual TextServer.Hinting _FontGetHinting(Rid fontRid)

Parameters

fontRid Rid

Returns

TextServer.Hinting

_FontGetKerning(Rid, long, Vector2I)

Optional.

Returns kerning for the pair of glyphs.

public virtual Vector2 _FontGetKerning(Rid fontRid, long size, Vector2I glyphPair)

Parameters

fontRid Rid
size long
glyphPair Vector2I

Returns

Vector2

_FontGetKerningList(Rid, long)

Optional.

Returns list of the kerning overrides.

public virtual Array<Vector2I> _FontGetKerningList(Rid fontRid, long size)

Parameters

fontRid Rid
size long

Returns

Array<Vector2I>

_FontGetLanguageSupportOverride(Rid, string)

Optional.

Returns true if support override is enabled for the language.

public virtual bool _FontGetLanguageSupportOverride(Rid fontRid, string language)

Parameters

fontRid Rid
language string

Returns

bool

_FontGetLanguageSupportOverrides(Rid)

Optional.

Returns list of language support overrides.

public virtual string[] _FontGetLanguageSupportOverrides(Rid fontRid)

Parameters

fontRid Rid

Returns

string[]

_FontGetMsdfPixelRange(Rid)

Optional.

Returns the width of the range around the shape between the minimum and maximum representable signed distance.

public virtual long _FontGetMsdfPixelRange(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontGetMsdfSize(Rid)

Optional.

Returns source font size used to generate MSDF textures.

public virtual long _FontGetMsdfSize(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontGetName(Rid)

Optional.

Returns font family name.

public virtual string _FontGetName(Rid fontRid)

Parameters

fontRid Rid

Returns

string

_FontGetOpentypeFeatureOverrides(Rid)

Optional.

Returns font OpenType feature set override.

public virtual Dictionary _FontGetOpentypeFeatureOverrides(Rid fontRid)

Parameters

fontRid Rid

Returns

Dictionary

_FontGetOtNameStrings(Rid)

Optional.

Returns Dictionary with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).

public virtual Dictionary _FontGetOtNameStrings(Rid fontRid)

Parameters

fontRid Rid

Returns

Dictionary

_FontGetOversampling(Rid)

Optional.

Returns font oversampling factor, if set to 0.0 global oversampling factor is used instead. Used by dynamic fonts only.

public virtual double _FontGetOversampling(Rid fontRid)

Parameters

fontRid Rid

Returns

double

_FontGetScale(Rid, long)

Required.

Returns scaling factor of the color bitmap font.

public virtual double _FontGetScale(Rid fontRid, long size)

Parameters

fontRid Rid
size long

Returns

double

_FontGetScriptSupportOverride(Rid, string)

Optional.

Returns true if support override is enabled for the script.

public virtual bool _FontGetScriptSupportOverride(Rid fontRid, string script)

Parameters

fontRid Rid
script string

Returns

bool

_FontGetScriptSupportOverrides(Rid)

Optional.

Returns list of script support overrides.

public virtual string[] _FontGetScriptSupportOverrides(Rid fontRid)

Parameters

fontRid Rid

Returns

string[]

_FontGetSizeCacheList(Rid)

Required.

Returns list of the font sizes in the cache. Each size is Vector2I with font size and outline size.

public virtual Array<Vector2I> _FontGetSizeCacheList(Rid fontRid)

Parameters

fontRid Rid

Returns

Array<Vector2I>

_FontGetSpacing(Rid, SpacingType)

Optional.

Returns the spacing for spacing (see TextServer.SpacingType) in pixels (not relative to the font size).

public virtual long _FontGetSpacing(Rid fontRid, TextServer.SpacingType spacing)

Parameters

fontRid Rid
spacing TextServer.SpacingType

Returns

long

_FontGetStretch(Rid)

Optional.

Returns font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

public virtual long _FontGetStretch(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontGetStyle(Rid)

Optional.

Returns font style flags, see TextServer.FontStyle.

public virtual TextServer.FontStyle _FontGetStyle(Rid fontRid)

Parameters

fontRid Rid

Returns

TextServer.FontStyle

_FontGetStyleName(Rid)

Optional.

Returns font style name.

public virtual string _FontGetStyleName(Rid fontRid)

Parameters

fontRid Rid

Returns

string

_FontGetSubpixelPositioning(Rid)

Optional.

Returns font subpixel glyph positioning mode.

public virtual TextServer.SubpixelPositioning _FontGetSubpixelPositioning(Rid fontRid)

Parameters

fontRid Rid

Returns

TextServer.SubpixelPositioning

_FontGetSupportedChars(Rid)

Required.

Returns a string containing all the characters available in the font.

public virtual string _FontGetSupportedChars(Rid fontRid)

Parameters

fontRid Rid

Returns

string

_FontGetTextureCount(Rid, Vector2I)

Required.

Returns number of textures used by font cache entry.

public virtual long _FontGetTextureCount(Rid fontRid, Vector2I size)

Parameters

fontRid Rid
size Vector2I

Returns

long

_FontGetTextureImage(Rid, Vector2I, long)

Required.

Returns font cache texture image data.

public virtual Image _FontGetTextureImage(Rid fontRid, Vector2I size, long textureIndex)

Parameters

fontRid Rid
size Vector2I
textureIndex long

Returns

Image

_FontGetTextureOffsets(Rid, Vector2I, long)

Optional.

Returns array containing glyph packing data.

public virtual int[] _FontGetTextureOffsets(Rid fontRid, Vector2I size, long textureIndex)

Parameters

fontRid Rid
size Vector2I
textureIndex long

Returns

int[]

_FontGetTransform(Rid)

Optional.

Returns 2D transform applied to the font outlines.

public virtual Transform2D _FontGetTransform(Rid fontRid)

Parameters

fontRid Rid

Returns

Transform2D

_FontGetUnderlinePosition(Rid, long)

Required.

Returns pixel offset of the underline below the baseline.

public virtual double _FontGetUnderlinePosition(Rid fontRid, long size)

Parameters

fontRid Rid
size long

Returns

double

_FontGetUnderlineThickness(Rid, long)

Required.

Returns thickness of the underline in pixels.

public virtual double _FontGetUnderlineThickness(Rid fontRid, long size)

Parameters

fontRid Rid
size long

Returns

double

_FontGetVariationCoordinates(Rid)

Optional.

Returns variation coordinates for the specified font cache entry.

public virtual Dictionary _FontGetVariationCoordinates(Rid fontRid)

Parameters

fontRid Rid

Returns

Dictionary

_FontGetWeight(Rid)

Optional.

Returns weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

public virtual long _FontGetWeight(Rid fontRid)

Parameters

fontRid Rid

Returns

long

_FontHasChar(Rid, long)

Required.

Returns true if a Unicode char is available in the font.

public virtual bool _FontHasChar(Rid fontRid, long @char)

Parameters

fontRid Rid
char long

Returns

bool

_FontIsAllowSystemFallback(Rid)

Optional.

Returns true if system fonts can be automatically used as fallbacks.

public virtual bool _FontIsAllowSystemFallback(Rid fontRid)

Parameters

fontRid Rid

Returns

bool

_FontIsForceAutohinter(Rid)

Optional.

Returns true if auto-hinting is supported and preferred over font built-in hinting.

public virtual bool _FontIsForceAutohinter(Rid fontRid)

Parameters

fontRid Rid

Returns

bool

_FontIsLanguageSupported(Rid, string)

Optional.

Returns true, if font supports given language (ISO 639 code).

public virtual bool _FontIsLanguageSupported(Rid fontRid, string language)

Parameters

fontRid Rid
language string

Returns

bool

_FontIsMultichannelSignedDistanceField(Rid)

Optional.

Returns true if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.

public virtual bool _FontIsMultichannelSignedDistanceField(Rid fontRid)

Parameters

fontRid Rid

Returns

bool

_FontIsScriptSupported(Rid, string)

Optional.

Returns true, if font supports given script (ISO 15924 code).

public virtual bool _FontIsScriptSupported(Rid fontRid, string script)

Parameters

fontRid Rid
script string

Returns

bool

_FontRemoveGlyph(Rid, Vector2I, long)

Required.

Removes specified rendered glyph information from the cache entry.

public virtual void _FontRemoveGlyph(Rid fontRid, Vector2I size, long glyph)

Parameters

fontRid Rid
size Vector2I
glyph long

_FontRemoveKerning(Rid, long, Vector2I)

Optional.

Removes kerning override for the pair of glyphs.

public virtual void _FontRemoveKerning(Rid fontRid, long size, Vector2I glyphPair)

Parameters

fontRid Rid
size long
glyphPair Vector2I

_FontRemoveLanguageSupportOverride(Rid, string)

Optional.

Remove language support override.

public virtual void _FontRemoveLanguageSupportOverride(Rid fontRid, string language)

Parameters

fontRid Rid
language string

_FontRemoveScriptSupportOverride(Rid, string)

Optional.

Removes script support override.

public virtual void _FontRemoveScriptSupportOverride(Rid fontRid, string script)

Parameters

fontRid Rid
script string

_FontRemoveSizeCache(Rid, Vector2I)

Required.

Removes specified font size from the cache entry.

public virtual void _FontRemoveSizeCache(Rid fontRid, Vector2I size)

Parameters

fontRid Rid
size Vector2I

_FontRemoveTexture(Rid, Vector2I, long)

Required.

Removes specified texture from the cache entry.

public virtual void _FontRemoveTexture(Rid fontRid, Vector2I size, long textureIndex)

Parameters

fontRid Rid
size Vector2I
textureIndex long

_FontRenderGlyph(Rid, Vector2I, long)

Optional.

Renders specified glyph to the font cache texture.

public virtual void _FontRenderGlyph(Rid fontRid, Vector2I size, long index)

Parameters

fontRid Rid
size Vector2I
index long

_FontRenderRange(Rid, Vector2I, long, long)

Optional.

Renders the range of characters to the font cache texture.

public virtual void _FontRenderRange(Rid fontRid, Vector2I size, long start, long end)

Parameters

fontRid Rid
size Vector2I
start long
end long

_FontSetAllowSystemFallback(Rid, bool)

Optional.

If set to true, system fonts can be automatically used as fallbacks.

public virtual void _FontSetAllowSystemFallback(Rid fontRid, bool allowSystemFallback)

Parameters

fontRid Rid
allowSystemFallback bool

_FontSetAntialiasing(Rid, FontAntialiasing)

Optional.

Sets font anti-aliasing mode.

public virtual void _FontSetAntialiasing(Rid fontRid, TextServer.FontAntialiasing antialiasing)

Parameters

fontRid Rid
antialiasing TextServer.FontAntialiasing

_FontSetAscent(Rid, long, double)

Required.

Sets the font ascent (number of pixels above the baseline).

public virtual void _FontSetAscent(Rid fontRid, long size, double ascent)

Parameters

fontRid Rid
size long
ascent double

_FontSetBaselineOffset(Rid, double)

Optional.

Sets extra baseline offset (as a fraction of font height).

public virtual void _FontSetBaselineOffset(Rid fontRid, double baselineOffset)

Parameters

fontRid Rid
baselineOffset double

_FontSetData(Rid, byte[])

Optional.

Sets font source data, e.g contents of the dynamic font source file.

public virtual void _FontSetData(Rid fontRid, byte[] data)

Parameters

fontRid Rid
data byte[]

_FontSetDescent(Rid, long, double)

Required.

Sets the font descent (number of pixels below the baseline).

public virtual void _FontSetDescent(Rid fontRid, long size, double descent)

Parameters

fontRid Rid
size long
descent double

_FontSetDisableEmbeddedBitmaps(Rid, bool)

Optional.

If set to true, embedded font bitmap loading is disabled.

public virtual void _FontSetDisableEmbeddedBitmaps(Rid fontRid, bool disableEmbeddedBitmaps)

Parameters

fontRid Rid
disableEmbeddedBitmaps bool

_FontSetEmbolden(Rid, double)

Sets font embolden strength. If strength is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.

public virtual void _FontSetEmbolden(Rid fontRid, double strength)

Parameters

fontRid Rid
strength double

_FontSetFaceIndex(Rid, long)

Optional.

Sets an active face index in the TrueType / OpenType collection.

public virtual void _FontSetFaceIndex(Rid fontRid, long faceIndex)

Parameters

fontRid Rid
faceIndex long

_FontSetFixedSize(Rid, long)

Required.

Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.

public virtual void _FontSetFixedSize(Rid fontRid, long fixedSize)

Parameters

fontRid Rid
fixedSize long

_FontSetFixedSizeScaleMode(Rid, FixedSizeScaleMode)

Required.

Sets bitmap font scaling mode. This property is used only if fixed_size is greater than zero.

public virtual void _FontSetFixedSizeScaleMode(Rid fontRid, TextServer.FixedSizeScaleMode fixedSizeScaleMode)

Parameters

fontRid Rid
fixedSizeScaleMode TextServer.FixedSizeScaleMode

_FontSetForceAutohinter(Rid, bool)

Optional.

If set to true auto-hinting is preferred over font built-in hinting.

public virtual void _FontSetForceAutohinter(Rid fontRid, bool forceAutohinter)

Parameters

fontRid Rid
forceAutohinter bool

_FontSetGenerateMipmaps(Rid, bool)

Optional.

If set to true font texture mipmap generation is enabled.

public virtual void _FontSetGenerateMipmaps(Rid fontRid, bool generateMipmaps)

Parameters

fontRid Rid
generateMipmaps bool

_FontSetGlobalOversampling(double)

Optional.

Sets oversampling factor, shared by all font in the TextServer.

public virtual void _FontSetGlobalOversampling(double oversampling)

Parameters

oversampling double

_FontSetGlyphAdvance(Rid, long, long, Vector2)

Required.

Sets glyph advance (offset of the next glyph).

public virtual void _FontSetGlyphAdvance(Rid fontRid, long size, long glyph, Vector2 advance)

Parameters

fontRid Rid
size long
glyph long
advance Vector2

_FontSetGlyphOffset(Rid, Vector2I, long, Vector2)

Required.

Sets glyph offset from the baseline.

public virtual void _FontSetGlyphOffset(Rid fontRid, Vector2I size, long glyph, Vector2 offset)

Parameters

fontRid Rid
size Vector2I
glyph long
offset Vector2

_FontSetGlyphSize(Rid, Vector2I, long, Vector2)

Required.

Sets size of the glyph.

public virtual void _FontSetGlyphSize(Rid fontRid, Vector2I size, long glyph, Vector2 glSize)

Parameters

fontRid Rid
size Vector2I
glyph long
glSize Vector2

_FontSetGlyphTextureIdx(Rid, Vector2I, long, long)

Required.

Sets index of the cache texture containing the glyph.

public virtual void _FontSetGlyphTextureIdx(Rid fontRid, Vector2I size, long glyph, long textureIdx)

Parameters

fontRid Rid
size Vector2I
glyph long
textureIdx long

_FontSetGlyphUVRect(Rid, Vector2I, long, Rect2)

Required.

Sets rectangle in the cache texture containing the glyph.

public virtual void _FontSetGlyphUVRect(Rid fontRid, Vector2I size, long glyph, Rect2 uVRect)

Parameters

fontRid Rid
size Vector2I
glyph long
uVRect Rect2

_FontSetHinting(Rid, Hinting)

Optional.

Sets font hinting mode. Used by dynamic fonts only.

public virtual void _FontSetHinting(Rid fontRid, TextServer.Hinting hinting)

Parameters

fontRid Rid
hinting TextServer.Hinting

_FontSetKerning(Rid, long, Vector2I, Vector2)

Optional.

Sets kerning for the pair of glyphs.

public virtual void _FontSetKerning(Rid fontRid, long size, Vector2I glyphPair, Vector2 kerning)

Parameters

fontRid Rid
size long
glyphPair Vector2I
kerning Vector2

_FontSetLanguageSupportOverride(Rid, string, bool)

Optional.

Adds override for _FontIsLanguageSupported(Rid, string).

public virtual void _FontSetLanguageSupportOverride(Rid fontRid, string language, bool supported)

Parameters

fontRid Rid
language string
supported bool

_FontSetMsdfPixelRange(Rid, long)

Optional.

Sets the width of the range around the shape between the minimum and maximum representable signed distance.

public virtual void _FontSetMsdfPixelRange(Rid fontRid, long msdfPixelRange)

Parameters

fontRid Rid
msdfPixelRange long

_FontSetMsdfSize(Rid, long)

Optional.

Sets source font size used to generate MSDF textures.

public virtual void _FontSetMsdfSize(Rid fontRid, long msdfSize)

Parameters

fontRid Rid
msdfSize long

_FontSetMultichannelSignedDistanceField(Rid, bool)

Optional.

If set to true, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.

public virtual void _FontSetMultichannelSignedDistanceField(Rid fontRid, bool msdf)

Parameters

fontRid Rid
msdf bool

_FontSetName(Rid, string)

Optional.

Sets the font family name.

public virtual void _FontSetName(Rid fontRid, string name)

Parameters

fontRid Rid
name string

_FontSetOpentypeFeatureOverrides(Rid, Dictionary)

Optional.

Sets font OpenType feature set override.

public virtual void _FontSetOpentypeFeatureOverrides(Rid fontRid, Dictionary overrides)

Parameters

fontRid Rid
overrides Dictionary

_FontSetOversampling(Rid, double)

Optional.

Sets font oversampling factor, if set to 0.0 global oversampling factor is used instead. Used by dynamic fonts only.

public virtual void _FontSetOversampling(Rid fontRid, double oversampling)

Parameters

fontRid Rid
oversampling double

_FontSetScale(Rid, long, double)

Required.

Sets scaling factor of the color bitmap font.

public virtual void _FontSetScale(Rid fontRid, long size, double scale)

Parameters

fontRid Rid
size long
scale double

_FontSetScriptSupportOverride(Rid, string, bool)

Optional.

Adds override for _FontIsScriptSupported(Rid, string).

public virtual void _FontSetScriptSupportOverride(Rid fontRid, string script, bool supported)

Parameters

fontRid Rid
script string
supported bool

_FontSetSpacing(Rid, SpacingType, long)

Optional.

Sets the spacing for spacing (see TextServer.SpacingType) to value in pixels (not relative to the font size).

public virtual void _FontSetSpacing(Rid fontRid, TextServer.SpacingType spacing, long value)

Parameters

fontRid Rid
spacing TextServer.SpacingType
value long

_FontSetStretch(Rid, long)

Optional.

Sets font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

public virtual void _FontSetStretch(Rid fontRid, long stretch)

Parameters

fontRid Rid
stretch long

_FontSetStyle(Rid, FontStyle)

Optional.

Sets the font style flags, see TextServer.FontStyle.

public virtual void _FontSetStyle(Rid fontRid, TextServer.FontStyle style)

Parameters

fontRid Rid
style TextServer.FontStyle

_FontSetStyleName(Rid, string)

Optional.

Sets the font style name.

public virtual void _FontSetStyleName(Rid fontRid, string nameStyle)

Parameters

fontRid Rid
nameStyle string

_FontSetSubpixelPositioning(Rid, SubpixelPositioning)

Optional.

Sets font subpixel glyph positioning mode.

public virtual void _FontSetSubpixelPositioning(Rid fontRid, TextServer.SubpixelPositioning subpixelPositioning)

Parameters

fontRid Rid
subpixelPositioning TextServer.SubpixelPositioning

_FontSetTextureImage(Rid, Vector2I, long, Image)

Required.

Sets font cache texture image data.

public virtual void _FontSetTextureImage(Rid fontRid, Vector2I size, long textureIndex, Image image)

Parameters

fontRid Rid
size Vector2I
textureIndex long
image Image

_FontSetTextureOffsets(Rid, Vector2I, long, int[])

Optional.

Sets array containing glyph packing data.

public virtual void _FontSetTextureOffsets(Rid fontRid, Vector2I size, long textureIndex, int[] offset)

Parameters

fontRid Rid
size Vector2I
textureIndex long
offset int[]

_FontSetTransform(Rid, Transform2D)

Optional.

Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.

public virtual void _FontSetTransform(Rid fontRid, Transform2D transform)

Parameters

fontRid Rid
transform Transform2D

_FontSetUnderlinePosition(Rid, long, double)

Required.

Sets pixel offset of the underline below the baseline.

public virtual void _FontSetUnderlinePosition(Rid fontRid, long size, double underlinePosition)

Parameters

fontRid Rid
size long
underlinePosition double

_FontSetUnderlineThickness(Rid, long, double)

Required.

Sets thickness of the underline in pixels.

public virtual void _FontSetUnderlineThickness(Rid fontRid, long size, double underlineThickness)

Parameters

fontRid Rid
size long
underlineThickness double

_FontSetVariationCoordinates(Rid, Dictionary)

Optional.

Sets variation coordinates for the specified font cache entry.

public virtual void _FontSetVariationCoordinates(Rid fontRid, Dictionary variationCoordinates)

Parameters

fontRid Rid
variationCoordinates Dictionary

_FontSetWeight(Rid, long)

Optional.

Sets weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

public virtual void _FontSetWeight(Rid fontRid, long weight)

Parameters

fontRid Rid
weight long

_FontSupportedFeatureList(Rid)

Optional.

Returns the dictionary of the supported OpenType features.

public virtual Dictionary _FontSupportedFeatureList(Rid fontRid)

Parameters

fontRid Rid

Returns

Dictionary

_FontSupportedVariationList(Rid)

Optional.

Returns the dictionary of the supported OpenType variation coordinates.

public virtual Dictionary _FontSupportedVariationList(Rid fontRid)

Parameters

fontRid Rid

Returns

Dictionary

_FormatNumber(string, string)

Optional.

Converts a number from the Western Arabic (0..9) to the numeral systems used in language.

public virtual string _FormatNumber(string number, string language)

Parameters

number string
language string

Returns

string

_FreeRid(Rid)

Required.

Frees an object created by this TextServer.

public virtual void _FreeRid(Rid rid)

Parameters

rid Rid

_GetFeatures()

Required.

Returns text server features, see TextServer.Feature.

public virtual long _GetFeatures()

Returns

long

_GetHexCodeBoxSize(long, long)

Optional.

Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).

public virtual Vector2 _GetHexCodeBoxSize(long size, long index)

Parameters

size long
index long

Returns

Vector2

_GetName()

Required.

Returns the name of the server interface.

public virtual string _GetName()

Returns

string

_GetSupportDataFileName()

Optional.

Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.

public virtual string _GetSupportDataFileName()

Returns

string

_GetSupportDataInfo()

Optional.

Returns TextServer database (e.g. ICU break iterators and dictionaries) description.

public virtual string _GetSupportDataInfo()

Returns

string

_Has(Rid)

Required.

Returns true if rid is valid resource owned by this text server.

public virtual bool _Has(Rid rid)

Parameters

rid Rid

Returns

bool

_HasFeature(Feature)

Required.

Returns true if the server supports a feature.

public virtual bool _HasFeature(TextServer.Feature feature)

Parameters

feature TextServer.Feature

Returns

bool

_IsConfusable(string, string[])

Optional.

Returns index of the first string in dict which is visually confusable with the string, or -1 if none is found.

public virtual long _IsConfusable(string @string, string[] dict)

Parameters

string string
dict string[]

Returns

long

_IsLocaleRightToLeft(string)

Required.

Returns true if locale is right-to-left.

public virtual bool _IsLocaleRightToLeft(string locale)

Parameters

locale string

Returns

bool

_IsValidIdentifier(string)

Optional.

Returns true if string is a valid identifier.

public virtual bool _IsValidIdentifier(string @string)

Parameters

string string

Returns

bool

_IsValidLetter(ulong)

public virtual bool _IsValidLetter(ulong unicode)

Parameters

unicode ulong

Returns

bool

_LoadSupportData(string)

Optional.

Loads optional TextServer database (e.g. ICU break iterators and dictionaries).

public virtual bool _LoadSupportData(string fileName)

Parameters

fileName string

Returns

bool

_NameToTag(string)

Optional.

Converts readable feature, variation, script, or language name to OpenType tag.

public virtual long _NameToTag(string name)

Parameters

name string

Returns

long

_ParseNumber(string, string)

Optional.

Converts number from the numeral systems used in language to Western Arabic (0..9).

public virtual string _ParseNumber(string number, string language)

Parameters

number string
language string

Returns

string

_ParseStructuredText(StructuredTextParser, Array, string)

Optional.

Default implementation of the BiDi algorithm override function. See TextServer.StructuredTextParser for more info.

public virtual Array<Vector3I> _ParseStructuredText(TextServer.StructuredTextParser parserType, Array args, string text)

Parameters

parserType TextServer.StructuredTextParser
args Array
text string

Returns

Array<Vector3I>

_PercentSign(string)

Optional.

Returns percent sign used in the language.

public virtual string _PercentSign(string language)

Parameters

language string

Returns

string

_SaveSupportData(string)

Optional.

Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.

public virtual bool _SaveSupportData(string fileName)

Parameters

fileName string

Returns

bool

_ShapedGetSpanCount(Rid)

public virtual long _ShapedGetSpanCount(Rid shaped)

Parameters

shaped Rid

Returns

long

_ShapedGetSpanMeta(Rid, long)

Required.

Returns text span metadata.

public virtual Variant _ShapedGetSpanMeta(Rid shaped, long index)

Parameters

shaped Rid
index long

Returns

Variant

_ShapedSetSpanUpdateFont(Rid, long, Array<Rid>, long, Dictionary)

Required.

Changes text span font, font size, and OpenType features, without changing the text.

public virtual void _ShapedSetSpanUpdateFont(Rid shaped, long index, Array<Rid> fonts, long size, Dictionary opentypeFeatures)

Parameters

shaped Rid
index long
fonts Array<Rid>
size long
opentypeFeatures Dictionary

_ShapedTextAddObject(Rid, Variant, Vector2, InlineAlignment, long, double)

Required.

Adds inline object to the text buffer, key must be unique. In the text, object is represented as length object replacement characters.

public virtual bool _ShapedTextAddObject(Rid shaped, Variant key, Vector2 size, InlineAlignment inlineAlign, long length, double baseline)

Parameters

shaped Rid
key Variant
size Vector2
inlineAlign InlineAlignment
length long
baseline double

Returns

bool

_ShapedTextAddString(Rid, string, Array<Rid>, long, Dictionary, string, Variant)

Required.

Adds text span and font to draw it to the text buffer.

public virtual bool _ShapedTextAddString(Rid shaped, string text, Array<Rid> fonts, long size, Dictionary opentypeFeatures, string language, Variant meta)

Parameters

shaped Rid
text string
fonts Array<Rid>
size long
opentypeFeatures Dictionary
language string
meta Variant

Returns

bool

_ShapedTextClear(Rid)

Required.

Clears text buffer (removes text and inline objects).

public virtual void _ShapedTextClear(Rid shaped)

Parameters

shaped Rid

_ShapedTextClosestCharacterPos(Rid, long)

Optional.

Returns composite character position closest to the pos.

public virtual long _ShapedTextClosestCharacterPos(Rid shaped, long pos)

Parameters

shaped Rid
pos long

Returns

long

_ShapedTextDraw(Rid, Rid, Vector2, double, double, Color)

Optional.

Draw shaped text into a canvas item at a given position, with color. pos specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).

public virtual void _ShapedTextDraw(Rid shaped, Rid canvas, Vector2 pos, double clipL, double clipR, Color color)

Parameters

shaped Rid
canvas Rid
pos Vector2
clipL double
clipR double
color Color

_ShapedTextDrawOutline(Rid, Rid, Vector2, double, double, long, Color)

Optional.

Draw the outline of the shaped text into a canvas item at a given position, with color. pos specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).

public virtual void _ShapedTextDrawOutline(Rid shaped, Rid canvas, Vector2 pos, double clipL, double clipR, long outlineSize, Color color)

Parameters

shaped Rid
canvas Rid
pos Vector2
clipL double
clipR double
outlineSize long
color Color

_ShapedTextFitToWidth(Rid, double, JustificationFlag)

Optional.

Adjusts text width to fit to specified width, returns new text width.

public virtual double _ShapedTextFitToWidth(Rid shaped, double width, TextServer.JustificationFlag justificationFlags)

Parameters

shaped Rid
width double
justificationFlags TextServer.JustificationFlag

Returns

double

_ShapedTextGetAscent(Rid)

Required.

Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).

public virtual double _ShapedTextGetAscent(Rid shaped)

Parameters

shaped Rid

Returns

double

_ShapedTextGetCharacterBreaks(Rid)

Optional.

Returns array of the composite character boundaries.

public virtual int[] _ShapedTextGetCharacterBreaks(Rid shaped)

Parameters

shaped Rid

Returns

int[]

_ShapedTextGetCustomEllipsis(Rid)

Optional.

Returns ellipsis character used for text clipping.

public virtual long _ShapedTextGetCustomEllipsis(Rid shaped)

Parameters

shaped Rid

Returns

long

_ShapedTextGetCustomPunctuation(Rid)

Optional.

Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

public virtual string _ShapedTextGetCustomPunctuation(Rid shaped)

Parameters

shaped Rid

Returns

string

_ShapedTextGetDescent(Rid)

Required.

Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).

public virtual double _ShapedTextGetDescent(Rid shaped)

Parameters

shaped Rid

Returns

double

_ShapedTextGetDirection(Rid)

Optional.

Returns direction of the text.

public virtual TextServer.Direction _ShapedTextGetDirection(Rid shaped)

Parameters

shaped Rid

Returns

TextServer.Direction

_ShapedTextGetDominantDirectionInRange(Rid, long, long)

Optional.

Returns dominant direction of in the range of text.

public virtual long _ShapedTextGetDominantDirectionInRange(Rid shaped, long start, long end)

Parameters

shaped Rid
start long
end long

Returns

long

_ShapedTextGetEllipsisGlyphCount(Rid)

Required.

Returns number of glyphs in the ellipsis.

public virtual long _ShapedTextGetEllipsisGlyphCount(Rid shaped)

Parameters

shaped Rid

Returns

long

_ShapedTextGetEllipsisPos(Rid)

Required.

Returns position of the ellipsis.

public virtual long _ShapedTextGetEllipsisPos(Rid shaped)

Parameters

shaped Rid

Returns

long

_ShapedTextGetGlyphCount(Rid)

Required.

Returns number of glyphs in the buffer.

public virtual long _ShapedTextGetGlyphCount(Rid shaped)

Parameters

shaped Rid

Returns

long

_ShapedTextGetGraphemeBounds(Rid, long)

Optional.

Returns composite character's bounds as offsets from the start of the line.

public virtual Vector2 _ShapedTextGetGraphemeBounds(Rid shaped, long pos)

Parameters

shaped Rid
pos long

Returns

Vector2

_ShapedTextGetInferredDirection(Rid)

Optional.

Returns direction of the text, inferred by the BiDi algorithm.

public virtual TextServer.Direction _ShapedTextGetInferredDirection(Rid shaped)

Parameters

shaped Rid

Returns

TextServer.Direction

_ShapedTextGetLineBreaks(Rid, double, long, LineBreakFlag)

Optional.

Breaks text to the lines and returns character ranges for each line.

public virtual int[] _ShapedTextGetLineBreaks(Rid shaped, double width, long start, TextServer.LineBreakFlag breakFlags)

Parameters

shaped Rid
width double
start long
breakFlags TextServer.LineBreakFlag

Returns

int[]

_ShapedTextGetLineBreaksAdv(Rid, float[], long, bool, LineBreakFlag)

Optional.

Breaks text to the lines and columns. Returns character ranges for each segment.

public virtual int[] _ShapedTextGetLineBreaksAdv(Rid shaped, float[] width, long start, bool once, TextServer.LineBreakFlag breakFlags)

Parameters

shaped Rid
width float[]
start long
once bool
breakFlags TextServer.LineBreakFlag

Returns

int[]

_ShapedTextGetObjectGlyph(Rid, Variant)

Required.

Returns the glyph index of the inline object.

public virtual long _ShapedTextGetObjectGlyph(Rid shaped, Variant key)

Parameters

shaped Rid
key Variant

Returns

long

_ShapedTextGetObjectRange(Rid, Variant)

Required.

Returns the character range of the inline object.

public virtual Vector2I _ShapedTextGetObjectRange(Rid shaped, Variant key)

Parameters

shaped Rid
key Variant

Returns

Vector2I

_ShapedTextGetObjectRect(Rid, Variant)

Required.

Returns bounding rectangle of the inline object.

public virtual Rect2 _ShapedTextGetObjectRect(Rid shaped, Variant key)

Parameters

shaped Rid
key Variant

Returns

Rect2

_ShapedTextGetObjects(Rid)

Required.

Returns array of inline objects.

public virtual Array _ShapedTextGetObjects(Rid shaped)

Parameters

shaped Rid

Returns

Array

_ShapedTextGetOrientation(Rid)

Optional.

Returns text orientation.

public virtual TextServer.Orientation _ShapedTextGetOrientation(Rid shaped)

Parameters

shaped Rid

Returns

TextServer.Orientation

_ShapedTextGetParent(Rid)

Required.

Returns the parent buffer from which the substring originates.

public virtual Rid _ShapedTextGetParent(Rid shaped)

Parameters

shaped Rid

Returns

Rid

_ShapedTextGetPreserveControl(Rid)

Optional.

Returns true if text buffer is configured to display control characters.

public virtual bool _ShapedTextGetPreserveControl(Rid shaped)

Parameters

shaped Rid

Returns

bool

_ShapedTextGetPreserveInvalid(Rid)

Optional.

Returns true if text buffer is configured to display hexadecimal codes in place of invalid characters.

public virtual bool _ShapedTextGetPreserveInvalid(Rid shaped)

Parameters

shaped Rid

Returns

bool

_ShapedTextGetRange(Rid)

Required.

Returns substring buffer character range in the parent buffer.

public virtual Vector2I _ShapedTextGetRange(Rid shaped)

Parameters

shaped Rid

Returns

Vector2I

_ShapedTextGetSelection(Rid, long, long)

Optional.

Returns selection rectangles for the specified character range.

public virtual Vector2[] _ShapedTextGetSelection(Rid shaped, long start, long end)

Parameters

shaped Rid
start long
end long

Returns

Vector2[]

_ShapedTextGetSize(Rid)

Required.

Returns size of the text.

public virtual Vector2 _ShapedTextGetSize(Rid shaped)

Parameters

shaped Rid

Returns

Vector2

_ShapedTextGetSpacing(Rid, SpacingType)

Optional.

Returns extra spacing added between glyphs or lines in pixels.

public virtual long _ShapedTextGetSpacing(Rid shaped, TextServer.SpacingType spacing)

Parameters

shaped Rid
spacing TextServer.SpacingType

Returns

long

_ShapedTextGetTrimPos(Rid)

Required.

Returns the position of the overrun trim.

public virtual long _ShapedTextGetTrimPos(Rid shaped)

Parameters

shaped Rid

Returns

long

_ShapedTextGetUnderlinePosition(Rid)

Required.

Returns pixel offset of the underline below the baseline.

public virtual double _ShapedTextGetUnderlinePosition(Rid shaped)

Parameters

shaped Rid

Returns

double

_ShapedTextGetUnderlineThickness(Rid)

Required.

Returns thickness of the underline.

public virtual double _ShapedTextGetUnderlineThickness(Rid shaped)

Parameters

shaped Rid

Returns

double

_ShapedTextGetWidth(Rid)

Required.

Returns width (for horizontal layout) or height (for vertical) of the text.

public virtual double _ShapedTextGetWidth(Rid shaped)

Parameters

shaped Rid

Returns

double

_ShapedTextGetWordBreaks(Rid, GraphemeFlag, GraphemeFlag)

Optional.

Breaks text into words and returns array of character ranges. Use graphemeFlags to set what characters are used for breaking (see TextServer.GraphemeFlag).

public virtual int[] _ShapedTextGetWordBreaks(Rid shaped, TextServer.GraphemeFlag graphemeFlags, TextServer.GraphemeFlag skipGraphemeFlags)

Parameters

shaped Rid
graphemeFlags TextServer.GraphemeFlag
skipGraphemeFlags TextServer.GraphemeFlag

Returns

int[]

_ShapedTextHitTestGrapheme(Rid, double)

Optional.

Returns grapheme index at the specified pixel offset at the baseline, or -1 if none is found.

public virtual long _ShapedTextHitTestGrapheme(Rid shaped, double coord)

Parameters

shaped Rid
coord double

Returns

long

_ShapedTextHitTestPosition(Rid, double)

Optional.

Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.

public virtual long _ShapedTextHitTestPosition(Rid shaped, double coord)

Parameters

shaped Rid
coord double

Returns

long

_ShapedTextIsReady(Rid)

Required.

Returns true if buffer is successfully shaped.

public virtual bool _ShapedTextIsReady(Rid shaped)

Parameters

shaped Rid

Returns

bool

_ShapedTextNextCharacterPos(Rid, long)

Optional.

Returns composite character end position closest to the pos.

public virtual long _ShapedTextNextCharacterPos(Rid shaped, long pos)

Parameters

shaped Rid
pos long

Returns

long

_ShapedTextNextGraphemePos(Rid, long)

Optional.

Returns grapheme end position closest to the pos.

public virtual long _ShapedTextNextGraphemePos(Rid shaped, long pos)

Parameters

shaped Rid
pos long

Returns

long

_ShapedTextOverrunTrimToWidth(Rid, double, TextOverrunFlag)

Optional.

Trims text if it exceeds the given width.

public virtual void _ShapedTextOverrunTrimToWidth(Rid shaped, double width, TextServer.TextOverrunFlag trimFlags)

Parameters

shaped Rid
width double
trimFlags TextServer.TextOverrunFlag

_ShapedTextPrevCharacterPos(Rid, long)

Optional.

Returns composite character start position closest to the pos.

public virtual long _ShapedTextPrevCharacterPos(Rid shaped, long pos)

Parameters

shaped Rid
pos long

Returns

long

_ShapedTextPrevGraphemePos(Rid, long)

Optional.

Returns grapheme start position closest to the pos.

public virtual long _ShapedTextPrevGraphemePos(Rid shaped, long pos)

Parameters

shaped Rid
pos long

Returns

long

_ShapedTextResizeObject(Rid, Variant, Vector2, InlineAlignment, double)

Required.

Sets new size and alignment of embedded object.

public virtual bool _ShapedTextResizeObject(Rid shaped, Variant key, Vector2 size, InlineAlignment inlineAlign, double baseline)

Parameters

shaped Rid
key Variant
size Vector2
inlineAlign InlineAlignment
baseline double

Returns

bool

_ShapedTextSetBidiOverride(Rid, Array)

Optional.

Overrides BiDi for the structured text.

public virtual void _ShapedTextSetBidiOverride(Rid shaped, Array @override)

Parameters

shaped Rid
override Array

_ShapedTextSetCustomEllipsis(Rid, long)

Optional.

Sets ellipsis character used for text clipping.

public virtual void _ShapedTextSetCustomEllipsis(Rid shaped, long @char)

Parameters

shaped Rid
char long

_ShapedTextSetCustomPunctuation(Rid, string)

Optional.

Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

public virtual void _ShapedTextSetCustomPunctuation(Rid shaped, string punct)

Parameters

shaped Rid
punct string

_ShapedTextSetDirection(Rid, Direction)

Optional.

Sets desired text direction. If set to Auto, direction will be detected based on the buffer contents and current locale.

public virtual void _ShapedTextSetDirection(Rid shaped, TextServer.Direction direction)

Parameters

shaped Rid
direction TextServer.Direction

_ShapedTextSetOrientation(Rid, Orientation)

Optional.

Sets desired text orientation.

public virtual void _ShapedTextSetOrientation(Rid shaped, TextServer.Orientation orientation)

Parameters

shaped Rid
orientation TextServer.Orientation

_ShapedTextSetPreserveControl(Rid, bool)

Optional.

If set to true text buffer will display control characters.

public virtual void _ShapedTextSetPreserveControl(Rid shaped, bool enabled)

Parameters

shaped Rid
enabled bool

_ShapedTextSetPreserveInvalid(Rid, bool)

Optional.

If set to true text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.

public virtual void _ShapedTextSetPreserveInvalid(Rid shaped, bool enabled)

Parameters

shaped Rid
enabled bool

_ShapedTextSetSpacing(Rid, SpacingType, long)

Optional.

Sets extra spacing added between glyphs or lines in pixels.

public virtual void _ShapedTextSetSpacing(Rid shaped, TextServer.SpacingType spacing, long value)

Parameters

shaped Rid
spacing TextServer.SpacingType
value long

_ShapedTextShape(Rid)

Required.

Shapes buffer if it's not shaped. Returns true if the string is shaped successfully.

public virtual bool _ShapedTextShape(Rid shaped)

Parameters

shaped Rid

Returns

bool

_ShapedTextSubstr(Rid, long, long)

Required.

Returns text buffer for the substring of the text in the shaped text buffer (including inline objects).

public virtual Rid _ShapedTextSubstr(Rid shaped, long start, long length)

Parameters

shaped Rid
start long
length long

Returns

Rid

_ShapedTextTabAlign(Rid, float[])

Optional.

Aligns shaped text to the given tab-stops.

public virtual double _ShapedTextTabAlign(Rid shaped, float[] tabStops)

Parameters

shaped Rid
tabStops float[]

Returns

double

_ShapedTextUpdateBreaks(Rid)

Optional.

Updates break points in the shaped text. This method is called by default implementation of text breaking functions.

public virtual bool _ShapedTextUpdateBreaks(Rid shaped)

Parameters

shaped Rid

Returns

bool

_ShapedTextUpdateJustificationOps(Rid)

Optional.

Updates justification points in the shaped text. This method is called by default implementation of text justification functions.

public virtual bool _ShapedTextUpdateJustificationOps(Rid shaped)

Parameters

shaped Rid

Returns

bool

_SpoofCheck(string)

Optional.

Returns true if string is likely to be an attempt at confusing the reader.

public virtual bool _SpoofCheck(string @string)

Parameters

string string

Returns

bool

_StringGetCharacterBreaks(string, string)

Optional.

Returns array of the composite character boundaries.

public virtual int[] _StringGetCharacterBreaks(string @string, string language)

Parameters

string string
language string

Returns

int[]

_StringGetWordBreaks(string, string, long)

Optional.

Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even.

public virtual int[] _StringGetWordBreaks(string @string, string language, long charsPerLine)

Parameters

string string
language string
charsPerLine long

Returns

int[]

_StringToLower(string, string)

Optional.

Returns the string converted to lowercase.

public virtual string _StringToLower(string @string, string language)

Parameters

string string
language string

Returns

string

_StringToTitle(string, string)

Optional.

Returns the string converted to title case.

public virtual string _StringToTitle(string @string, string language)

Parameters

string string
language string

Returns

string

_StringToUpper(string, string)

Optional.

Returns the string converted to uppercase.

public virtual string _StringToUpper(string @string, string language)

Parameters

string string
language string

Returns

string

_StripDiacritics(string)

Optional.

Strips diacritics from the string.

public virtual string _StripDiacritics(string @string)

Parameters

string string

Returns

string

_TagToName(long)

Optional.

Converts OpenType tag to readable feature, variation, script, or language name.

public virtual string _TagToName(long tag)

Parameters

tag long

Returns

string