TextServerExtension
Base class for custom TextServer implementations (plugins).
Base class for custom TextServer implementations (plugins).
External TextServer implementations should inherit from this class.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
TextServerExtensionConstructor
public TextServerExtension();Methods245
_Cleanupvoid
public virtual void _Cleanup();This method is called before text server is unregistered.
_CreateFontRid
public virtual Rid _CreateFont();Creates a new, empty font cache entry resource.
Rid_CreateFontLinkedVariationRid
public virtual Rid _CreateFontLinkedVariation(Rid fontRid);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.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Rid_CreateShapedTextRid
public virtual Rid _CreateShapedText(TextServer.Direction direction, TextServer.Orientation orientation);Creates a new buffer for complex text layout, with the given direction and orientation.
| Name | Type | Default |
|---|---|---|
direction | TextServer.Direction | — |
orientation | TextServer.Orientation | — |
Rid_DrawHexCodeBoxvoid
public virtual void _DrawHexCodeBox(Rid canvas, long size, Vector2 pos, long index, Color color);Draws box displaying character hexadecimal code.
| Name | Type | Default |
|---|---|---|
canvas | Rid | — |
size | long | — |
pos | Vector2 | — |
index | long | — |
color | Color | — |
_FontClearGlyphsvoid
public virtual void _FontClearGlyphs(Rid fontRid, Vector2I size);Removes all rendered glyph information from the cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
_FontClearKerningMapvoid
public virtual void _FontClearKerningMap(Rid fontRid, long size);Removes all kerning overrides.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
_FontClearSizeCachevoid
public virtual void _FontClearSizeCache(Rid fontRid);Removes all font sizes from the cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
_FontClearSystemFallbackCachevoid
public virtual void _FontClearSystemFallbackCache();Frees all automatically loaded system fonts.
_FontClearTexturesvoid
public virtual void _FontClearTextures(Rid fontRid, Vector2I size);Removes all textures from font cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
_FontDrawGlyphvoid
public virtual void _FontDrawGlyph(Rid fontRid, Rid canvas, long size, Vector2 pos, long index, Color color, float oversampling);Draws single glyph into a canvas item at the position, using font_rid at the size size. If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
canvas | Rid | — |
size | long | — |
pos | Vector2 | — |
index | long | — |
color | Color | — |
oversampling | float | — |
_FontDrawGlyphOutlinevoid
public virtual void _FontDrawGlyphOutline(Rid fontRid, Rid canvas, long size, long outlineSize, Vector2 pos, long index, Color color, float oversampling);Draws single glyph outline of size outline_size into a canvas item at the position, using font_rid at the size size. If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
canvas | Rid | — |
size | long | — |
outlineSize | long | — |
pos | Vector2 | — |
index | long | — |
color | Color | — |
oversampling | float | — |
_FontGetAntialiasingTextServer.FontAntialiasing
public virtual TextServer.FontAntialiasing _FontGetAntialiasing(Rid fontRid);Returns font anti-aliasing mode.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
TextServer.FontAntialiasing_FontGetAscentdouble
public virtual double _FontGetAscent(Rid fontRid, long size);Returns the font ascent (number of pixels above the baseline).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
double_FontGetBaselineOffsetdouble
public virtual double _FontGetBaselineOffset(Rid fontRid);Returns extra baseline offset (as a fraction of font height).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
double_FontGetCharFromGlyphIndexlong
public virtual long _FontGetCharFromGlyphIndex(Rid fontRid, long size, long glyphIndex);Returns character code associated with glyph_index, or 0 if glyph_index is invalid.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
glyphIndex | long | — |
long_FontGetDescentdouble
public virtual double _FontGetDescent(Rid fontRid, long size);Returns the font descent (number of pixels below the baseline).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
double_FontGetDisableEmbeddedBitmapsbool
public virtual bool _FontGetDisableEmbeddedBitmaps(Rid fontRid);Returns whether the font's embedded bitmap loading is disabled.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontGetEmboldendouble
public virtual double _FontGetEmbolden(Rid fontRid);Returns font embolden strength.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
double_FontGetFaceCountlong
public virtual long _FontGetFaceCount(Rid fontRid);Returns number of faces in the TrueType / OpenType collection.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetFaceIndexlong
public virtual long _FontGetFaceIndex(Rid fontRid);Returns an active face index in the TrueType / OpenType collection.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetFixedSizelong
public virtual long _FontGetFixedSize(Rid fontRid);Returns bitmap font fixed size.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetFixedSizeScaleModeTextServer.FixedSizeScaleMode
public virtual TextServer.FixedSizeScaleMode _FontGetFixedSizeScaleMode(Rid fontRid);Returns bitmap font scaling mode.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
TextServer.FixedSizeScaleMode_FontGetGenerateMipmapsbool
public virtual bool _FontGetGenerateMipmaps(Rid fontRid);Returns true if font texture mipmap generation is enabled.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontGetGlobalOversamplingdouble
public virtual double _FontGetGlobalOversampling();Returns the font oversampling factor, shared by all fonts in the TextServer.
double_FontGetGlyphAdvanceVector2
public virtual Vector2 _FontGetGlyphAdvance(Rid fontRid, long size, long glyph);Returns glyph advance (offset of the next glyph).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
glyph | long | — |
Vector2_FontGetGlyphContoursReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _FontGetGlyphContours(Rid fontRid, long size, long index);Returns outline contours of the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
index | long | — |
Reckfell.Collections.Dictionary_FontGetGlyphIndexlong
public virtual long _FontGetGlyphIndex(Rid fontRid, long size, long @char, long variationSelector);Returns the glyph index of a char, optionally modified by the variation_selector.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
char | long | — |
variationSelector | long | — |
long_FontGetGlyphListint[]
public virtual int[] _FontGetGlyphList(Rid fontRid, Vector2I size);Returns list of rendered glyphs in the cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
int[]_FontGetGlyphOffsetVector2
public virtual Vector2 _FontGetGlyphOffset(Rid fontRid, Vector2I size, long glyph);Returns glyph offset from the baseline.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
Vector2_FontGetGlyphSizeVector2
public virtual Vector2 _FontGetGlyphSize(Rid fontRid, Vector2I size, long glyph);Returns size of the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
Vector2_FontGetGlyphTextureIdxlong
public virtual long _FontGetGlyphTextureIdx(Rid fontRid, Vector2I size, long glyph);Returns index of the cache texture containing the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
long_FontGetGlyphTextureRidRid
public virtual Rid _FontGetGlyphTextureRid(Rid fontRid, Vector2I size, long glyph);Returns resource ID of the cache texture containing the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
Rid_FontGetGlyphTextureSizeVector2
public virtual Vector2 _FontGetGlyphTextureSize(Rid fontRid, Vector2I size, long glyph);Returns size of the cache texture containing the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
Vector2_FontGetGlyphUVRectRect2
public virtual Rect2 _FontGetGlyphUVRect(Rid fontRid, Vector2I size, long glyph);Returns rectangle in the cache texture containing the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
Rect2_FontGetHintingTextServer.Hinting
public virtual TextServer.Hinting _FontGetHinting(Rid fontRid);Returns the font hinting mode. Used by dynamic fonts only.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
TextServer.Hinting_FontGetKeepRoundingRemaindersbool
public virtual bool _FontGetKeepRoundingRemainders(Rid fontRid);Returns glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontGetKerningVector2
public virtual Vector2 _FontGetKerning(Rid fontRid, long size, Vector2I glyphPair);Returns kerning for the pair of glyphs.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
glyphPair | Vector2I | — |
Vector2_FontGetKerningListReckfell.Collections.Array<Vector2I>
public virtual Reckfell.Collections.Array<Vector2I> _FontGetKerningList(Rid fontRid, long size);Returns list of the kerning overrides.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
Reckfell.Collections.Array<Vector2I>_FontGetLanguageSupportOverridebool
public virtual bool _FontGetLanguageSupportOverride(Rid fontRid, string language);Returns true if support override is enabled for the language.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
language | string | — |
bool_FontGetLanguageSupportOverridesstring[]
public virtual string[] _FontGetLanguageSupportOverrides(Rid fontRid);Returns list of language support overrides.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
string[]_FontGetMsdfPixelRangelong
public virtual long _FontGetMsdfPixelRange(Rid fontRid);Returns the width of the range around the shape between the minimum and maximum representable signed distance.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetMsdfSizelong
public virtual long _FontGetMsdfSize(Rid fontRid);Returns source font size used to generate MSDF textures.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetNamestring
public virtual string _FontGetName(Rid fontRid);Returns font family name.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
string_FontGetOpentypeFeatureOverridesReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _FontGetOpentypeFeatureOverrides(Rid fontRid);Returns font OpenType feature set override.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Dictionary_FontGetOtNameStringsReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _FontGetOtNameStrings(Rid fontRid);Returns Reckfell.Collections.Dictionary with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Dictionary_FontGetOversamplingdouble
public virtual double _FontGetOversampling(Rid fontRid);Returns oversampling factor override. If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See Viewport.Oversampling. This value doesn't override the [code skip-lint]oversampling parameter of [code skip-lint]draw_* methods. Used by dynamic fonts only.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
double_FontGetPaletteColorsColor[]
public virtual Color[] _FontGetPaletteColors(Rid fontRid, long index);Returns the array in the predefined color palette at index. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using TextServerExtension._FontSetPaletteCustomColors.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
index | long | — |
Color[]_FontGetPaletteCountlong
public virtual long _FontGetPaletteCount(Rid fontRid);Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetPaletteCustomColorsColor[]
public virtual Color[] _FontGetPaletteCustomColors(Rid fontRid);Returns array of custom colors to override predefined palette.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Color[]_FontGetPaletteNamestring
public virtual string _FontGetPaletteName(Rid fontRid, long index);Returns the name of the predefined color palette at index. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
index | long | — |
string_FontGetScaledouble
public virtual double _FontGetScale(Rid fontRid, long size);Returns scaling factor of the color bitmap font.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
double_FontGetScriptSupportOverridebool
public virtual bool _FontGetScriptSupportOverride(Rid fontRid, string script);Returns true if support override is enabled for the script.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
script | string | — |
bool_FontGetScriptSupportOverridesstring[]
public virtual string[] _FontGetScriptSupportOverrides(Rid fontRid);Returns list of script support overrides.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
string[]_FontGetSizeCacheInfoReckfell.Collections.Array<Reckfell.Collections.Dictionary>
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _FontGetSizeCacheInfo(Rid fontRid);Returns font cache information, each entry contains the following fields: Vector2i size_px - font size in pixels, float viewport_oversampling - viewport oversampling factor, int glyphs - number of rendered glyphs, int textures - number of used textures, int textures_size - size of texture data in bytes.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Array<Reckfell.Collections.Dictionary>_FontGetSizeCacheListReckfell.Collections.Array<Vector2I>
public virtual Reckfell.Collections.Array<Vector2I> _FontGetSizeCacheList(Rid fontRid);Returns list of the font sizes in the cache. Each size is Vector2I with font size and outline size.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Array<Vector2I>_FontGetSpacinglong
public virtual long _FontGetSpacing(Rid fontRid, TextServer.SpacingType spacing);Returns the spacing for spacing in pixels (not relative to the font size).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
spacing | TextServer.SpacingType | — |
long_FontGetStretchlong
public virtual long _FontGetStretch(Rid fontRid);Returns font stretch amount, compared to a normal width. A percentage value between 50% and 200%.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetStyleTextServer.FontStyle
public virtual TextServer.FontStyle _FontGetStyle(Rid fontRid);Returns font style flags.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
TextServer.FontStyle_FontGetStyleNamestring
public virtual string _FontGetStyleName(Rid fontRid);Returns font style name.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
string_FontGetSubpixelPositioningTextServer.SubpixelPositioning
public virtual TextServer.SubpixelPositioning _FontGetSubpixelPositioning(Rid fontRid);Returns font subpixel glyph positioning mode.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
TextServer.SubpixelPositioning_FontGetSupportedCharsstring
public virtual string _FontGetSupportedChars(Rid fontRid);Returns a string containing all the characters available in the font.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
string_FontGetSupportedGlyphsint[]
public virtual int[] _FontGetSupportedGlyphs(Rid fontRid);Returns an array containing all glyph indices in the font.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
int[]_FontGetTextureCountlong
public virtual long _FontGetTextureCount(Rid fontRid, Vector2I size);Returns number of textures used by font cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
long_FontGetTextureImageImage
public virtual Image _FontGetTextureImage(Rid fontRid, Vector2I size, long textureIndex);Returns font cache texture image data.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
textureIndex | long | — |
Image_FontGetTextureOffsetsint[]
public virtual int[] _FontGetTextureOffsets(Rid fontRid, Vector2I size, long textureIndex);Returns array containing glyph packing data.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
textureIndex | long | — |
int[]_FontGetTransformTransform2D
public virtual Transform2D _FontGetTransform(Rid fontRid);Returns 2D transform applied to the font outlines.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Transform2D_FontGetUnderlinePositiondouble
public virtual double _FontGetUnderlinePosition(Rid fontRid, long size);Returns pixel offset of the underline below the baseline.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
double_FontGetUnderlineThicknessdouble
public virtual double _FontGetUnderlineThickness(Rid fontRid, long size);Returns thickness of the underline in pixels.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
double_FontGetUsedPalettelong
public virtual long _FontGetUsedPalette(Rid fontRid);Returns used palette index.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontGetVariationCoordinatesReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _FontGetVariationCoordinates(Rid fontRid);Returns variation coordinates for the specified font cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Dictionary_FontGetWeightlong
public virtual long _FontGetWeight(Rid fontRid);Returns weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
long_FontHasCharbool
public virtual bool _FontHasChar(Rid fontRid, long @char);Returns true if a Unicode char is available in the font.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
char | long | — |
bool_FontIsAllowSystemFallbackbool
public virtual bool _FontIsAllowSystemFallback(Rid fontRid);Returns true if system fonts can be automatically used as fallbacks.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontIsForceAutohinterbool
public virtual bool _FontIsForceAutohinter(Rid fontRid);Returns true if auto-hinting is supported and preferred over font built-in hinting.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontIsLanguageSupportedbool
public virtual bool _FontIsLanguageSupported(Rid fontRid, string language);Returns true if the font supports the given language (as a ISO 639 code).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
language | string | — |
bool_FontIsModulateColorGlyphsbool
public virtual bool _FontIsModulateColorGlyphs(Rid fontRid);Returns true if color modulation is applied when drawing the font's colored glyphs.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontIsMultichannelSignedDistanceFieldbool
public virtual bool _FontIsMultichannelSignedDistanceField(Rid fontRid);Returns true if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
bool_FontIsScriptSupportedbool
public virtual bool _FontIsScriptSupported(Rid fontRid, string script);Returns true if the font supports the given script (as a ISO 15924 code).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
script | string | — |
bool_FontRemoveGlyphvoid
public virtual void _FontRemoveGlyph(Rid fontRid, Vector2I size, long glyph);Removes specified rendered glyph information from the cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
_FontRemoveKerningvoid
public virtual void _FontRemoveKerning(Rid fontRid, long size, Vector2I glyphPair);Removes kerning override for the pair of glyphs.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
glyphPair | Vector2I | — |
_FontRemoveLanguageSupportOverridevoid
public virtual void _FontRemoveLanguageSupportOverride(Rid fontRid, string language);Remove language support override.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
language | string | — |
_FontRemoveScriptSupportOverridevoid
public virtual void _FontRemoveScriptSupportOverride(Rid fontRid, string script);Removes script support override.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
script | string | — |
_FontRemoveSizeCachevoid
public virtual void _FontRemoveSizeCache(Rid fontRid, Vector2I size);Removes specified font size from the cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
_FontRemoveTexturevoid
public virtual void _FontRemoveTexture(Rid fontRid, Vector2I size, long textureIndex);Removes specified texture from the cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
textureIndex | long | — |
_FontRenderGlyphvoid
public virtual void _FontRenderGlyph(Rid fontRid, Vector2I size, long index);Renders specified glyph to the font cache texture.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
index | long | — |
_FontRenderRangevoid
public virtual void _FontRenderRange(Rid fontRid, Vector2I size, long start, long end);Renders the range of characters to the font cache texture.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
start | long | — |
end | long | — |
_FontSetAllowSystemFallbackvoid
public virtual void _FontSetAllowSystemFallback(Rid fontRid, bool allowSystemFallback);If set to true, system fonts can be automatically used as fallbacks.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
allowSystemFallback | bool | — |
_FontSetAntialiasingvoid
public virtual void _FontSetAntialiasing(Rid fontRid, TextServer.FontAntialiasing antialiasing);Sets font anti-aliasing mode.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
antialiasing | TextServer.FontAntialiasing | — |
_FontSetAscentvoid
public virtual void _FontSetAscent(Rid fontRid, long size, double ascent);Sets the font ascent (number of pixels above the baseline).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
ascent | double | — |
_FontSetBaselineOffsetvoid
public virtual void _FontSetBaselineOffset(Rid fontRid, double baselineOffset);Sets extra baseline offset (as a fraction of font height).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
baselineOffset | double | — |
_FontSetDatavoid
public virtual void _FontSetData(Rid fontRid, byte[] data);Sets font source data, e.g contents of the dynamic font source file.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
data | byte[] | — |
_FontSetDescentvoid
public virtual void _FontSetDescent(Rid fontRid, long size, double descent);Sets the font descent (number of pixels below the baseline).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
descent | double | — |
_FontSetDisableEmbeddedBitmapsvoid
public virtual void _FontSetDisableEmbeddedBitmaps(Rid fontRid, bool disableEmbeddedBitmaps);If set to true, embedded font bitmap loading is disabled.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
disableEmbeddedBitmaps | bool | — |
_FontSetEmboldenvoid
public virtual void _FontSetEmbolden(Rid fontRid, double strength);Sets font embolden strength. If strength is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
strength | double | — |
_FontSetFaceIndexvoid
public virtual void _FontSetFaceIndex(Rid fontRid, long faceIndex);Sets an active face index in the TrueType / OpenType collection.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
faceIndex | long | — |
_FontSetFixedSizevoid
public virtual void _FontSetFixedSize(Rid fontRid, long fixedSize);Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
fixedSize | long | — |
_FontSetFixedSizeScaleModevoid
public virtual void _FontSetFixedSizeScaleMode(Rid fontRid, TextServer.FixedSizeScaleMode fixedSizeScaleMode);Sets bitmap font scaling mode. This property is used only if fixed_size is greater than zero.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
fixedSizeScaleMode | TextServer.FixedSizeScaleMode | — |
_FontSetForceAutohintervoid
public virtual void _FontSetForceAutohinter(Rid fontRid, bool forceAutohinter);If set to true auto-hinting is preferred over font built-in hinting.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
forceAutohinter | bool | — |
_FontSetGenerateMipmapsvoid
public virtual void _FontSetGenerateMipmaps(Rid fontRid, bool generateMipmaps);If set to true font texture mipmap generation is enabled.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
generateMipmaps | bool | — |
_FontSetGlobalOversamplingvoid
public virtual void _FontSetGlobalOversampling(double oversampling);Sets oversampling factor, shared by all font in the TextServer.
| Name | Type | Default |
|---|---|---|
oversampling | double | — |
_FontSetGlyphAdvancevoid
public virtual void _FontSetGlyphAdvance(Rid fontRid, long size, long glyph, Vector2 advance);Sets glyph advance (offset of the next glyph).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
glyph | long | — |
advance | Vector2 | — |
_FontSetGlyphOffsetvoid
public virtual void _FontSetGlyphOffset(Rid fontRid, Vector2I size, long glyph, Vector2 offset);Sets glyph offset from the baseline.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
offset | Vector2 | — |
_FontSetGlyphSizevoid
public virtual void _FontSetGlyphSize(Rid fontRid, Vector2I size, long glyph, Vector2 glSize);Sets size of the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
glSize | Vector2 | — |
_FontSetGlyphTextureIdxvoid
public virtual void _FontSetGlyphTextureIdx(Rid fontRid, Vector2I size, long glyph, long textureIdx);Sets index of the cache texture containing the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
textureIdx | long | — |
_FontSetGlyphUVRectvoid
public virtual void _FontSetGlyphUVRect(Rid fontRid, Vector2I size, long glyph, Rect2 uVRect);Sets rectangle in the cache texture containing the glyph.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
glyph | long | — |
uVRect | Rect2 | — |
_FontSetHintingvoid
public virtual void _FontSetHinting(Rid fontRid, TextServer.Hinting hinting);Sets font hinting mode. Used by dynamic fonts only.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
hinting | TextServer.Hinting | — |
_FontSetKeepRoundingRemaindersvoid
public virtual void _FontSetKeepRoundingRemainders(Rid fontRid, bool keepRoundingRemainders);Sets glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
keepRoundingRemainders | bool | — |
_FontSetKerningvoid
public virtual void _FontSetKerning(Rid fontRid, long size, Vector2I glyphPair, Vector2 kerning);Sets kerning for the pair of glyphs.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
glyphPair | Vector2I | — |
kerning | Vector2 | — |
_FontSetLanguageSupportOverridevoid
public virtual void _FontSetLanguageSupportOverride(Rid fontRid, string language, bool supported);Adds override for TextServerExtension._FontIsLanguageSupported.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
language | string | — |
supported | bool | — |
_FontSetModulateColorGlyphsvoid
public virtual void _FontSetModulateColorGlyphs(Rid fontRid, bool modulate);If set to true, color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
modulate | bool | — |
_FontSetMsdfPixelRangevoid
public virtual void _FontSetMsdfPixelRange(Rid fontRid, long msdfPixelRange);Sets the width of the range around the shape between the minimum and maximum representable signed distance.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
msdfPixelRange | long | — |
_FontSetMsdfSizevoid
public virtual void _FontSetMsdfSize(Rid fontRid, long msdfSize);Sets source font size used to generate MSDF textures.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
msdfSize | long | — |
_FontSetMultichannelSignedDistanceFieldvoid
public virtual void _FontSetMultichannelSignedDistanceField(Rid fontRid, bool msdf);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.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
msdf | bool | — |
_FontSetNamevoid
public virtual void _FontSetName(Rid fontRid, string name);Sets the font family name.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
name | string | — |
_FontSetOpentypeFeatureOverridesvoid
public virtual void _FontSetOpentypeFeatureOverrides(Rid fontRid, Reckfell.Collections.Dictionary overrides);Sets font OpenType feature set override.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
overrides | Reckfell.Collections.Dictionary | — |
_FontSetOversamplingvoid
public virtual void _FontSetOversampling(Rid fontRid, double oversampling);If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See Viewport.Oversampling. This value doesn't override the [code skip-lint]oversampling parameter of [code skip-lint]draw_* methods. Used by dynamic fonts only.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
oversampling | double | — |
_FontSetPaletteCustomColorsvoid
public virtual void _FontSetPaletteCustomColors(Rid fontRid, Color[] colors);Sets array of custom colors to override predefined palette. Set to empty array to reset overrides. Use Color(0, 0, 0, 0), to keep predefined palette color at specific position.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
colors | Color[] | — |
_FontSetScalevoid
public virtual void _FontSetScale(Rid fontRid, long size, double scale);Sets scaling factor of the color bitmap font.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
scale | double | — |
_FontSetScriptSupportOverridevoid
public virtual void _FontSetScriptSupportOverride(Rid fontRid, string script, bool supported);Adds override for TextServerExtension._FontIsScriptSupported.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
script | string | — |
supported | bool | — |
_FontSetSpacingvoid
public virtual void _FontSetSpacing(Rid fontRid, TextServer.SpacingType spacing, long value);Sets the spacing for spacing to value in pixels (not relative to the font size).
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
spacing | TextServer.SpacingType | — |
value | long | — |
_FontSetStretchvoid
public virtual void _FontSetStretch(Rid fontRid, long stretch);Sets font stretch amount, compared to a normal width. A percentage value between 50% and 200%.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
stretch | long | — |
_FontSetStylevoid
public virtual void _FontSetStyle(Rid fontRid, TextServer.FontStyle style);Sets the font style flags.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
style | TextServer.FontStyle | — |
_FontSetStyleNamevoid
public virtual void _FontSetStyleName(Rid fontRid, string nameStyle);Sets the font style name.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
nameStyle | string | — |
_FontSetSubpixelPositioningvoid
public virtual void _FontSetSubpixelPositioning(Rid fontRid, TextServer.SubpixelPositioning subpixelPositioning);Sets font subpixel glyph positioning mode.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
subpixelPositioning | TextServer.SubpixelPositioning | — |
_FontSetTextureImagevoid
public virtual void _FontSetTextureImage(Rid fontRid, Vector2I size, long textureIndex, Image image);Sets font cache texture image data.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
textureIndex | long | — |
image | Image | — |
_FontSetTextureOffsetsvoid
public virtual void _FontSetTextureOffsets(Rid fontRid, Vector2I size, long textureIndex, int[] offset);Sets array containing glyph packing data.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | Vector2I | — |
textureIndex | long | — |
offset | int[] | — |
_FontSetTransformvoid
public virtual void _FontSetTransform(Rid fontRid, Transform2D transform);Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
transform | Transform2D | — |
_FontSetUnderlinePositionvoid
public virtual void _FontSetUnderlinePosition(Rid fontRid, long size, double underlinePosition);Sets pixel offset of the underline below the baseline.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
underlinePosition | double | — |
_FontSetUnderlineThicknessvoid
public virtual void _FontSetUnderlineThickness(Rid fontRid, long size, double underlineThickness);Sets thickness of the underline in pixels.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
size | long | — |
underlineThickness | double | — |
_FontSetUsedPalettevoid
public virtual void _FontSetUsedPalette(Rid fontRid, long index);Sets used palette index.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
index | long | — |
_FontSetVariationCoordinatesvoid
public virtual void _FontSetVariationCoordinates(Rid fontRid, Reckfell.Collections.Dictionary variationCoordinates);Sets variation coordinates for the specified font cache entry.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
variationCoordinates | Reckfell.Collections.Dictionary | — |
_FontSetWeightvoid
public virtual void _FontSetWeight(Rid fontRid, long weight);Sets weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
weight | long | — |
_FontSupportedFeatureListReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _FontSupportedFeatureList(Rid fontRid);Returns the dictionary of the supported OpenType features.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Dictionary_FontSupportedVariationListReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _FontSupportedVariationList(Rid fontRid);Returns the dictionary of the supported OpenType variation coordinates.
| Name | Type | Default |
|---|---|---|
fontRid | Rid | — |
Reckfell.Collections.Dictionary_FormatNumberstring · Deprecated
public virtual string _FormatNumber(string number, string language);Converts a number from Western Arabic (0..9) to the numeral system used in the given language.
If language is an empty string, the active locale will be used.
| Name | Type | Default |
|---|---|---|
number | string | — |
language | string | — |
string_FreeRidvoid
public virtual void _FreeRid(Rid rid);Frees an object created by this TextServer.
| Name | Type | Default |
|---|---|---|
rid | Rid | — |
_GetFeatureslong
public virtual long _GetFeatures();Returns text server features, see TextServer.Feature.
long_GetHexCodeBoxSizeVector2
public virtual Vector2 _GetHexCodeBoxSize(long size, long index);Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
| Name | Type | Default |
|---|---|---|
size | long | — |
index | long | — |
Vector2_GetNamestring
public virtual string _GetName();Returns the name of the server interface.
string_GetShortNamestring
public virtual string _GetShortName();Returns the short name of the server interface. By convention, this should return a lowercase string that follows the snake_case naming scheme.
string_GetSupportDatabyte[]
public virtual byte[] _GetSupportData();Returns default TextServer database (e.g. ICU break iterators and dictionaries).
byte[]_GetSupportDataFileNamestring
public virtual string _GetSupportDataFileName();Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
string_GetSupportDataInfostring
public virtual string _GetSupportDataInfo();Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
string_Hasbool
public virtual bool _Has(Rid rid);Returns true if rid is valid resource owned by this text server.
| Name | Type | Default |
|---|---|---|
rid | Rid | — |
bool_HasFeaturebool
public virtual bool _HasFeature(TextServer.Feature feature);Returns true if the server supports a feature.
| Name | Type | Default |
|---|---|---|
feature | TextServer.Feature | — |
bool_IsConfusablelong
public virtual long _IsConfusable(string @string, string[] dict);Returns index of the first string in dict which is visually confusable with the string, or -1 if none is found.
| Name | Type | Default |
|---|---|---|
string | string | — |
dict | string[] | — |
long_IsLocaleRightToLeftbool
public virtual bool _IsLocaleRightToLeft(string locale);Returns true if locale is right-to-left.
| Name | Type | Default |
|---|---|---|
locale | string | — |
bool_IsLocaleUsingSupportDatabool
public virtual bool _IsLocaleUsingSupportData(string locale);Returns true if the locale requires text server support data for line/word breaking.
| Name | Type | Default |
|---|---|---|
locale | string | — |
bool_IsValidIdentifierbool
public virtual bool _IsValidIdentifier(string @string);Returns true if string is a valid identifier.
| Name | Type | Default |
|---|---|---|
string | string | — |
bool_IsValidLetterbool
public virtual bool _IsValidLetter(ulong unicode);| Name | Type | Default |
|---|---|---|
unicode | ulong | — |
bool_LoadSupportDatabool
public virtual bool _LoadSupportData(string fileName);Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
| Name | Type | Default |
|---|---|---|
fileName | string | — |
bool_NameToTaglong
public virtual long _NameToTag(string name);Converts the given readable name of a feature, variation, script, or language to an OpenType tag.
| Name | Type | Default |
|---|---|---|
name | string | — |
long_ParseNumberstring · Deprecated
public virtual string _ParseNumber(string number, string language);Converts number from the numeral system used in the given language to Western Arabic (0..9).
If language is an empty string, the active locale will be used.
| Name | Type | Default |
|---|---|---|
number | string | — |
language | string | — |
string_ParseStructuredTextReckfell.Collections.Array<Vector3I>
public virtual Reckfell.Collections.Array<Vector3I> _ParseStructuredText(TextServer.StructuredTextParser parserType, Reckfell.Collections.Array args, string text);Default implementation of the BiDi algorithm override function.
| Name | Type | Default |
|---|---|---|
parserType | TextServer.StructuredTextParser | — |
args | Reckfell.Collections.Array | — |
text | string | — |
Reckfell.Collections.Array<Vector3I>_PercentSignstring · Deprecated
public virtual string _PercentSign(string language);Returns percent sign used in the given language.
| Name | Type | Default |
|---|---|---|
language | string | — |
string_ReferenceOversamplingLevelvoid
public virtual void _ReferenceOversamplingLevel(double oversampling);Increases the reference count of the specified oversampling level. This method is called by Viewport, and should not be used directly.
| Name | Type | Default |
|---|---|---|
oversampling | double | — |
_SaveSupportDatabool
public virtual bool _SaveSupportData(string fileName);Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
| Name | Type | Default |
|---|---|---|
fileName | string | — |
bool_ShapedGetRunCountlong
public virtual long _ShapedGetRunCount(Rid shaped);Returns the number of uniform text runs in the buffer.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedGetRunDirectionTextServer.Direction
public virtual TextServer.Direction _ShapedGetRunDirection(Rid shaped, long index);Returns the direction of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
TextServer.Direction_ShapedGetRunFontRidRid
public virtual Rid _ShapedGetRunFontRid(Rid shaped, long index);Returns the font RID of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Rid_ShapedGetRunFontSizeint
public virtual int _ShapedGetRunFontSize(Rid shaped, long index);Returns the font size of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
int_ShapedGetRunGlyphRangeVector2I
public virtual Vector2I _ShapedGetRunGlyphRange(Rid shaped, long index);Returns the glyph range of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Vector2I_ShapedGetRunLanguagestring
public virtual string _ShapedGetRunLanguage(Rid shaped, long index);Returns the language of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
string_ShapedGetRunObjectVariant
public virtual Variant _ShapedGetRunObject(Rid shaped, long index);Returns the embedded object of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Variant_ShapedGetRunRangeVector2I
public virtual Vector2I _ShapedGetRunRange(Rid shaped, long index);Returns the source text range of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Vector2I_ShapedGetRunTextstring
public virtual string _ShapedGetRunText(Rid shaped, long index);Returns the source text of the index text run (in visual order).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
string_ShapedGetSpanCountlong
public virtual long _ShapedGetSpanCount(Rid shaped);Returns number of text spans added using TextServerExtension._ShapedTextAddString or TextServerExtension._ShapedTextAddObject.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedGetSpanEmbeddedObjectVariant
public virtual Variant _ShapedGetSpanEmbeddedObject(Rid shaped, long index);Returns text embedded object key.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Variant_ShapedGetSpanMetaVariant
public virtual Variant _ShapedGetSpanMeta(Rid shaped, long index);Returns text span metadata.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Variant_ShapedGetSpanObjectVariant
public virtual Variant _ShapedGetSpanObject(Rid shaped, long index);Returns the text span embedded object key.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
Variant_ShapedGetSpanTextstring
public virtual string _ShapedGetSpanText(Rid shaped, long index);Returns the text span source text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
string_ShapedGetTextstring
public virtual string _ShapedGetText(Rid shaped);Returns the text buffer source text, including object replacement characters.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
string_ShapedSetSpanUpdateFontvoid
public virtual void _ShapedSetSpanUpdateFont(Rid shaped, long index, Reckfell.Collections.Array<Rid> fonts, long size, Reckfell.Collections.Dictionary opentypeFeatures);Changes text span font, font size, and OpenType features, without changing the text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
index | long | — |
fonts | Reckfell.Collections.Array<Rid> | — |
size | long | — |
opentypeFeatures | Reckfell.Collections.Dictionary | — |
_ShapedTextAddObjectbool
public virtual bool _ShapedTextAddObject(Rid shaped, Variant key, Vector2 size, InlineAlignment inlineAlign, long length, double baseline);Adds inline object to the text buffer, key must be unique. In the text, object is represented as length object replacement characters.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
key | Variant | — |
size | Vector2 | — |
inlineAlign | InlineAlignment | — |
length | long | — |
baseline | double | — |
bool_ShapedTextAddStringbool
public virtual bool _ShapedTextAddString(Rid shaped, string text, Reckfell.Collections.Array<Rid> fonts, long size, Reckfell.Collections.Dictionary opentypeFeatures, string language, Variant meta);Adds text span and font to draw it to the text buffer.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
text | string | — |
fonts | Reckfell.Collections.Array<Rid> | — |
size | long | — |
opentypeFeatures | Reckfell.Collections.Dictionary | — |
language | string | — |
meta | Variant | — |
bool_ShapedTextClearvoid
public virtual void _ShapedTextClear(Rid shaped);Clears text buffer (removes text and inline objects).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
_ShapedTextClosestCharacterPoslong
public virtual long _ShapedTextClosestCharacterPos(Rid shaped, long pos);Returns composite character position closest to the pos.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
pos | long | — |
long_ShapedTextDrawvoid
public virtual void _ShapedTextDraw(Rid shaped, Rid canvas, Vector2 pos, double clipL, double clipR, Color color, float oversampling);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). If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
canvas | Rid | — |
pos | Vector2 | — |
clipL | double | — |
clipR | double | — |
color | Color | — |
oversampling | float | — |
_ShapedTextDrawOutlinevoid
public virtual void _ShapedTextDrawOutline(Rid shaped, Rid canvas, Vector2 pos, double clipL, double clipR, long outlineSize, Color color, float oversampling);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). If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
canvas | Rid | — |
pos | Vector2 | — |
clipL | double | — |
clipR | double | — |
outlineSize | long | — |
color | Color | — |
oversampling | float | — |
_ShapedTextDuplicateRid
public virtual Rid _ShapedTextDuplicate(Rid shaped);Duplicates shaped text buffer.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
Rid_ShapedTextFitToWidthdouble
public virtual double _ShapedTextFitToWidth(Rid shaped, double width, TextServer.JustificationFlag justificationFlags);Adjusts text width to fit to specified width, returns new text width.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
width | double | — |
justificationFlags | TextServer.JustificationFlag | — |
double_ShapedTextGetAscentdouble
public virtual double _ShapedTextGetAscent(Rid shaped);Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
double_ShapedTextGetCharacterBreaksint[]
public virtual int[] _ShapedTextGetCharacterBreaks(Rid shaped);Returns array of the composite character boundaries.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
int[]_ShapedTextGetCustomEllipsislong
public virtual long _ShapedTextGetCustomEllipsis(Rid shaped);Returns ellipsis character used for text clipping.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedTextGetCustomPunctuationstring
public virtual string _ShapedTextGetCustomPunctuation(Rid shaped);Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
string_ShapedTextGetDescentdouble
public virtual double _ShapedTextGetDescent(Rid shaped);Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
double_ShapedTextGetDirectionTextServer.Direction
public virtual TextServer.Direction _ShapedTextGetDirection(Rid shaped);Returns direction of the text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
TextServer.Direction_ShapedTextGetDominantDirectionInRangelong
public virtual long _ShapedTextGetDominantDirectionInRange(Rid shaped, long start, long end);Returns dominant direction of in the range of text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
start | long | — |
end | long | — |
long_ShapedTextGetEllipsisGlyphCountlong
public virtual long _ShapedTextGetEllipsisGlyphCount(Rid shaped);Returns number of glyphs in the ellipsis.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedTextGetEllipsisPoslong
public virtual long _ShapedTextGetEllipsisPos(Rid shaped);Returns position of the ellipsis.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedTextGetGlyphCountlong
public virtual long _ShapedTextGetGlyphCount(Rid shaped);Returns number of glyphs in the buffer.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedTextGetGraphemeBoundsVector2
public virtual Vector2 _ShapedTextGetGraphemeBounds(Rid shaped, long pos);Returns composite character's bounds as offsets from the start of the line.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
pos | long | — |
Vector2_ShapedTextGetInferredDirectionTextServer.Direction
public virtual TextServer.Direction _ShapedTextGetInferredDirection(Rid shaped);Returns direction of the text, inferred by the BiDi algorithm.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
TextServer.Direction_ShapedTextGetLineBreaksint[]
public virtual int[] _ShapedTextGetLineBreaks(Rid shaped, double width, long start, TextServer.LineBreakFlag breakFlags);Breaks text to the lines and returns character ranges for each line.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
width | double | — |
start | long | — |
breakFlags | TextServer.LineBreakFlag | — |
int[]_ShapedTextGetLineBreaksAdvint[]
public virtual int[] _ShapedTextGetLineBreaksAdv(Rid shaped, float[] width, long start, bool once, TextServer.LineBreakFlag breakFlags);Breaks text to the lines and columns. Returns character ranges for each segment.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
width | float[] | — |
start | long | — |
once | bool | — |
breakFlags | TextServer.LineBreakFlag | — |
int[]_ShapedTextGetObjectGlyphlong
public virtual long _ShapedTextGetObjectGlyph(Rid shaped, Variant key);Returns the glyph index of the inline object.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
key | Variant | — |
long_ShapedTextGetObjectRangeVector2I
public virtual Vector2I _ShapedTextGetObjectRange(Rid shaped, Variant key);Returns the character range of the inline object.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
key | Variant | — |
Vector2I_ShapedTextGetObjectRectRect2
public virtual Rect2 _ShapedTextGetObjectRect(Rid shaped, Variant key);Returns bounding rectangle of the inline object.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
key | Variant | — |
Rect2_ShapedTextGetObjectsReckfell.Collections.Array
public virtual Reckfell.Collections.Array _ShapedTextGetObjects(Rid shaped);Returns array of inline objects.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
Reckfell.Collections.Array_ShapedTextGetOrientationTextServer.Orientation
public virtual TextServer.Orientation _ShapedTextGetOrientation(Rid shaped);Returns text orientation.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
TextServer.Orientation_ShapedTextGetParentRid
public virtual Rid _ShapedTextGetParent(Rid shaped);Returns the parent buffer from which the substring originates.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
Rid_ShapedTextGetPreserveControlbool
public virtual bool _ShapedTextGetPreserveControl(Rid shaped);Returns true if text buffer is configured to display control characters.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
bool_ShapedTextGetPreserveInvalidbool
public virtual bool _ShapedTextGetPreserveInvalid(Rid shaped);Returns true if text buffer is configured to display hexadecimal codes in place of invalid characters.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
bool_ShapedTextGetRangeVector2I
public virtual Vector2I _ShapedTextGetRange(Rid shaped);Returns substring buffer character range in the parent buffer.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
Vector2I_ShapedTextGetSelectionVector2[]
public virtual Vector2[] _ShapedTextGetSelection(Rid shaped, long start, long end);Returns selection rectangles for the specified character range.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
start | long | — |
end | long | — |
Vector2[]_ShapedTextGetSizeVector2
public virtual Vector2 _ShapedTextGetSize(Rid shaped);Returns size of the text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
Vector2_ShapedTextGetSpacinglong
public virtual long _ShapedTextGetSpacing(Rid shaped, TextServer.SpacingType spacing);Returns extra spacing added between glyphs or lines in pixels.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
spacing | TextServer.SpacingType | — |
long_ShapedTextGetTrimPoslong
public virtual long _ShapedTextGetTrimPos(Rid shaped);Returns the position of the overrun trim.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
long_ShapedTextGetUnderlinePositiondouble
public virtual double _ShapedTextGetUnderlinePosition(Rid shaped);Returns pixel offset of the underline below the baseline.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
double_ShapedTextGetUnderlineThicknessdouble
public virtual double _ShapedTextGetUnderlineThickness(Rid shaped);Returns thickness of the underline.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
double_ShapedTextGetWidthdouble
public virtual double _ShapedTextGetWidth(Rid shaped);Returns width (for horizontal layout) or height (for vertical) of the text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
double_ShapedTextGetWordBreaksint[]
public virtual int[] _ShapedTextGetWordBreaks(Rid shaped, TextServer.GraphemeFlag graphemeFlags, TextServer.GraphemeFlag skipGraphemeFlags);Breaks text into words and returns array of character ranges. Use grapheme_flags to set what characters are used for breaking.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
graphemeFlags | TextServer.GraphemeFlag | — |
skipGraphemeFlags | TextServer.GraphemeFlag | — |
int[]_ShapedTextHasObjectbool
public virtual bool _ShapedTextHasObject(Rid shaped, Variant key);Returns true if an object with key is embedded in this shaped text buffer.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
key | Variant | — |
bool_ShapedTextHitTestGraphemelong
public virtual long _ShapedTextHitTestGrapheme(Rid shaped, double coord);Returns grapheme index at the specified pixel offset at the baseline, or -1 if none is found.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
coord | double | — |
long_ShapedTextHitTestPositionlong
public virtual long _ShapedTextHitTestPosition(Rid shaped, double coord);Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
coord | double | — |
long_ShapedTextIsReadybool
public virtual bool _ShapedTextIsReady(Rid shaped);Returns true if buffer is successfully shaped.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
bool_ShapedTextNextCharacterPoslong
public virtual long _ShapedTextNextCharacterPos(Rid shaped, long pos);Returns composite character end position closest to the pos.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
pos | long | — |
long_ShapedTextNextGraphemePoslong
public virtual long _ShapedTextNextGraphemePos(Rid shaped, long pos);Returns grapheme end position closest to the pos.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
pos | long | — |
long_ShapedTextOverrunTrimToWidthvoid
public virtual void _ShapedTextOverrunTrimToWidth(Rid shaped, double width, TextServer.TextOverrunFlag trimFlags);Trims text if it exceeds the given width.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
width | double | — |
trimFlags | TextServer.TextOverrunFlag | — |
_ShapedTextPrevCharacterPoslong
public virtual long _ShapedTextPrevCharacterPos(Rid shaped, long pos);Returns composite character start position closest to the pos.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
pos | long | — |
long_ShapedTextPrevGraphemePoslong
public virtual long _ShapedTextPrevGraphemePos(Rid shaped, long pos);Returns grapheme start position closest to the pos.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
pos | long | — |
long_ShapedTextResizeObjectbool
public virtual bool _ShapedTextResizeObject(Rid shaped, Variant key, Vector2 size, InlineAlignment inlineAlign, double baseline);Sets new size and alignment of embedded object.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
key | Variant | — |
size | Vector2 | — |
inlineAlign | InlineAlignment | — |
baseline | double | — |
bool_ShapedTextSetBidiOverridevoid
public virtual void _ShapedTextSetBidiOverride(Rid shaped, Reckfell.Collections.Array @override);Overrides BiDi for the structured text.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
override | Reckfell.Collections.Array | — |
_ShapedTextSetCustomEllipsisvoid
public virtual void _ShapedTextSetCustomEllipsis(Rid shaped, long @char);Sets ellipsis character used for text clipping.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
char | long | — |
_ShapedTextSetCustomPunctuationvoid
public virtual void _ShapedTextSetCustomPunctuation(Rid shaped, string punct);Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
punct | string | — |
_ShapedTextSetDirectionvoid
public virtual void _ShapedTextSetDirection(Rid shaped, TextServer.Direction direction);Sets desired text direction. If set to TextServer.Direction.Auto, direction will be detected based on the buffer contents and current locale.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
direction | TextServer.Direction | — |
_ShapedTextSetOrientationvoid
public virtual void _ShapedTextSetOrientation(Rid shaped, TextServer.Orientation orientation);Sets desired text orientation.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
orientation | TextServer.Orientation | — |
_ShapedTextSetPreserveControlvoid
public virtual void _ShapedTextSetPreserveControl(Rid shaped, bool enabled);If set to true text buffer will display control characters.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
enabled | bool | — |
_ShapedTextSetPreserveInvalidvoid
public virtual void _ShapedTextSetPreserveInvalid(Rid shaped, bool enabled);If set to true text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
enabled | bool | — |
_ShapedTextSetSpacingvoid
public virtual void _ShapedTextSetSpacing(Rid shaped, TextServer.SpacingType spacing, long value);Sets extra spacing added between glyphs or lines in pixels.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
spacing | TextServer.SpacingType | — |
value | long | — |
_ShapedTextShapebool
public virtual bool _ShapedTextShape(Rid shaped);Shapes buffer if it's not shaped. Returns true if the string is shaped successfully.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
bool_ShapedTextSubstrRid
public virtual Rid _ShapedTextSubstr(Rid shaped, long start, long length);Returns text buffer for the substring of the text in the shaped text buffer (including inline objects).
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
start | long | — |
length | long | — |
Rid_ShapedTextTabAligndouble
public virtual double _ShapedTextTabAlign(Rid shaped, float[] tabStops);Aligns shaped text to the given tab-stops.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
tabStops | float[] | — |
double_ShapedTextUpdateBreaksbool
public virtual bool _ShapedTextUpdateBreaks(Rid shaped);Updates break points in the shaped text. This method is called by default implementation of text breaking functions.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
bool_ShapedTextUpdateJustificationOpsbool
public virtual bool _ShapedTextUpdateJustificationOps(Rid shaped);Updates justification points in the shaped text. This method is called by default implementation of text justification functions.
| Name | Type | Default |
|---|---|---|
shaped | Rid | — |
bool_SpoofCheckbool
public virtual bool _SpoofCheck(string @string);Returns true if string is likely to be an attempt at confusing the reader.
| Name | Type | Default |
|---|---|---|
string | string | — |
bool_StringGetCharacterBreaksint[]
public virtual int[] _StringGetCharacterBreaks(string @string, string language);Returns array of the composite character boundaries.
| Name | Type | Default |
|---|---|---|
string | string | — |
language | string | — |
int[]_StringGetWordBreaksint[]
public virtual int[] _StringGetWordBreaks(string @string, string language, long charsPerLine);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.
| Name | Type | Default |
|---|---|---|
string | string | — |
language | string | — |
charsPerLine | long | — |
int[]_StringToLowerstring
public virtual string _StringToLower(string @string, string language);Returns the string converted to lowercase.
| Name | Type | Default |
|---|---|---|
string | string | — |
language | string | — |
string_StringToTitlestring
public virtual string _StringToTitle(string @string, string language);Returns the string converted to Title Case.
| Name | Type | Default |
|---|---|---|
string | string | — |
language | string | — |
string_StringToUpperstring
public virtual string _StringToUpper(string @string, string language);Returns the string converted to UPPERCASE.
| Name | Type | Default |
|---|---|---|
string | string | — |
language | string | — |
string_StripDiacriticsstring
public virtual string _StripDiacritics(string @string);Strips diacritics from the string.
| Name | Type | Default |
|---|---|---|
string | string | — |
string_TagToNamestring
public virtual string _TagToName(long tag);Converts the given OpenType tag to the readable name of a feature, variation, script, or language.
| Name | Type | Default |
|---|---|---|
tag | long | — |
string_UnreferenceOversamplingLevelvoid
public virtual void _UnreferenceOversamplingLevel(double oversampling);Decreases the reference count of the specified oversampling level, and frees the font cache for oversampling level when the reference count reaches zero. This method is called by Viewport, and should not be used directly.
| Name | Type | Default |
|---|---|---|
oversampling | double | — |