Documentation ¶
Overview ¶
Package TextServerExtension provides methods for working with TextServerExtension object instances.
Index ¶
- type Advanced
- type Any
- type CaretInfo
- type Glyph
- type Implementation
- type InlineAlignment
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsTextServer() TextServer.Instance
- func (self Instance) AsTextServerExtension() Instance
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type InlineAlignment ¶
type InlineAlignment int
const ( /*Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/ InlineAlignmentTopTo InlineAlignment = 0 /*Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/ InlineAlignmentCenterTo InlineAlignment = 1 /*Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/ InlineAlignmentBaselineTo InlineAlignment = 3 /*Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/ InlineAlignmentBottomTo InlineAlignment = 2 /*Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text.*/ InlineAlignmentToTop InlineAlignment = 0 /*Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text.*/ InlineAlignmentToCenter InlineAlignment = 4 /*Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text.*/ InlineAlignmentToBaseline InlineAlignment = 8 /*Aligns inline object (e.g. image, table) to the bottom of the text.*/ InlineAlignmentToBottom InlineAlignment = 12 /*Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code].*/ InlineAlignmentTop InlineAlignment = 0 /*Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code].*/ InlineAlignmentCenter InlineAlignment = 5 /*Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code].*/ InlineAlignmentBottom InlineAlignment = 14 /*A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants.*/ InlineAlignmentImageMask InlineAlignment = 3 /*A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants.*/ InlineAlignmentTextMask InlineAlignment = 12 )
type Instance ¶
type Instance [1]gdclass.TextServerExtension
External [TextServer] implementations should inherit from this class.
See [Interface] for methods that can be overridden by a [Class] that extends it.
%!(EXTRA string=TextServerExtension)
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsTextServer ¶
func (self Instance) AsTextServer() TextServer.Instance
func (Instance) AsTextServerExtension ¶
func (*Instance) UnsafePointer ¶
type Interface ¶
type Interface interface { //[b]Required.[/b] //Returns [code]true[/code] if the server supports a feature. HasFeature(feature gdclass.TextServerFeature) bool //[b]Required.[/b] //Returns the name of the server interface. GetName() string //[b]Required.[/b] //Returns text server features, see [enum TextServer.Feature]. GetFeatures() int //[b]Required.[/b] //Frees an object created by this [TextServer]. FreeRid(rid RID.Any) //[b]Required.[/b] //Returns [code]true[/code] if [param rid] is valid resource owned by this text server. Has(rid RID.Any) bool //[b]Optional.[/b] //Loads optional TextServer database (e.g. ICU break iterators and dictionaries). LoadSupportData(filename string) bool //[b]Optional.[/b] //Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename. GetSupportDataFilename() string //[b]Optional.[/b] //Returns TextServer database (e.g. ICU break iterators and dictionaries) description. GetSupportDataInfo() string //[b]Optional.[/b] //Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. SaveSupportData(filename string) bool //[b]Required.[/b] //Returns [code]true[/code] if locale is right-to-left. IsLocaleRightToLeft(locale string) bool //[b]Optional.[/b] //Converts readable feature, variation, script, or language name to OpenType tag. NameToTag(name string) int //[b]Optional.[/b] //Converts OpenType tag to readable feature, variation, script, or language name. TagToName(tag int) string //[b]Required.[/b] //Creates a new, empty font cache entry resource. CreateFont() RID.Any //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. CreateFontLinkedVariation(font_rid RID.Any) RID.Any //[b]Optional.[/b] //Sets font source data, e.g contents of the dynamic font source file. FontSetData(font_rid RID.Any, data []byte) //[b]Optional.[/b] //Sets pointer to the font source data, e.g contents of the dynamic font source file. FontSetDataPtr(font_rid RID.Any, data_ptr unsafe.Pointer, data_size int) //[b]Optional.[/b] //Sets an active face index in the TrueType / OpenType collection. FontSetFaceIndex(font_rid RID.Any, face_index int) //[b]Optional.[/b] //Returns an active face index in the TrueType / OpenType collection. FontGetFaceIndex(font_rid RID.Any) int //[b]Optional.[/b] //Returns number of faces in the TrueType / OpenType collection. FontGetFaceCount(font_rid RID.Any) int //[b]Optional.[/b] //Sets the font style flags, see [enum TextServer.FontStyle]. FontSetStyle(font_rid RID.Any, style gdclass.TextServerFontStyle) //[b]Optional.[/b] //Returns font style flags, see [enum TextServer.FontStyle]. FontGetStyle(font_rid RID.Any) gdclass.TextServerFontStyle //[b]Optional.[/b] //Sets the font family name. FontSetName(font_rid RID.Any, name string) //[b]Optional.[/b] //Returns font family name. FontGetName(font_rid RID.Any) string //[b]Optional.[/b] //Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). FontGetOtNameStrings(font_rid RID.Any) map[any]any //[b]Optional.[/b] //Sets the font style name. FontSetStyleName(font_rid RID.Any, name_style string) //[b]Optional.[/b] //Returns font style name. FontGetStyleName(font_rid RID.Any) string //[b]Optional.[/b] //Sets weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code]. FontSetWeight(font_rid RID.Any, weight int) //[b]Optional.[/b] //Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code]. FontGetWeight(font_rid RID.Any) int //[b]Optional.[/b] //Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code]. FontSetStretch(font_rid RID.Any, stretch int) //[b]Optional.[/b] //Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code]. FontGetStretch(font_rid RID.Any) int //[b]Optional.[/b] //Sets font anti-aliasing mode. FontSetAntialiasing(font_rid RID.Any, antialiasing gdclass.TextServerFontAntialiasing) //[b]Optional.[/b] //Returns font anti-aliasing mode. FontGetAntialiasing(font_rid RID.Any) gdclass.TextServerFontAntialiasing //[b]Optional.[/b] //If set to [code]true[/code], embedded font bitmap loading is disabled. FontSetDisableEmbeddedBitmaps(font_rid RID.Any, disable_embedded_bitmaps bool) //[b]Optional.[/b] //Returns whether the font's embedded bitmap loading is disabled. FontGetDisableEmbeddedBitmaps(font_rid RID.Any) bool //[b]Optional.[/b] //If set to [code]true[/code] font texture mipmap generation is enabled. FontSetGenerateMipmaps(font_rid RID.Any, generate_mipmaps bool) //[b]Optional.[/b] //Returns [code]true[/code] if font texture mipmap generation is enabled. FontGetGenerateMipmaps(font_rid RID.Any) bool //[b]Optional.[/b] //If set to [code]true[/code], 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. FontSetMultichannelSignedDistanceField(font_rid RID.Any, msdf bool) //[b]Optional.[/b] //Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. FontIsMultichannelSignedDistanceField(font_rid RID.Any) bool //[b]Optional.[/b] //Sets the width of the range around the shape between the minimum and maximum representable signed distance. FontSetMsdfPixelRange(font_rid RID.Any, msdf_pixel_range int) //[b]Optional.[/b] //Returns the width of the range around the shape between the minimum and maximum representable signed distance. FontGetMsdfPixelRange(font_rid RID.Any) int //[b]Optional.[/b] //Sets source font size used to generate MSDF textures. FontSetMsdfSize(font_rid RID.Any, msdf_size int) //[b]Optional.[/b] //Returns source font size used to generate MSDF textures. FontGetMsdfSize(font_rid RID.Any) int //[b]Required.[/b] //Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. FontSetFixedSize(font_rid RID.Any, fixed_size int) //[b]Required.[/b] //Returns bitmap font fixed size. FontGetFixedSize(font_rid RID.Any) int //[b]Required.[/b] //Sets bitmap font scaling mode. This property is used only if [code]fixed_size[/code] is greater than zero. FontSetFixedSizeScaleMode(font_rid RID.Any, fixed_size_scale_mode gdclass.TextServerFixedSizeScaleMode) //[b]Required.[/b] //Returns bitmap font scaling mode. FontGetFixedSizeScaleMode(font_rid RID.Any) gdclass.TextServerFixedSizeScaleMode //[b]Optional.[/b] //If set to [code]true[/code], system fonts can be automatically used as fallbacks. FontSetAllowSystemFallback(font_rid RID.Any, allow_system_fallback bool) //[b]Optional.[/b] //Returns [code]true[/code] if system fonts can be automatically used as fallbacks. FontIsAllowSystemFallback(font_rid RID.Any) bool //[b]Optional.[/b] //If set to [code]true[/code] auto-hinting is preferred over font built-in hinting. FontSetForceAutohinter(font_rid RID.Any, force_autohinter bool) //[b]Optional.[/b] //Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. FontIsForceAutohinter(font_rid RID.Any) bool //[b]Optional.[/b] //Sets font hinting mode. Used by dynamic fonts only. FontSetHinting(font_rid RID.Any, hinting gdclass.TextServerHinting) //[b]Optional.[/b] //Returns the font hinting mode. Used by dynamic fonts only. FontGetHinting(font_rid RID.Any) gdclass.TextServerHinting //[b]Optional.[/b] //Sets font subpixel glyph positioning mode. FontSetSubpixelPositioning(font_rid RID.Any, subpixel_positioning gdclass.TextServerSubpixelPositioning) //[b]Optional.[/b] //Returns font subpixel glyph positioning mode. FontGetSubpixelPositioning(font_rid RID.Any) gdclass.TextServerSubpixelPositioning //Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. FontSetEmbolden(font_rid RID.Any, strength Float.X) //[b]Optional.[/b] //Returns font embolden strength. FontGetEmbolden(font_rid RID.Any) Float.X //[b]Optional.[/b] //Sets the spacing for [param spacing] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size). FontSetSpacing(font_rid RID.Any, spacing gdclass.TextServerSpacingType, value int) //[b]Optional.[/b] //Returns the spacing for [param spacing] (see [enum TextServer.SpacingType]) in pixels (not relative to the font size). FontGetSpacing(font_rid RID.Any, spacing gdclass.TextServerSpacingType) int //[b]Optional.[/b] //Sets extra baseline offset (as a fraction of font height). FontSetBaselineOffset(font_rid RID.Any, baseline_offset Float.X) //[b]Optional.[/b] //Returns extra baseline offset (as a fraction of font height). FontGetBaselineOffset(font_rid RID.Any) Float.X //[b]Optional.[/b] //Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. FontSetTransform(font_rid RID.Any, transform Transform2D.OriginXY) //[b]Optional.[/b] //Returns 2D transform applied to the font outlines. FontGetTransform(font_rid RID.Any) Transform2D.OriginXY //[b]Optional.[/b] //Sets variation coordinates for the specified font cache entry. FontSetVariationCoordinates(font_rid RID.Any, variation_coordinates map[any]any) //[b]Optional.[/b] //Returns variation coordinates for the specified font cache entry. FontGetVariationCoordinates(font_rid RID.Any) map[any]any //[b]Optional.[/b] //Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. FontSetOversampling(font_rid RID.Any, oversampling Float.X) //[b]Optional.[/b] //Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. FontGetOversampling(font_rid RID.Any) Float.X //[b]Required.[/b] //Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size. FontGetSizeCacheList(font_rid RID.Any) []Vector2i.XY //[b]Required.[/b] //Removes all font sizes from the cache entry. FontClearSizeCache(font_rid RID.Any) //[b]Required.[/b] //Removes specified font size from the cache entry. FontRemoveSizeCache(font_rid RID.Any, size Vector2i.XY) //[b]Required.[/b] //Sets the font ascent (number of pixels above the baseline). FontSetAscent(font_rid RID.Any, size int, ascent Float.X) //[b]Required.[/b] //Returns the font ascent (number of pixels above the baseline). FontGetAscent(font_rid RID.Any, size int) Float.X //[b]Required.[/b] //Sets the font descent (number of pixels below the baseline). FontSetDescent(font_rid RID.Any, size int, descent Float.X) //[b]Required.[/b] //Returns the font descent (number of pixels below the baseline). FontGetDescent(font_rid RID.Any, size int) Float.X //[b]Required.[/b] //Sets pixel offset of the underline below the baseline. FontSetUnderlinePosition(font_rid RID.Any, size int, underline_position Float.X) //[b]Required.[/b] //Returns pixel offset of the underline below the baseline. FontGetUnderlinePosition(font_rid RID.Any, size int) Float.X //[b]Required.[/b] //Sets thickness of the underline in pixels. FontSetUnderlineThickness(font_rid RID.Any, size int, underline_thickness Float.X) //[b]Required.[/b] //Returns thickness of the underline in pixels. FontGetUnderlineThickness(font_rid RID.Any, size int) Float.X //[b]Required.[/b] //Sets scaling factor of the color bitmap font. FontSetScale(font_rid RID.Any, size int, scale Float.X) //[b]Required.[/b] //Returns scaling factor of the color bitmap font. FontGetScale(font_rid RID.Any, size int) Float.X //[b]Required.[/b] //Returns number of textures used by font cache entry. FontGetTextureCount(font_rid RID.Any, size Vector2i.XY) int //[b]Required.[/b] //Removes all textures from font cache entry. FontClearTextures(font_rid RID.Any, size Vector2i.XY) //[b]Required.[/b] //Removes specified texture from the cache entry. FontRemoveTexture(font_rid RID.Any, size Vector2i.XY, texture_index int) //[b]Required.[/b] //Sets font cache texture image data. FontSetTextureImage(font_rid RID.Any, size Vector2i.XY, texture_index int, image [1]gdclass.Image) //[b]Required.[/b] //Returns font cache texture image data. FontGetTextureImage(font_rid RID.Any, size Vector2i.XY, texture_index int) [1]gdclass.Image //[b]Optional.[/b] //Sets array containing glyph packing data. FontSetTextureOffsets(font_rid RID.Any, size Vector2i.XY, texture_index int, offset []int32) //[b]Optional.[/b] //Returns array containing glyph packing data. FontGetTextureOffsets(font_rid RID.Any, size Vector2i.XY, texture_index int) []int32 //[b]Required.[/b] //Returns list of rendered glyphs in the cache entry. FontGetGlyphList(font_rid RID.Any, size Vector2i.XY) []int32 //[b]Required.[/b] //Removes all rendered glyph information from the cache entry. FontClearGlyphs(font_rid RID.Any, size Vector2i.XY) //[b]Required.[/b] //Removes specified rendered glyph information from the cache entry. FontRemoveGlyph(font_rid RID.Any, size Vector2i.XY, glyph int) //[b]Required.[/b] //Returns glyph advance (offset of the next glyph). FontGetGlyphAdvance(font_rid RID.Any, size int, glyph int) Vector2.XY //[b]Required.[/b] //Sets glyph advance (offset of the next glyph). FontSetGlyphAdvance(font_rid RID.Any, size int, glyph int, advance Vector2.XY) //[b]Required.[/b] //Returns glyph offset from the baseline. FontGetGlyphOffset(font_rid RID.Any, size Vector2i.XY, glyph int) Vector2.XY //[b]Required.[/b] //Sets glyph offset from the baseline. FontSetGlyphOffset(font_rid RID.Any, size Vector2i.XY, glyph int, offset Vector2.XY) //[b]Required.[/b] //Returns size of the glyph. FontGetGlyphSize(font_rid RID.Any, size Vector2i.XY, glyph int) Vector2.XY //[b]Required.[/b] //Sets size of the glyph. FontSetGlyphSize(font_rid RID.Any, size Vector2i.XY, glyph int, gl_size Vector2.XY) //[b]Required.[/b] //Returns rectangle in the cache texture containing the glyph. FontGetGlyphUvRect(font_rid RID.Any, size Vector2i.XY, glyph int) Rect2.PositionSize //[b]Required.[/b] //Sets rectangle in the cache texture containing the glyph. FontSetGlyphUvRect(font_rid RID.Any, size Vector2i.XY, glyph int, uv_rect Rect2.PositionSize) //[b]Required.[/b] //Returns index of the cache texture containing the glyph. FontGetGlyphTextureIdx(font_rid RID.Any, size Vector2i.XY, glyph int) int //[b]Required.[/b] //Sets index of the cache texture containing the glyph. FontSetGlyphTextureIdx(font_rid RID.Any, size Vector2i.XY, glyph int, texture_idx int) //[b]Required.[/b] //Returns resource ID of the cache texture containing the glyph. FontGetGlyphTextureRid(font_rid RID.Any, size Vector2i.XY, glyph int) RID.Any //[b]Required.[/b] //Returns size of the cache texture containing the glyph. FontGetGlyphTextureSize(font_rid RID.Any, size Vector2i.XY, glyph int) Vector2.XY //[b]Optional.[/b] //Returns outline contours of the glyph. FontGetGlyphContours(font_rid RID.Any, size int, index int) map[any]any //[b]Optional.[/b] //Returns list of the kerning overrides. FontGetKerningList(font_rid RID.Any, size int) []Vector2i.XY //[b]Optional.[/b] //Removes all kerning overrides. FontClearKerningMap(font_rid RID.Any, size int) //[b]Optional.[/b] //Removes kerning override for the pair of glyphs. FontRemoveKerning(font_rid RID.Any, size int, glyph_pair Vector2i.XY) //[b]Optional.[/b] //Sets kerning for the pair of glyphs. FontSetKerning(font_rid RID.Any, size int, glyph_pair Vector2i.XY, kerning Vector2.XY) //[b]Optional.[/b] //Returns kerning for the pair of glyphs. FontGetKerning(font_rid RID.Any, size int, glyph_pair Vector2i.XY) Vector2.XY //[b]Required.[/b] //Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. FontGetGlyphIndex(font_rid RID.Any, size int, char int, variation_selector int) int //[b]Required.[/b] //Returns character code associated with [param glyph_index], or [code]0[/code] if [param glyph_index] is invalid. FontGetCharFromGlyphIndex(font_rid RID.Any, size int, glyph_index int) int //[b]Required.[/b] //Returns [code]true[/code] if a Unicode [param char] is available in the font. FontHasChar(font_rid RID.Any, char int) bool //[b]Required.[/b] //Returns a string containing all the characters available in the font. FontGetSupportedChars(font_rid RID.Any) string //[b]Optional.[/b] //Renders the range of characters to the font cache texture. FontRenderRange(font_rid RID.Any, size Vector2i.XY, start int, end int) //[b]Optional.[/b] //Renders specified glyph to the font cache texture. FontRenderGlyph(font_rid RID.Any, size Vector2i.XY, index int) //[b]Required.[/b] //Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size]. FontDrawGlyph(font_rid RID.Any, canvas RID.Any, size int, pos Vector2.XY, index int, color Color.RGBA) //[b]Required.[/b] //Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size]. FontDrawGlyphOutline(font_rid RID.Any, canvas RID.Any, size int, outline_size int, pos Vector2.XY, index int, color Color.RGBA) //[b]Optional.[/b] //Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). FontIsLanguageSupported(font_rid RID.Any, language string) bool //[b]Optional.[/b] //Adds override for [method _font_is_language_supported]. FontSetLanguageSupportOverride(font_rid RID.Any, language string, supported bool) //[b]Optional.[/b] //Returns [code]true[/code] if support override is enabled for the [param language]. FontGetLanguageSupportOverride(font_rid RID.Any, language string) bool //[b]Optional.[/b] //Remove language support override. FontRemoveLanguageSupportOverride(font_rid RID.Any, language string) //[b]Optional.[/b] //Returns list of language support overrides. FontGetLanguageSupportOverrides(font_rid RID.Any) []string //[b]Optional.[/b] //Returns [code]true[/code], if font supports given script (ISO 15924 code). FontIsScriptSupported(font_rid RID.Any, script string) bool //[b]Optional.[/b] //Adds override for [method _font_is_script_supported]. FontSetScriptSupportOverride(font_rid RID.Any, script string, supported bool) //[b]Optional.[/b] //Returns [code]true[/code] if support override is enabled for the [param script]. FontGetScriptSupportOverride(font_rid RID.Any, script string) bool //[b]Optional.[/b] //Removes script support override. FontRemoveScriptSupportOverride(font_rid RID.Any, script string) //[b]Optional.[/b] //Returns list of script support overrides. FontGetScriptSupportOverrides(font_rid RID.Any) []string //[b]Optional.[/b] //Sets font OpenType feature set override. FontSetOpentypeFeatureOverrides(font_rid RID.Any, overrides map[any]any) //[b]Optional.[/b] //Returns font OpenType feature set override. FontGetOpentypeFeatureOverrides(font_rid RID.Any) map[any]any //[b]Optional.[/b] //Returns the dictionary of the supported OpenType features. FontSupportedFeatureList(font_rid RID.Any) map[any]any //[b]Optional.[/b] //Returns the dictionary of the supported OpenType variation coordinates. FontSupportedVariationList(font_rid RID.Any) map[any]any //[b]Optional.[/b] //Returns the font oversampling factor, shared by all fonts in the TextServer. FontGetGlobalOversampling() Float.X //[b]Optional.[/b] //Sets oversampling factor, shared by all font in the TextServer. FontSetGlobalOversampling(oversampling Float.X) //[b]Optional.[/b] //Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters). GetHexCodeBoxSize(size int, index int) Vector2.XY //[b]Optional.[/b] //Draws box displaying character hexadecimal code. DrawHexCodeBox(canvas RID.Any, size int, pos Vector2.XY, index int, color Color.RGBA) //[b]Required.[/b] //Creates a new buffer for complex text layout, with the given [param direction] and [param orientation]. CreateShapedText(direction gdclass.TextServerDirection, orientation gdclass.TextServerOrientation) RID.Any //[b]Required.[/b] //Clears text buffer (removes text and inline objects). ShapedTextClear(shaped RID.Any) //[b]Optional.[/b] //Sets desired text direction. If set to [constant TextServer.DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale. ShapedTextSetDirection(shaped RID.Any, direction gdclass.TextServerDirection) //[b]Optional.[/b] //Returns direction of the text. ShapedTextGetDirection(shaped RID.Any) gdclass.TextServerDirection //[b]Optional.[/b] //Returns direction of the text, inferred by the BiDi algorithm. ShapedTextGetInferredDirection(shaped RID.Any) gdclass.TextServerDirection //[b]Optional.[/b] //Overrides BiDi for the structured text. ShapedTextSetBidiOverride(shaped RID.Any, override []any) //[b]Optional.[/b] //Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. ShapedTextSetCustomPunctuation(shaped RID.Any, punct string) //[b]Optional.[/b] //Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. ShapedTextGetCustomPunctuation(shaped RID.Any) string //[b]Optional.[/b] //Sets ellipsis character used for text clipping. ShapedTextSetCustomEllipsis(shaped RID.Any, char int) //[b]Optional.[/b] //Returns ellipsis character used for text clipping. ShapedTextGetCustomEllipsis(shaped RID.Any) int //[b]Optional.[/b] //Sets desired text orientation. ShapedTextSetOrientation(shaped RID.Any, orientation gdclass.TextServerOrientation) //[b]Optional.[/b] //Returns text orientation. ShapedTextGetOrientation(shaped RID.Any) gdclass.TextServerOrientation //[b]Optional.[/b] //If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. ShapedTextSetPreserveInvalid(shaped RID.Any, enabled bool) //[b]Optional.[/b] //Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters. ShapedTextGetPreserveInvalid(shaped RID.Any) bool //[b]Optional.[/b] //If set to [code]true[/code] text buffer will display control characters. ShapedTextSetPreserveControl(shaped RID.Any, enabled bool) //[b]Optional.[/b] //Returns [code]true[/code] if text buffer is configured to display control characters. ShapedTextGetPreserveControl(shaped RID.Any) bool //[b]Optional.[/b] //Sets extra spacing added between glyphs or lines in pixels. ShapedTextSetSpacing(shaped RID.Any, spacing gdclass.TextServerSpacingType, value int) //[b]Optional.[/b] //Returns extra spacing added between glyphs or lines in pixels. ShapedTextGetSpacing(shaped RID.Any, spacing gdclass.TextServerSpacingType) int //[b]Required.[/b] //Adds text span and font to draw it to the text buffer. ShapedTextAddString(shaped RID.Any, text string, fonts []RID.Any, size int, opentype_features map[any]any, language string, meta any) bool //[b]Required.[/b] //Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. ShapedTextAddObject(shaped RID.Any, key any, size Vector2.XY, inline_align InlineAlignment, length int, baseline Float.X) bool //[b]Required.[/b] //Sets new size and alignment of embedded object. ShapedTextResizeObject(shaped RID.Any, key any, size Vector2.XY, inline_align InlineAlignment, baseline Float.X) bool //[b]Required.[/b] //Returns number of text spans added using [method _shaped_text_add_string] or [method _shaped_text_add_object]. ShapedGetSpanCount(shaped RID.Any) int //[b]Required.[/b] //Returns text span metadata. ShapedGetSpanMeta(shaped RID.Any, index int) any //[b]Required.[/b] //Changes text span font, font size, and OpenType features, without changing the text. ShapedSetSpanUpdateFont(shaped RID.Any, index int, fonts []RID.Any, size int, opentype_features map[any]any) //[b]Required.[/b] //Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects). ShapedTextSubstr(shaped RID.Any, start int, length int) RID.Any //[b]Required.[/b] //Returns the parent buffer from which the substring originates. ShapedTextGetParent(shaped RID.Any) RID.Any //[b]Optional.[/b] //Adjusts text width to fit to specified width, returns new text width. ShapedTextFitToWidth(shaped RID.Any, width Float.X, justification_flags gdclass.TextServerJustificationFlag) Float.X //[b]Optional.[/b] //Aligns shaped text to the given tab-stops. ShapedTextTabAlign(shaped RID.Any, tab_stops []float32) Float.X //[b]Required.[/b] //Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully. ShapedTextShape(shaped RID.Any) bool //[b]Optional.[/b] //Updates break points in the shaped text. This method is called by default implementation of text breaking functions. ShapedTextUpdateBreaks(shaped RID.Any) bool //[b]Optional.[/b] //Updates justification points in the shaped text. This method is called by default implementation of text justification functions. ShapedTextUpdateJustificationOps(shaped RID.Any) bool //[b]Required.[/b] //Returns [code]true[/code] if buffer is successfully shaped. ShapedTextIsReady(shaped RID.Any) bool //[b]Required.[/b] //Returns an array of glyphs in the visual order. ShapedTextGetGlyphs(shaped RID.Any) *Glyph //[b]Required.[/b] //Returns text glyphs in the logical order. ShapedTextSortLogical(shaped RID.Any) *Glyph //[b]Required.[/b] //Returns number of glyphs in the buffer. ShapedTextGetGlyphCount(shaped RID.Any) int //[b]Required.[/b] //Returns substring buffer character range in the parent buffer. ShapedTextGetRange(shaped RID.Any) Vector2i.XY //[b]Optional.[/b] //Breaks text to the lines and columns. Returns character ranges for each segment. ShapedTextGetLineBreaksAdv(shaped RID.Any, width []float32, start int, once bool, break_flags gdclass.TextServerLineBreakFlag) []int32 //[b]Optional.[/b] //Breaks text to the lines and returns character ranges for each line. ShapedTextGetLineBreaks(shaped RID.Any, width Float.X, start int, break_flags gdclass.TextServerLineBreakFlag) []int32 //[b]Optional.[/b] //Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum TextServer.GraphemeFlag]). ShapedTextGetWordBreaks(shaped RID.Any, grapheme_flags gdclass.TextServerGraphemeFlag, skip_grapheme_flags gdclass.TextServerGraphemeFlag) []int32 //[b]Required.[/b] //Returns the position of the overrun trim. ShapedTextGetTrimPos(shaped RID.Any) int //[b]Required.[/b] //Returns position of the ellipsis. ShapedTextGetEllipsisPos(shaped RID.Any) int //[b]Required.[/b] //Returns number of glyphs in the ellipsis. ShapedTextGetEllipsisGlyphCount(shaped RID.Any) int //[b]Required.[/b] //Returns array of the glyphs in the ellipsis. ShapedTextGetEllipsisGlyphs(shaped RID.Any) *Glyph //[b]Optional.[/b] //Trims text if it exceeds the given width. ShapedTextOverrunTrimToWidth(shaped RID.Any, width Float.X, trim_flags gdclass.TextServerTextOverrunFlag) //[b]Required.[/b] //Returns array of inline objects. ShapedTextGetObjects(shaped RID.Any) []any //[b]Required.[/b] //Returns bounding rectangle of the inline object. ShapedTextGetObjectRect(shaped RID.Any, key any) Rect2.PositionSize //[b]Required.[/b] //Returns the character range of the inline object. ShapedTextGetObjectRange(shaped RID.Any, key any) Vector2i.XY //[b]Required.[/b] //Returns the glyph index of the inline object. ShapedTextGetObjectGlyph(shaped RID.Any, key any) int //[b]Required.[/b] //Returns size of the text. ShapedTextGetSize(shaped RID.Any) Vector2.XY //[b]Required.[/b] //Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). ShapedTextGetAscent(shaped RID.Any) Float.X //[b]Required.[/b] //Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). ShapedTextGetDescent(shaped RID.Any) Float.X //[b]Required.[/b] //Returns width (for horizontal layout) or height (for vertical) of the text. ShapedTextGetWidth(shaped RID.Any) Float.X //[b]Required.[/b] //Returns pixel offset of the underline below the baseline. ShapedTextGetUnderlinePosition(shaped RID.Any) Float.X //[b]Required.[/b] //Returns thickness of the underline. ShapedTextGetUnderlineThickness(shaped RID.Any) Float.X //[b]Optional.[/b] //Returns dominant direction of in the range of text. ShapedTextGetDominantDirectionInRange(shaped RID.Any, start int, end int) int //[b]Optional.[/b] //Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle. ShapedTextGetCarets(shaped RID.Any, position int, caret *CaretInfo) //[b]Optional.[/b] //Returns selection rectangles for the specified character range. ShapedTextGetSelection(shaped RID.Any, start int, end int) []Vector2.XY //[b]Optional.[/b] //Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found. ShapedTextHitTestGrapheme(shaped RID.Any, coord Float.X) int //[b]Optional.[/b] //Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. ShapedTextHitTestPosition(shaped RID.Any, coord Float.X) int //[b]Optional.[/b] //Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). ShapedTextDraw(shaped RID.Any, canvas RID.Any, pos Vector2.XY, clip_l Float.X, clip_r Float.X, color Color.RGBA) //[b]Optional.[/b] //Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). ShapedTextDrawOutline(shaped RID.Any, canvas RID.Any, pos Vector2.XY, clip_l Float.X, clip_r Float.X, outline_size int, color Color.RGBA) //[b]Optional.[/b] //Returns composite character's bounds as offsets from the start of the line. ShapedTextGetGraphemeBounds(shaped RID.Any, pos int) Vector2.XY //[b]Optional.[/b] //Returns grapheme end position closest to the [param pos]. ShapedTextNextGraphemePos(shaped RID.Any, pos int) int //[b]Optional.[/b] //Returns grapheme start position closest to the [param pos]. ShapedTextPrevGraphemePos(shaped RID.Any, pos int) int //[b]Optional.[/b] //Returns array of the composite character boundaries. ShapedTextGetCharacterBreaks(shaped RID.Any) []int32 //[b]Optional.[/b] //Returns composite character end position closest to the [param pos]. ShapedTextNextCharacterPos(shaped RID.Any, pos int) int //[b]Optional.[/b] //Returns composite character start position closest to the [param pos]. ShapedTextPrevCharacterPos(shaped RID.Any, pos int) int //[b]Optional.[/b] //Returns composite character position closest to the [param pos]. ShapedTextClosestCharacterPos(shaped RID.Any, pos int) int //[b]Optional.[/b] //Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language]. FormatNumber(number string, language string) string //[b]Optional.[/b] //Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9). ParseNumber(number string, language string) string //[b]Optional.[/b] //Returns percent sign used in the [param language]. PercentSign(language string) string //[b]Optional.[/b] //Strips diacritics from the string. StripDiacritics(s string) string //[b]Optional.[/b] //Returns [code]true[/code] if [param string] is a valid identifier. IsValidIdentifier(s string) bool IsValidLetter(unicode int) bool //[b]Optional.[/b] //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. StringGetWordBreaks(s string, language string, chars_per_line int) []int32 //[b]Optional.[/b] //Returns array of the composite character boundaries. StringGetCharacterBreaks(s string, language string) []int32 //[b]Optional.[/b] //Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found. IsConfusable(s string, dict []string) int //[b]Optional.[/b] //Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader. SpoofCheck(s string) bool //[b]Optional.[/b] //Returns the string converted to uppercase. StringToUpper(s string, language string) string //[b]Optional.[/b] //Returns the string converted to lowercase. StringToLower(s string, language string) string //[b]Optional.[/b] //Returns the string converted to title case. StringToTitle(s string, language string) string //[b]Optional.[/b] //Default implementation of the BiDi algorithm override function. See [enum TextServer.StructuredTextParser] for more info. ParseStructuredText(parser_type gdclass.TextServerStructuredTextParser, args []any, text string) []Vector3i.XYZ //[b]Optional.[/b] //This method is called before text server is unregistered. Cleanup() }
Click to show internal directories.
Click to hide internal directories.