Documentation
¶
Overview ¶
Package TextServer provides methods for working with TextServer object instances.
Index ¶
- type Advanced
- type Any
- type AutowrapMode
- type ContourPointTag
- type Direction
- type Feature
- type FixedSizeScaleMode
- type FontAntialiasing
- type FontLCDSubpixelLayout
- type FontStyle
- type GraphemeFlag
- type Hinting
- type InlineAlignment
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsTextServer() Instance
- func (self Instance) CreateFont() RID.Font
- func (self Instance) CreateFontLinkedVariation(font_rid RID.Font) RID.Font
- func (self Instance) CreateShapedText() RID.TextBuffer
- func (self Instance) DrawHexCodeBox(canvas RID.Canvas, size int, pos Vector2.XY, index int, color Color.RGBA)
- func (self Instance) FontClearGlyphs(font_rid RID.Font, size Vector2i.XY)
- func (self Instance) FontClearKerningMap(font_rid RID.Font, size int)
- func (self Instance) FontClearSizeCache(font_rid RID.Font)
- func (self Instance) FontClearTextures(font_rid RID.Font, size Vector2i.XY)
- func (self Instance) FontDrawGlyph(font_rid RID.Font, canvas RID.Canvas, size int, pos Vector2.XY, index int)
- func (self Instance) FontDrawGlyphOutline(font_rid RID.Font, canvas RID.Canvas, size int, outline_size int, ...)
- func (self Instance) FontGetAntialiasing(font_rid RID.Font) gdclass.TextServerFontAntialiasing
- func (self Instance) FontGetAscent(font_rid RID.Font, size int) Float.X
- func (self Instance) FontGetBaselineOffset(font_rid RID.Font) Float.X
- func (self Instance) FontGetCharFromGlyphIndex(font_rid RID.Font, size int, glyph_index int) int
- func (self Instance) FontGetDescent(font_rid RID.Font, size int) Float.X
- func (self Instance) FontGetDisableEmbeddedBitmaps(font_rid RID.Font) bool
- func (self Instance) FontGetEmbolden(font_rid RID.Font) Float.X
- func (self Instance) FontGetFaceCount(font_rid RID.Font) int
- func (self Instance) FontGetFaceIndex(font_rid RID.Font) int
- func (self Instance) FontGetFixedSize(font_rid RID.Font) int
- func (self Instance) FontGetFixedSizeScaleMode(font_rid RID.Font) gdclass.TextServerFixedSizeScaleMode
- func (self Instance) FontGetGenerateMipmaps(font_rid RID.Font) bool
- func (self Instance) FontGetGlobalOversampling() Float.X
- func (self Instance) FontGetGlyphAdvance(font_rid RID.Font, size int, glyph int) Vector2.XY
- func (self Instance) FontGetGlyphContours(font RID.Font, size int, index int) map[string]interface{}
- func (self Instance) FontGetGlyphIndex(font_rid RID.Font, size int, char int, variation_selector int) int
- func (self Instance) FontGetGlyphList(font_rid RID.Font, size Vector2i.XY) []int32
- func (self Instance) FontGetGlyphOffset(font_rid RID.Font, size Vector2i.XY, glyph int) Vector2.XY
- func (self Instance) FontGetGlyphSize(font_rid RID.Font, size Vector2i.XY, glyph int) Vector2.XY
- func (self Instance) FontGetGlyphTextureIdx(font_rid RID.Font, size Vector2i.XY, glyph int) int
- func (self Instance) FontGetGlyphTextureRid(font_rid RID.Font, size Vector2i.XY, glyph int) RID.Texture
- func (self Instance) FontGetGlyphTextureSize(font_rid RID.Font, size Vector2i.XY, glyph int) Vector2.XY
- func (self Instance) FontGetGlyphUvRect(font_rid RID.Font, size Vector2i.XY, glyph int) Rect2.PositionSize
- func (self Instance) FontGetHinting(font_rid RID.Font) gdclass.TextServerHinting
- func (self Instance) FontGetKerning(font_rid RID.Font, size int, glyph_pair Vector2i.XY) Vector2.XY
- func (self Instance) FontGetKerningList(font_rid RID.Font, size int) []Vector2i.XY
- func (self Instance) FontGetLanguageSupportOverride(font_rid RID.Font, language string) bool
- func (self Instance) FontGetLanguageSupportOverrides(font_rid RID.Font) []string
- func (self Instance) FontGetMsdfPixelRange(font_rid RID.Font) int
- func (self Instance) FontGetMsdfSize(font_rid RID.Font) int
- func (self Instance) FontGetName(font_rid RID.Font) string
- func (self Instance) FontGetOpentypeFeatureOverrides(font_rid RID.Font) map[string]string
- func (self Instance) FontGetOtNameStrings(font_rid RID.Font) map[string]string
- func (self Instance) FontGetOversampling(font_rid RID.Font) Float.X
- func (self Instance) FontGetScale(font_rid RID.Font, size int) Float.X
- func (self Instance) FontGetScriptSupportOverride(font_rid RID.Font, script string) bool
- func (self Instance) FontGetScriptSupportOverrides(font_rid RID.Font) []string
- func (self Instance) FontGetSizeCacheList(font_rid RID.Font) []Vector2i.XY
- func (self Instance) FontGetSpacing(font_rid RID.Font, spacing gdclass.TextServerSpacingType) int
- func (self Instance) FontGetStretch(font_rid RID.Font) int
- func (self Instance) FontGetStyle(font_rid RID.Font) gdclass.TextServerFontStyle
- func (self Instance) FontGetStyleName(font_rid RID.Font) string
- func (self Instance) FontGetSubpixelPositioning(font_rid RID.Font) gdclass.TextServerSubpixelPositioning
- func (self Instance) FontGetSupportedChars(font_rid RID.Font) string
- func (self Instance) FontGetTextureCount(font_rid RID.Font, size Vector2i.XY) int
- func (self Instance) FontGetTextureImage(font_rid RID.Font, size Vector2i.XY, texture_index int) [1]gdclass.Image
- func (self Instance) FontGetTextureOffsets(font_rid RID.Font, size Vector2i.XY, texture_index int) []int32
- func (self Instance) FontGetTransform(font_rid RID.Font) Transform2D.OriginXY
- func (self Instance) FontGetUnderlinePosition(font_rid RID.Font, size int) Float.X
- func (self Instance) FontGetUnderlineThickness(font_rid RID.Font, size int) Float.X
- func (self Instance) FontGetVariationCoordinates(font_rid RID.Font) map[string]float32
- func (self Instance) FontGetWeight(font_rid RID.Font) int
- func (self Instance) FontHasChar(font_rid RID.Font, char int) bool
- func (self Instance) FontIsAllowSystemFallback(font_rid RID.Font) bool
- func (self Instance) FontIsForceAutohinter(font_rid RID.Font) bool
- func (self Instance) FontIsLanguageSupported(font_rid RID.Font, language string) bool
- func (self Instance) FontIsMultichannelSignedDistanceField(font_rid RID.Font) bool
- func (self Instance) FontIsScriptSupported(font_rid RID.Font, script string) bool
- func (self Instance) FontRemoveGlyph(font_rid RID.Font, size Vector2i.XY, glyph int)
- func (self Instance) FontRemoveKerning(font_rid RID.Font, size int, glyph_pair Vector2i.XY)
- func (self Instance) FontRemoveLanguageSupportOverride(font_rid RID.Font, language string)
- func (self Instance) FontRemoveScriptSupportOverride(font_rid RID.Font, script string)
- func (self Instance) FontRemoveSizeCache(font_rid RID.Font, size Vector2i.XY)
- func (self Instance) FontRemoveTexture(font_rid RID.Font, size Vector2i.XY, texture_index int)
- func (self Instance) FontRenderGlyph(font_rid RID.Font, size Vector2i.XY, index int)
- func (self Instance) FontRenderRange(font_rid RID.Font, size Vector2i.XY, start int, end int)
- func (self Instance) FontSetAllowSystemFallback(font_rid RID.Font, allow_system_fallback bool)
- func (self Instance) FontSetAntialiasing(font_rid RID.Font, antialiasing gdclass.TextServerFontAntialiasing)
- func (self Instance) FontSetAscent(font_rid RID.Font, size int, ascent Float.X)
- func (self Instance) FontSetBaselineOffset(font_rid RID.Font, baseline_offset Float.X)
- func (self Instance) FontSetData(font_rid RID.Font, data []byte)
- func (self Instance) FontSetDescent(font_rid RID.Font, size int, descent Float.X)
- func (self Instance) FontSetDisableEmbeddedBitmaps(font_rid RID.Font, disable_embedded_bitmaps bool)
- func (self Instance) FontSetEmbolden(font_rid RID.Font, strength Float.X)
- func (self Instance) FontSetFaceIndex(font_rid RID.Font, face_index int)
- func (self Instance) FontSetFixedSize(font_rid RID.Font, fixed_size int)
- func (self Instance) FontSetFixedSizeScaleMode(font_rid RID.Font, fixed_size_scale_mode gdclass.TextServerFixedSizeScaleMode)
- func (self Instance) FontSetForceAutohinter(font_rid RID.Font, force_autohinter bool)
- func (self Instance) FontSetGenerateMipmaps(font_rid RID.Font, generate_mipmaps bool)
- func (self Instance) FontSetGlobalOversampling(oversampling Float.X)
- func (self Instance) FontSetGlyphAdvance(font_rid RID.Font, size int, glyph int, advance Vector2.XY)
- func (self Instance) FontSetGlyphOffset(font_rid RID.Font, size Vector2i.XY, glyph int, offset Vector2.XY)
- func (self Instance) FontSetGlyphSize(font_rid RID.Font, size Vector2i.XY, glyph int, gl_size Vector2.XY)
- func (self Instance) FontSetGlyphTextureIdx(font_rid RID.Font, size Vector2i.XY, glyph int, texture_idx int)
- func (self Instance) FontSetGlyphUvRect(font_rid RID.Font, size Vector2i.XY, glyph int, uv_rect Rect2.PositionSize)
- func (self Instance) FontSetHinting(font_rid RID.Font, hinting gdclass.TextServerHinting)
- func (self Instance) FontSetKerning(font_rid RID.Font, size int, glyph_pair Vector2i.XY, kerning Vector2.XY)
- func (self Instance) FontSetLanguageSupportOverride(font_rid RID.Font, language string, supported bool)
- func (self Instance) FontSetMsdfPixelRange(font_rid RID.Font, msdf_pixel_range int)
- func (self Instance) FontSetMsdfSize(font_rid RID.Font, msdf_size int)
- func (self Instance) FontSetMultichannelSignedDistanceField(font_rid RID.Font, msdf bool)
- func (self Instance) FontSetName(font_rid RID.Font, name string)
- func (self Instance) FontSetOpentypeFeatureOverrides(font_rid RID.Font, overrides map[string]string)
- func (self Instance) FontSetOversampling(font_rid RID.Font, oversampling Float.X)
- func (self Instance) FontSetScale(font_rid RID.Font, size int, scale Float.X)
- func (self Instance) FontSetScriptSupportOverride(font_rid RID.Font, script string, supported bool)
- func (self Instance) FontSetSpacing(font_rid RID.Font, spacing gdclass.TextServerSpacingType, value int)
- func (self Instance) FontSetStretch(font_rid RID.Font, weight int)
- func (self Instance) FontSetStyle(font_rid RID.Font, style gdclass.TextServerFontStyle)
- func (self Instance) FontSetStyleName(font_rid RID.Font, name string)
- func (self Instance) FontSetSubpixelPositioning(font_rid RID.Font, subpixel_positioning gdclass.TextServerSubpixelPositioning)
- func (self Instance) FontSetTextureImage(font_rid RID.Font, size Vector2i.XY, texture_index int, image [1]gdclass.Image)
- func (self Instance) FontSetTextureOffsets(font_rid RID.Font, size Vector2i.XY, texture_index int, offset []int32)
- func (self Instance) FontSetTransform(font_rid RID.Font, transform Transform2D.OriginXY)
- func (self Instance) FontSetUnderlinePosition(font_rid RID.Font, size int, underline_position Float.X)
- func (self Instance) FontSetUnderlineThickness(font_rid RID.Font, size int, underline_thickness Float.X)
- func (self Instance) FontSetVariationCoordinates(font_rid RID.Font, variation_coordinates map[string]float32)
- func (self Instance) FontSetWeight(font_rid RID.Font, weight int)
- func (self Instance) FontSupportedFeatureList(font_rid RID.Font) map[string]string
- func (self Instance) FontSupportedVariationList(font_rid RID.Font) map[string]string
- func (self Instance) FormatNumber(number string) string
- func (self Instance) FreeRid(rid RID.Any)
- func (self Instance) GetFeatures() int
- func (self Instance) GetHexCodeBoxSize(size int, index int) Vector2.XY
- func (self Instance) GetName() string
- func (self Instance) GetSupportDataFilename() string
- func (self Instance) GetSupportDataInfo() string
- func (self Instance) Has(rid RID.Any) bool
- func (self Instance) HasFeature(feature gdclass.TextServerFeature) bool
- func (self Instance) IsConfusable(s string, dict []string) int
- func (self Instance) IsLocaleRightToLeft(locale string) bool
- func (self Instance) IsValidIdentifier(s string) bool
- func (self Instance) IsValidLetter(unicode int) bool
- func (self Instance) LoadSupportData(filename string) bool
- func (self Instance) NameToTag(name string) int
- func (self Instance) ParseNumber(number string) string
- func (self Instance) ParseStructuredText(parser_type gdclass.TextServerStructuredTextParser, args []any, text string) []Vector3i.XYZ
- func (self Instance) PercentSign() string
- func (self Instance) SaveSupportData(filename string) bool
- func (self Instance) ShapedGetSpanCount(shaped RID.TextBuffer) int
- func (self Instance) ShapedGetSpanMeta(shaped RID.TextBuffer, index int) any
- func (self Instance) ShapedSetSpanUpdateFont(shaped RID.TextBuffer, index int, fonts [][]RID.Font, size int)
- func (self Instance) ShapedTextAddObject(shaped RID.TextBuffer, key any, size Vector2.XY) bool
- func (self Instance) ShapedTextAddString(shaped RID.TextBuffer, text string, fonts []RID.TextBuffer, size int) bool
- func (self Instance) ShapedTextClear(rid RID.TextBuffer)
- func (self Instance) ShapedTextClosestCharacterPos(shaped RID.TextBuffer, pos int) int
- func (self Instance) ShapedTextDraw(shaped RID.TextBuffer, canvas RID.Canvas, pos Vector2.XY)
- func (self Instance) ShapedTextDrawOutline(shaped RID.TextBuffer, canvas RID.Canvas, pos Vector2.XY)
- func (self Instance) ShapedTextFitToWidth(shaped RID.TextBuffer, width Float.X) Float.X
- func (self Instance) ShapedTextGetAscent(shaped RID.TextBuffer) Float.X
- func (self Instance) ShapedTextGetCarets(shaped RID.TextBuffer, position int) map[int]struct{ ... }
- func (self Instance) ShapedTextGetCharacterBreaks(shaped RID.TextBuffer) []int32
- func (self Instance) ShapedTextGetCustomEllipsis(shaped RID.TextBuffer) int
- func (self Instance) ShapedTextGetCustomPunctuation(shaped RID.TextBuffer) string
- func (self Instance) ShapedTextGetDescent(shaped RID.TextBuffer) Float.X
- func (self Instance) ShapedTextGetDirection(shaped RID.TextBuffer) gdclass.TextServerDirection
- func (self Instance) ShapedTextGetDominantDirectionInRange(shaped RID.TextBuffer, start int, end int) gdclass.TextServerDirection
- func (self Instance) ShapedTextGetEllipsisGlyphCount(shaped RID.TextBuffer) int
- func (self Instance) ShapedTextGetEllipsisGlyphs(shaped RID.TextBuffer) []map[int]struct{ ... }
- func (self Instance) ShapedTextGetEllipsisPos(shaped RID.TextBuffer) int
- func (self Instance) ShapedTextGetGlyphCount(shaped RID.TextBuffer) int
- func (self Instance) ShapedTextGetGlyphs(shaped RID.TextBuffer) []map[int]struct{ ... }
- func (self Instance) ShapedTextGetGraphemeBounds(shaped RID.TextBuffer, pos int) Vector2.XY
- func (self Instance) ShapedTextGetInferredDirection(shaped RID.TextBuffer) gdclass.TextServerDirection
- func (self Instance) ShapedTextGetLineBreaks(shaped RID.TextBuffer, width Float.X) []int32
- func (self Instance) ShapedTextGetLineBreaksAdv(shaped RID.TextBuffer, width []float32) []int32
- func (self Instance) ShapedTextGetObjectGlyph(shaped RID.TextBuffer, key any) int
- func (self Instance) ShapedTextGetObjectRange(shaped RID.TextBuffer, key any) Vector2i.XY
- func (self Instance) ShapedTextGetObjectRect(shaped RID.TextBuffer, key any) Rect2.PositionSize
- func (self Instance) ShapedTextGetObjects(shaped RID.TextBuffer) []any
- func (self Instance) ShapedTextGetOrientation(shaped RID.TextBuffer) gdclass.TextServerOrientation
- func (self Instance) ShapedTextGetParent(shaped RID.TextBuffer) RID.TextBuffer
- func (self Instance) ShapedTextGetPreserveControl(shaped RID.TextBuffer) bool
- func (self Instance) ShapedTextGetPreserveInvalid(shaped RID.TextBuffer) bool
- func (self Instance) ShapedTextGetRange(shaped RID.TextBuffer) Vector2i.XY
- func (self Instance) ShapedTextGetSelection(shaped RID.TextBuffer, start int, end int) []Vector2.XY
- func (self Instance) ShapedTextGetSize(shaped RID.TextBuffer) Vector2.XY
- func (self Instance) ShapedTextGetSpacing(shaped RID.TextBuffer, spacing gdclass.TextServerSpacingType) int
- func (self Instance) ShapedTextGetTrimPos(shaped RID.TextBuffer) int
- func (self Instance) ShapedTextGetUnderlinePosition(shaped RID.TextBuffer) Float.X
- func (self Instance) ShapedTextGetUnderlineThickness(shaped RID.TextBuffer) Float.X
- func (self Instance) ShapedTextGetWidth(shaped RID.TextBuffer) Float.X
- func (self Instance) ShapedTextGetWordBreaks(shaped RID.TextBuffer) []int32
- func (self Instance) ShapedTextHasVisibleChars(shaped RID.TextBuffer) bool
- func (self Instance) ShapedTextHitTestGrapheme(shaped RID.TextBuffer, coords Float.X) int
- func (self Instance) ShapedTextHitTestPosition(shaped RID.TextBuffer, coords Float.X) int
- func (self Instance) ShapedTextIsReady(shaped RID.TextBuffer) bool
- func (self Instance) ShapedTextNextCharacterPos(shaped RID.TextBuffer, pos int) int
- func (self Instance) ShapedTextNextGraphemePos(shaped RID.TextBuffer, pos int) int
- func (self Instance) ShapedTextOverrunTrimToWidth(shaped RID.TextBuffer)
- func (self Instance) ShapedTextPrevCharacterPos(shaped RID.TextBuffer, pos int) int
- func (self Instance) ShapedTextPrevGraphemePos(shaped RID.TextBuffer, pos int) int
- func (self Instance) ShapedTextResizeObject(shaped RID.TextBuffer, key any, size Vector2.XY) bool
- func (self Instance) ShapedTextSetBidiOverride(shaped RID.TextBuffer, override []any)
- func (self Instance) ShapedTextSetCustomEllipsis(shaped RID.TextBuffer, char int)
- func (self Instance) ShapedTextSetCustomPunctuation(shaped RID.TextBuffer, punct string)
- func (self Instance) ShapedTextSetDirection(shaped RID.TextBuffer)
- func (self Instance) ShapedTextSetOrientation(shaped RID.TextBuffer)
- func (self Instance) ShapedTextSetPreserveControl(shaped RID.TextBuffer, enabled bool)
- func (self Instance) ShapedTextSetPreserveInvalid(shaped RID.TextBuffer, enabled bool)
- func (self Instance) ShapedTextSetSpacing(shaped RID.TextBuffer, spacing gdclass.TextServerSpacingType, value int)
- func (self Instance) ShapedTextShape(shaped RID.TextBuffer) bool
- func (self Instance) ShapedTextSortLogical(shaped RID.TextBuffer) []map[int]int
- func (self Instance) ShapedTextSubstr(shaped RID.TextBuffer, start int, length int) RID.TextBuffer
- func (self Instance) ShapedTextTabAlign(shaped RID.TextBuffer, tab_stops []float32) Float.X
- func (self Instance) SpoofCheck(s string) bool
- func (self Instance) StringGetCharacterBreaks(s string) []int32
- func (self Instance) StringGetWordBreaks(s string) []int32
- func (self Instance) StringToLower(s string) string
- func (self Instance) StringToTitle(s string) string
- func (self Instance) StringToUpper(s string) string
- func (self Instance) StripDiacritics(s string) string
- func (self Instance) TagToName(tag int) string
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type JustificationFlag
- type LineBreakFlag
- type Orientation
- type OverrunBehavior
- type SpacingType
- type StructuredTextParser
- type SubpixelPositioning
- type TextOverrunFlag
- type VisibleCharactersBehavior
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 AutowrapMode ¶
type AutowrapMode = gdclass.TextServerAutowrapMode //gd:TextServer.AutowrapMode
const ( /*Autowrap is disabled.*/ AutowrapOff AutowrapMode = 0 /*Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.*/ AutowrapArbitrary AutowrapMode = 1 /*Wraps the text inside the node's bounding rectangle by soft-breaking between words.*/ AutowrapWord AutowrapMode = 2 /*Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.*/ AutowrapWordSmart AutowrapMode = 3 )
type ContourPointTag ¶
type ContourPointTag = gdclass.TextServerContourPointTag //gd:TextServer.ContourPointTag
const ( /*Contour point is on the curve.*/ ContourCurveTagOn ContourPointTag = 1 /*Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.*/ ContourCurveTagOffConic ContourPointTag = 0 /*Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.*/ ContourCurveTagOffCubic ContourPointTag = 2 )
type Direction ¶
type Direction = gdclass.TextServerDirection //gd:TextServer.Direction
const ( /*Text direction is determined based on contents and current locale.*/ DirectionAuto Direction = 0 /*Text is written from left to right.*/ DirectionLtr Direction = 1 /*Text is written from right to left.*/ DirectionRtl Direction = 2 /*Text writing direction is the same as base string writing direction. Used for BiDi override only.*/ DirectionInherited Direction = 3 )
type Feature ¶
type Feature = gdclass.TextServerFeature //gd:TextServer.Feature
const ( /*TextServer supports simple text layouts.*/ FeatureSimpleLayout Feature = 1 /*TextServer supports bidirectional text layouts.*/ FeatureBidiLayout Feature = 2 /*TextServer supports vertical layouts.*/ FeatureVerticalLayout Feature = 4 /*TextServer supports complex text shaping.*/ FeatureShaping Feature = 8 /*TextServer supports justification using kashidas.*/ FeatureKashidaJustification Feature = 16 /*TextServer supports complex line/word breaking rules (e.g. dictionary based).*/ FeatureBreakIterators Feature = 32 /*TextServer supports loading bitmap fonts.*/ FeatureFontBitmap Feature = 64 /*TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.*/ FeatureFontDynamic Feature = 128 /*TextServer supports multichannel signed distance field dynamic font rendering.*/ FeatureFontMsdf Feature = 256 /*TextServer supports loading system fonts.*/ FeatureFontSystem Feature = 512 /*TextServer supports variable fonts.*/ FeatureFontVariable Feature = 1024 /*TextServer supports locale dependent and context sensitive case conversion.*/ FeatureContextSensitiveCaseConversion Feature = 2048 /*TextServer require external data file for some features, see [method load_support_data].*/ FeatureUseSupportData Feature = 4096 /*TextServer supports UAX #31 identifier validation, see [method is_valid_identifier].*/ FeatureUnicodeIdentifiers Feature = 8192 /*TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features.*/ FeatureUnicodeSecurity Feature = 16384 )
type FixedSizeScaleMode ¶
type FixedSizeScaleMode = gdclass.TextServerFixedSizeScaleMode //gd:TextServer.FixedSizeScaleMode
const ( /*Bitmap font is not scaled.*/ FixedSizeScaleDisable FixedSizeScaleMode = 0 /*Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.*/ FixedSizeScaleIntegerOnly FixedSizeScaleMode = 1 /*Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.*/ FixedSizeScaleEnabled FixedSizeScaleMode = 2 )
type FontAntialiasing ¶
type FontAntialiasing = gdclass.TextServerFontAntialiasing //gd:TextServer.FontAntialiasing
const ( /*Font glyphs are rasterized as 1-bit bitmaps.*/ FontAntialiasingNone FontAntialiasing = 0 /*Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.*/ FontAntialiasingGray FontAntialiasing = 1 /*Font glyphs are rasterized for LCD screens. LCD subpixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.*/ FontAntialiasingLcd FontAntialiasing = 2 )
type FontLCDSubpixelLayout ¶
type FontLCDSubpixelLayout = gdclass.TextServerFontLCDSubpixelLayout //gd:TextServer.FontLCDSubpixelLayout
const ( /*Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.*/ FontLcdSubpixelLayoutNone FontLCDSubpixelLayout = 0 /*Horizontal RGB subpixel layout.*/ FontLcdSubpixelLayoutHrgb FontLCDSubpixelLayout = 1 /*Horizontal BGR subpixel layout.*/ FontLcdSubpixelLayoutHbgr FontLCDSubpixelLayout = 2 /*Vertical RGB subpixel layout.*/ FontLcdSubpixelLayoutVrgb FontLCDSubpixelLayout = 3 /*Vertical BGR subpixel layout.*/ FontLcdSubpixelLayoutVbgr FontLCDSubpixelLayout = 4 /*Represents the size of the [enum FontLCDSubpixelLayout] enum.*/ FontLcdSubpixelLayoutMax FontLCDSubpixelLayout = 5 )
type FontStyle ¶
type FontStyle = gdclass.TextServerFontStyle //gd:TextServer.FontStyle
type GraphemeFlag ¶
type GraphemeFlag = gdclass.TextServerGraphemeFlag //gd:TextServer.GraphemeFlag
const ( /*Grapheme is supported by the font, and can be drawn.*/ GraphemeIsValid GraphemeFlag = 1 /*Grapheme is part of right-to-left or bottom-to-top run.*/ GraphemeIsRtl GraphemeFlag = 2 /*Grapheme is not part of source text, it was added by justification process.*/ GraphemeIsVirtual GraphemeFlag = 4 /*Grapheme is whitespace.*/ GraphemeIsSpace GraphemeFlag = 8 /*Grapheme is mandatory break point (e.g. [code]"\n"[/code]).*/ GraphemeIsBreakHard GraphemeFlag = 16 /*Grapheme is optional break point (e.g. space).*/ GraphemeIsBreakSoft GraphemeFlag = 32 /*Grapheme is the tabulation character.*/ GraphemeIsTab GraphemeFlag = 64 /*Grapheme is kashida.*/ GraphemeIsElongation GraphemeFlag = 128 /*Grapheme is punctuation character.*/ GraphemeIsPunctuation GraphemeFlag = 256 /*Grapheme is underscore character.*/ GraphemeIsUnderscore GraphemeFlag = 512 /*Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.*/ GraphemeIsConnected GraphemeFlag = 1024 /*It is safe to insert a U+0640 before this grapheme for elongation.*/ GraphemeIsSafeToInsertTatweel GraphemeFlag = 2048 /*Grapheme is an object replacement character for the embedded object.*/ GraphemeIsEmbeddedObject GraphemeFlag = 4096 /*Grapheme is a soft hyphen.*/ GraphemeIsSoftHyphen GraphemeFlag = 8192 )
type Hinting ¶
type Hinting = gdclass.TextServerHinting //gd:TextServer.Hinting
const ( /*Disables font hinting (smoother but less crisp).*/ HintingNone Hinting = 0 /*Use the light font hinting mode.*/ HintingLight Hinting = 1 /*Use the default font hinting mode (crisper but less smooth). [b]Note:[/b] This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.*/ HintingNormal Hinting = 2 )
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.TextServer
[TextServer] is the API backend for managing fonts and rendering text. [b]Note:[/b] This is a low-level API, consider using [TextLine], [TextParagraph], and [Font] classes instead. This is an abstract class, so to get the currently active [TextServer] instance, use the following code: [codeblocks] [gdscript] var ts = TextServerManager.get_primary_interface() [/gdscript] [csharp] var ts = TextServerManager.GetPrimaryInterface(); [/csharp] [/codeblocks]
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 (Instance) CreateFont ¶
Creates a new, empty font cache entry resource. To free the resulting resource, use the [method free_rid] method.
func (Instance) CreateFontLinkedVariation ¶
Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the [method free_rid] method.
func (Instance) CreateShapedText ¶
func (self Instance) CreateShapedText() RID.TextBuffer
Creates a new buffer for complex text layout, with the given [param direction] and [param orientation]. To free the resulting buffer, use [method free_rid] method. [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]). [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
func (Instance) DrawHexCodeBox ¶
func (self Instance) DrawHexCodeBox(canvas RID.Canvas, size int, pos Vector2.XY, index int, color Color.RGBA)
Draws box displaying character hexadecimal code. Used for replacing missing characters.
func (Instance) FontClearGlyphs ¶
Removes all rendered glyph information from the cache entry. [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
func (Instance) FontClearKerningMap ¶
Removes all kerning overrides.
func (Instance) FontClearSizeCache ¶
Removes all font sizes from the cache entry.
func (Instance) FontClearTextures ¶
Removes all textures from font cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
func (Instance) FontDrawGlyph ¶
func (self Instance) FontDrawGlyph(font_rid RID.Font, canvas RID.Canvas, size int, pos Vector2.XY, index int)
Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size]. [b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
func (Instance) FontDrawGlyphOutline ¶
func (self Instance) FontDrawGlyphOutline(font_rid RID.Font, canvas RID.Canvas, size int, outline_size int, pos Vector2.XY, index int)
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]. [b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
func (Instance) FontGetAntialiasing ¶
func (self Instance) FontGetAntialiasing(font_rid RID.Font) gdclass.TextServerFontAntialiasing
Returns font anti-aliasing mode.
func (Instance) FontGetAscent ¶
Returns the font ascent (number of pixels above the baseline).
func (Instance) FontGetBaselineOffset ¶
Returns extra baseline offset (as a fraction of font height).
func (Instance) FontGetCharFromGlyphIndex ¶
Returns character code associated with [param glyph_index], or [code]0[/code] if [param glyph_index] is invalid. See [method font_get_glyph_index].
func (Instance) FontGetDescent ¶
Returns the font descent (number of pixels below the baseline).
func (Instance) FontGetDisableEmbeddedBitmaps ¶
Returns whether the font's embedded bitmap loading is disabled.
func (Instance) FontGetEmbolden ¶
Returns font embolden strength.
func (Instance) FontGetFaceCount ¶
Returns number of faces in the TrueType / OpenType collection.
func (Instance) FontGetFaceIndex ¶
Returns an active face index in the TrueType / OpenType collection.
func (Instance) FontGetFixedSize ¶
Returns bitmap font fixed size.
func (Instance) FontGetFixedSizeScaleMode ¶
func (self Instance) FontGetFixedSizeScaleMode(font_rid RID.Font) gdclass.TextServerFixedSizeScaleMode
Returns bitmap font scaling mode.
func (Instance) FontGetGenerateMipmaps ¶
Returns [code]true[/code] if font texture mipmap generation is enabled.
func (Instance) FontGetGlobalOversampling ¶
Returns the font oversampling factor, shared by all fonts in the TextServer.
func (Instance) FontGetGlyphAdvance ¶
Returns glyph advance (offset of the next glyph). [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
func (Instance) FontGetGlyphContours ¶
func (self Instance) FontGetGlyphContours(font RID.Font, size int, index int) map[string]interface{}
Returns outline contours of the glyph as a [Dictionary] with the following contents: [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values. [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour. [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
func (Instance) FontGetGlyphIndex ¶
func (self Instance) FontGetGlyphIndex(font_rid RID.Font, size int, char int, variation_selector int) int
Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. See [method font_get_char_from_glyph_index].
func (Instance) FontGetGlyphList ¶
Returns list of rendered glyphs in the cache entry.
func (Instance) FontGetGlyphOffset ¶
Returns glyph offset from the baseline.
func (Instance) FontGetGlyphSize ¶
Returns size of the glyph.
func (Instance) FontGetGlyphTextureIdx ¶
Returns index of the cache texture containing the glyph.
func (Instance) FontGetGlyphTextureRid ¶
func (self Instance) FontGetGlyphTextureRid(font_rid RID.Font, size Vector2i.XY, glyph int) RID.Texture
Returns resource ID of the cache texture containing the glyph. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
func (Instance) FontGetGlyphTextureSize ¶
func (self Instance) FontGetGlyphTextureSize(font_rid RID.Font, size Vector2i.XY, glyph int) Vector2.XY
Returns size of the cache texture containing the glyph. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
func (Instance) FontGetGlyphUvRect ¶
func (self Instance) FontGetGlyphUvRect(font_rid RID.Font, size Vector2i.XY, glyph int) Rect2.PositionSize
Returns rectangle in the cache texture containing the glyph.
func (Instance) FontGetHinting ¶
func (self Instance) FontGetHinting(font_rid RID.Font) gdclass.TextServerHinting
Returns the font hinting mode. Used by dynamic fonts only.
func (Instance) FontGetKerning ¶
Returns kerning for the pair of glyphs.
func (Instance) FontGetKerningList ¶
Returns list of the kerning overrides.
func (Instance) FontGetLanguageSupportOverride ¶
Returns [code]true[/code] if support override is enabled for the [param language].
func (Instance) FontGetLanguageSupportOverrides ¶
Returns list of language support overrides.
func (Instance) FontGetMsdfPixelRange ¶
Returns the width of the range around the shape between the minimum and maximum representable signed distance.
func (Instance) FontGetMsdfSize ¶
Returns source font size used to generate MSDF textures.
func (Instance) FontGetName ¶
Returns font family name.
func (Instance) FontGetOpentypeFeatureOverrides ¶
Returns font OpenType feature set override.
func (Instance) FontGetOtNameStrings ¶
Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
func (Instance) FontGetOversampling ¶
Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
func (Instance) FontGetScale ¶
Returns scaling factor of the color bitmap font.
func (Instance) FontGetScriptSupportOverride ¶
Returns [code]true[/code] if support override is enabled for the [param script].
func (Instance) FontGetScriptSupportOverrides ¶
Returns list of script support overrides.
func (Instance) FontGetSizeCacheList ¶
Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.
func (Instance) FontGetSpacing ¶
Returns the spacing for [param spacing] (see [enum TextServer.SpacingType]) in pixels (not relative to the font size).
func (Instance) FontGetStretch ¶
Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
func (Instance) FontGetStyle ¶
func (self Instance) FontGetStyle(font_rid RID.Font) gdclass.TextServerFontStyle
Returns font style flags, see [enum FontStyle].
func (Instance) FontGetStyleName ¶
Returns font style name.
func (Instance) FontGetSubpixelPositioning ¶
func (self Instance) FontGetSubpixelPositioning(font_rid RID.Font) gdclass.TextServerSubpixelPositioning
Returns font subpixel glyph positioning mode.
func (Instance) FontGetSupportedChars ¶
Returns a string containing all the characters available in the font.
func (Instance) FontGetTextureCount ¶
Returns number of textures used by font cache entry.
func (Instance) FontGetTextureImage ¶
func (self Instance) FontGetTextureImage(font_rid RID.Font, size Vector2i.XY, texture_index int) [1]gdclass.Image
Returns font cache texture image data.
func (Instance) FontGetTextureOffsets ¶
func (self Instance) FontGetTextureOffsets(font_rid RID.Font, size Vector2i.XY, texture_index int) []int32
Returns array containing glyph packing data.
func (Instance) FontGetTransform ¶
func (self Instance) FontGetTransform(font_rid RID.Font) Transform2D.OriginXY
Returns 2D transform applied to the font outlines.
func (Instance) FontGetUnderlinePosition ¶
Returns pixel offset of the underline below the baseline.
func (Instance) FontGetUnderlineThickness ¶
Returns thickness of the underline in pixels.
func (Instance) FontGetVariationCoordinates ¶
Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
func (Instance) FontGetWeight ¶
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].
func (Instance) FontHasChar ¶
Returns [code]true[/code] if a Unicode [param char] is available in the font.
func (Instance) FontIsAllowSystemFallback ¶
Returns [code]true[/code] if system fonts can be automatically used as fallbacks.
func (Instance) FontIsForceAutohinter ¶
Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
func (Instance) FontIsLanguageSupported ¶
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
func (Instance) FontIsMultichannelSignedDistanceField ¶
Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
func (Instance) FontIsScriptSupported ¶
Returns [code]true[/code], if font supports given script (ISO 15924 code).
func (Instance) FontRemoveGlyph ¶
Removes specified rendered glyph information from the cache entry. [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
func (Instance) FontRemoveKerning ¶
Removes kerning override for the pair of glyphs.
func (Instance) FontRemoveLanguageSupportOverride ¶
Remove language support override.
func (Instance) FontRemoveScriptSupportOverride ¶
Removes script support override.
func (Instance) FontRemoveSizeCache ¶
Removes specified font size from the cache entry.
func (Instance) FontRemoveTexture ¶
Removes specified texture from the cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
func (Instance) FontRenderGlyph ¶
Renders specified glyph to the font cache texture.
func (Instance) FontRenderRange ¶
Renders the range of characters to the font cache texture.
func (Instance) FontSetAllowSystemFallback ¶
If set to [code]true[/code], system fonts can be automatically used as fallbacks.
func (Instance) FontSetAntialiasing ¶
func (self Instance) FontSetAntialiasing(font_rid RID.Font, antialiasing gdclass.TextServerFontAntialiasing)
Sets font anti-aliasing mode.
func (Instance) FontSetAscent ¶
Sets the font ascent (number of pixels above the baseline).
func (Instance) FontSetBaselineOffset ¶
Sets extra baseline offset (as a fraction of font height).
func (Instance) FontSetData ¶
Sets font source data, e.g contents of the dynamic font source file.
func (Instance) FontSetDescent ¶
Sets the font descent (number of pixels below the baseline).
func (Instance) FontSetDisableEmbeddedBitmaps ¶
func (self Instance) FontSetDisableEmbeddedBitmaps(font_rid RID.Font, disable_embedded_bitmaps bool)
If set to [code]true[/code], embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
func (Instance) FontSetEmbolden ¶
Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
func (Instance) FontSetFaceIndex ¶
Sets an active face index in the TrueType / OpenType collection.
func (Instance) FontSetFixedSize ¶
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
func (Instance) FontSetFixedSizeScaleMode ¶
func (self Instance) FontSetFixedSizeScaleMode(font_rid RID.Font, fixed_size_scale_mode gdclass.TextServerFixedSizeScaleMode)
Sets bitmap font scaling mode. This property is used only if [code]fixed_size[/code] is greater than zero.
func (Instance) FontSetForceAutohinter ¶
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
func (Instance) FontSetGenerateMipmaps ¶
If set to [code]true[/code] font texture mipmap generation is enabled.
func (Instance) FontSetGlobalOversampling ¶
Sets oversampling factor, shared by all font in the TextServer. [b]Note:[/b] This value can be automatically changed by display server.
func (Instance) FontSetGlyphAdvance ¶
func (self Instance) FontSetGlyphAdvance(font_rid RID.Font, size int, glyph int, advance Vector2.XY)
Sets glyph advance (offset of the next glyph). [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
func (Instance) FontSetGlyphOffset ¶
func (self Instance) FontSetGlyphOffset(font_rid RID.Font, size Vector2i.XY, glyph int, offset Vector2.XY)
Sets glyph offset from the baseline.
func (Instance) FontSetGlyphSize ¶
func (self Instance) FontSetGlyphSize(font_rid RID.Font, size Vector2i.XY, glyph int, gl_size Vector2.XY)
Sets size of the glyph.
func (Instance) FontSetGlyphTextureIdx ¶
func (self Instance) FontSetGlyphTextureIdx(font_rid RID.Font, size Vector2i.XY, glyph int, texture_idx int)
Sets index of the cache texture containing the glyph.
func (Instance) FontSetGlyphUvRect ¶
func (self Instance) FontSetGlyphUvRect(font_rid RID.Font, size Vector2i.XY, glyph int, uv_rect Rect2.PositionSize)
Sets rectangle in the cache texture containing the glyph.
func (Instance) FontSetHinting ¶
func (self Instance) FontSetHinting(font_rid RID.Font, hinting gdclass.TextServerHinting)
Sets font hinting mode. Used by dynamic fonts only.
func (Instance) FontSetKerning ¶
func (self Instance) FontSetKerning(font_rid RID.Font, size int, glyph_pair Vector2i.XY, kerning Vector2.XY)
Sets kerning for the pair of glyphs.
func (Instance) FontSetLanguageSupportOverride ¶
func (self Instance) FontSetLanguageSupportOverride(font_rid RID.Font, language string, supported bool)
Adds override for [method font_is_language_supported].
func (Instance) FontSetMsdfPixelRange ¶
Sets the width of the range around the shape between the minimum and maximum representable signed distance.
func (Instance) FontSetMsdfSize ¶
Sets source font size used to generate MSDF textures.
func (Instance) FontSetMultichannelSignedDistanceField ¶
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. [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
func (Instance) FontSetName ¶
Sets the font family name.
func (Instance) FontSetOpentypeFeatureOverrides ¶
func (self Instance) FontSetOpentypeFeatureOverrides(font_rid RID.Font, overrides map[string]string)
Sets font OpenType feature set override.
func (Instance) FontSetOversampling ¶
Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
func (Instance) FontSetScale ¶
Sets scaling factor of the color bitmap font.
func (Instance) FontSetScriptSupportOverride ¶
Adds override for [method font_is_script_supported].
func (Instance) FontSetSpacing ¶
func (self Instance) FontSetSpacing(font_rid RID.Font, spacing gdclass.TextServerSpacingType, value int)
Sets the spacing for [param spacing] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size).
func (Instance) FontSetStretch ¶
Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code]. [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_transform] instead.
func (Instance) FontSetStyle ¶
func (self Instance) FontSetStyle(font_rid RID.Font, style gdclass.TextServerFontStyle)
Sets the font style flags, see [enum FontStyle]. [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], [method font_set_embolden], or [method font_set_transform] instead.
func (Instance) FontSetStyleName ¶
Sets the font style name.
func (Instance) FontSetSubpixelPositioning ¶
func (self Instance) FontSetSubpixelPositioning(font_rid RID.Font, subpixel_positioning gdclass.TextServerSubpixelPositioning)
Sets font subpixel glyph positioning mode.
func (Instance) FontSetTextureImage ¶
func (self Instance) FontSetTextureImage(font_rid RID.Font, size Vector2i.XY, texture_index int, image [1]gdclass.Image)
Sets font cache texture image data.
func (Instance) FontSetTextureOffsets ¶
func (self Instance) FontSetTextureOffsets(font_rid RID.Font, size Vector2i.XY, texture_index int, offset []int32)
Sets array containing glyph packing data.
func (Instance) FontSetTransform ¶
func (self Instance) FontSetTransform(font_rid RID.Font, transform Transform2D.OriginXY)
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
func (Instance) FontSetUnderlinePosition ¶
func (self Instance) FontSetUnderlinePosition(font_rid RID.Font, size int, underline_position Float.X)
Sets pixel offset of the underline below the baseline.
func (Instance) FontSetUnderlineThickness ¶
func (self Instance) FontSetUnderlineThickness(font_rid RID.Font, size int, underline_thickness Float.X)
Sets thickness of the underline in pixels.
func (Instance) FontSetVariationCoordinates ¶
func (self Instance) FontSetVariationCoordinates(font_rid RID.Font, variation_coordinates map[string]float32)
Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
func (Instance) FontSetWeight ¶
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]. [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_embolden] instead.
func (Instance) FontSupportedFeatureList ¶
Returns the dictionary of the supported OpenType features.
func (Instance) FontSupportedVariationList ¶
Returns the dictionary of the supported OpenType variation coordinates.
func (Instance) FormatNumber ¶
Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language]. If [param language] is omitted, the active locale will be used.
func (Instance) GetFeatures ¶
Returns text server features, see [enum Feature].
func (Instance) GetHexCodeBoxSize ¶
Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
func (Instance) GetSupportDataFilename ¶
Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
func (Instance) GetSupportDataInfo ¶
Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
func (Instance) Has ¶
Returns [code]true[/code] if [param rid] is valid resource owned by this text server.
func (Instance) HasFeature ¶
func (self Instance) HasFeature(feature gdclass.TextServerFeature) bool
Returns [code]true[/code] if the server supports a feature.
func (Instance) IsConfusable ¶
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. [b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check]. [b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
func (Instance) IsLocaleRightToLeft ¶
Returns [code]true[/code] if locale is right-to-left.
func (Instance) IsValidIdentifier ¶
Returns [code]true[/code] if [param string] is a valid identifier. If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must: - Conform to normalization form C. - Begin with a Unicode character of class XID_Start or [code]"_"[/code]. - May contain Unicode characters of class XID_Continue in the other positions. - Use UAX #31 recommended scripts only (mixed scripts are allowed). If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must: - Begin with a Unicode character of class XID_Start or [code]"_"[/code]. - May contain Unicode characters of class XID_Continue in the other positions.
func (Instance) IsValidLetter ¶
Returns [code]true[/code] if the given code point is a valid letter, i.e. it belongs to the Unicode category "L".
func (Instance) LoadSupportData ¶
Loads optional TextServer database (e.g. ICU break iterators and dictionaries). [b]Note:[/b] This function should be called before any other TextServer functions used, otherwise it won't have any effect.
func (Instance) NameToTag ¶
Converts readable feature, variation, script, or language name to OpenType tag.
func (Instance) ParseNumber ¶
Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9).
func (Instance) ParseStructuredText ¶
func (self Instance) ParseStructuredText(parser_type gdclass.TextServerStructuredTextParser, args []any, text string) []Vector3i.XYZ
Default implementation of the BiDi algorithm override function. See [enum StructuredTextParser] for more info.
func (Instance) PercentSign ¶
Returns percent sign used in the [param language].
func (Instance) SaveSupportData ¶
Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. [b]Note:[/b] This function is used by during project export, to include TextServer database.
func (Instance) ShapedGetSpanCount ¶
func (self Instance) ShapedGetSpanCount(shaped RID.TextBuffer) int
Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
func (Instance) ShapedGetSpanMeta ¶
func (self Instance) ShapedGetSpanMeta(shaped RID.TextBuffer, index int) any
Returns text span metadata.
func (Instance) ShapedSetSpanUpdateFont ¶
func (self Instance) ShapedSetSpanUpdateFont(shaped RID.TextBuffer, index int, fonts [][]RID.Font, size int)
Changes text span font, font size, and OpenType features, without changing the text.
func (Instance) ShapedTextAddObject ¶
Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
func (Instance) ShapedTextAddString ¶
func (self Instance) ShapedTextAddString(shaped RID.TextBuffer, text string, fonts []RID.TextBuffer, size int) bool
Adds text span and font to draw it to the text buffer.
func (Instance) ShapedTextClear ¶
func (self Instance) ShapedTextClear(rid RID.TextBuffer)
Clears text buffer (removes text and inline objects).
func (Instance) ShapedTextClosestCharacterPos ¶
func (self Instance) ShapedTextClosestCharacterPos(shaped RID.TextBuffer, pos int) int
Returns composite character position closest to the [param pos].
func (Instance) ShapedTextDraw ¶
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).
func (Instance) ShapedTextDrawOutline ¶
func (self Instance) ShapedTextDrawOutline(shaped RID.TextBuffer, canvas RID.Canvas, pos Vector2.XY)
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).
func (Instance) ShapedTextFitToWidth ¶
Adjusts text width to fit to specified width, returns new text width.
func (Instance) ShapedTextGetAscent ¶
func (self Instance) ShapedTextGetAscent(shaped RID.TextBuffer) Float.X
Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). [b]Note:[/b] Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
func (Instance) ShapedTextGetCarets ¶
func (self Instance) ShapedTextGetCarets(shaped RID.TextBuffer, position int) map[int]struct { X float32 Y float32 }
Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.
func (Instance) ShapedTextGetCharacterBreaks ¶
func (self Instance) ShapedTextGetCharacterBreaks(shaped RID.TextBuffer) []int32
Returns array of the composite character boundaries.
func (Instance) ShapedTextGetCustomEllipsis ¶
func (self Instance) ShapedTextGetCustomEllipsis(shaped RID.TextBuffer) int
Returns ellipsis character used for text clipping.
func (Instance) ShapedTextGetCustomPunctuation ¶
func (self Instance) ShapedTextGetCustomPunctuation(shaped RID.TextBuffer) string
Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
func (Instance) ShapedTextGetDescent ¶
func (self Instance) ShapedTextGetDescent(shaped RID.TextBuffer) Float.X
Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). [b]Note:[/b] Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
func (Instance) ShapedTextGetDirection ¶
func (self Instance) ShapedTextGetDirection(shaped RID.TextBuffer) gdclass.TextServerDirection
Returns direction of the text.
func (Instance) ShapedTextGetDominantDirectionInRange ¶
func (self Instance) ShapedTextGetDominantDirectionInRange(shaped RID.TextBuffer, start int, end int) gdclass.TextServerDirection
Returns dominant direction of in the range of text.
func (Instance) ShapedTextGetEllipsisGlyphCount ¶
func (self Instance) ShapedTextGetEllipsisGlyphCount(shaped RID.TextBuffer) int
Returns number of glyphs in the ellipsis.
func (Instance) ShapedTextGetEllipsisGlyphs ¶
func (self Instance) ShapedTextGetEllipsisGlyphs(shaped RID.TextBuffer) []map[int]struct { X float32 Y float32 }
Returns array of the glyphs in the ellipsis.
func (Instance) ShapedTextGetEllipsisPos ¶
func (self Instance) ShapedTextGetEllipsisPos(shaped RID.TextBuffer) int
Returns position of the ellipsis.
func (Instance) ShapedTextGetGlyphCount ¶
func (self Instance) ShapedTextGetGlyphCount(shaped RID.TextBuffer) int
Returns number of glyphs in the buffer.
func (Instance) ShapedTextGetGlyphs ¶
func (self Instance) ShapedTextGetGlyphs(shaped RID.TextBuffer) []map[int]struct { X float32 Y float32 }
Returns an array of glyphs in the visual order.
func (Instance) ShapedTextGetGraphemeBounds ¶
Returns composite character's bounds as offsets from the start of the line.
func (Instance) ShapedTextGetInferredDirection ¶
func (self Instance) ShapedTextGetInferredDirection(shaped RID.TextBuffer) gdclass.TextServerDirection
Returns direction of the text, inferred by the BiDi algorithm.
func (Instance) ShapedTextGetLineBreaks ¶
Breaks text to the lines and returns character ranges for each line.
func (Instance) ShapedTextGetLineBreaksAdv ¶
func (self Instance) ShapedTextGetLineBreaksAdv(shaped RID.TextBuffer, width []float32) []int32
Breaks text to the lines and columns. Returns character ranges for each segment.
func (Instance) ShapedTextGetObjectGlyph ¶
func (self Instance) ShapedTextGetObjectGlyph(shaped RID.TextBuffer, key any) int
Returns the glyph index of the inline object.
func (Instance) ShapedTextGetObjectRange ¶
Returns the character range of the inline object.
func (Instance) ShapedTextGetObjectRect ¶
func (self Instance) ShapedTextGetObjectRect(shaped RID.TextBuffer, key any) Rect2.PositionSize
Returns bounding rectangle of the inline object.
func (Instance) ShapedTextGetObjects ¶
func (self Instance) ShapedTextGetObjects(shaped RID.TextBuffer) []any
Returns array of inline objects.
func (Instance) ShapedTextGetOrientation ¶
func (self Instance) ShapedTextGetOrientation(shaped RID.TextBuffer) gdclass.TextServerOrientation
Returns text orientation.
func (Instance) ShapedTextGetParent ¶
func (self Instance) ShapedTextGetParent(shaped RID.TextBuffer) RID.TextBuffer
Returns the parent buffer from which the substring originates.
func (Instance) ShapedTextGetPreserveControl ¶
func (self Instance) ShapedTextGetPreserveControl(shaped RID.TextBuffer) bool
Returns [code]true[/code] if text buffer is configured to display control characters.
func (Instance) ShapedTextGetPreserveInvalid ¶
func (self Instance) ShapedTextGetPreserveInvalid(shaped RID.TextBuffer) bool
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters. [b]Note:[/b] If set to [code]false[/code], nothing is displayed in place of invalid characters.
func (Instance) ShapedTextGetRange ¶
func (self Instance) ShapedTextGetRange(shaped RID.TextBuffer) Vector2i.XY
Returns substring buffer character range in the parent buffer.
func (Instance) ShapedTextGetSelection ¶
Returns selection rectangles for the specified character range.
func (Instance) ShapedTextGetSize ¶
func (self Instance) ShapedTextGetSize(shaped RID.TextBuffer) Vector2.XY
Returns size of the text.
func (Instance) ShapedTextGetSpacing ¶
func (self Instance) ShapedTextGetSpacing(shaped RID.TextBuffer, spacing gdclass.TextServerSpacingType) int
Returns extra spacing added between glyphs or lines in pixels.
func (Instance) ShapedTextGetTrimPos ¶
func (self Instance) ShapedTextGetTrimPos(shaped RID.TextBuffer) int
Returns the position of the overrun trim.
func (Instance) ShapedTextGetUnderlinePosition ¶
func (self Instance) ShapedTextGetUnderlinePosition(shaped RID.TextBuffer) Float.X
Returns pixel offset of the underline below the baseline.
func (Instance) ShapedTextGetUnderlineThickness ¶
func (self Instance) ShapedTextGetUnderlineThickness(shaped RID.TextBuffer) Float.X
Returns thickness of the underline.
func (Instance) ShapedTextGetWidth ¶
func (self Instance) ShapedTextGetWidth(shaped RID.TextBuffer) Float.X
Returns width (for horizontal layout) or height (for vertical) of the text.
func (Instance) ShapedTextGetWordBreaks ¶
func (self Instance) ShapedTextGetWordBreaks(shaped RID.TextBuffer) []int32
Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum GraphemeFlag]).
func (Instance) ShapedTextHasVisibleChars ¶
func (self Instance) ShapedTextHasVisibleChars(shaped RID.TextBuffer) bool
Returns [code]true[/code] if text buffer contains any visible characters.
func (Instance) ShapedTextHitTestGrapheme ¶
Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
func (Instance) ShapedTextHitTestPosition ¶
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
func (Instance) ShapedTextIsReady ¶
func (self Instance) ShapedTextIsReady(shaped RID.TextBuffer) bool
Returns [code]true[/code] if buffer is successfully shaped.
func (Instance) ShapedTextNextCharacterPos ¶
func (self Instance) ShapedTextNextCharacterPos(shaped RID.TextBuffer, pos int) int
Returns composite character end position closest to the [param pos].
func (Instance) ShapedTextNextGraphemePos ¶
func (self Instance) ShapedTextNextGraphemePos(shaped RID.TextBuffer, pos int) int
Returns grapheme end position closest to the [param pos].
func (Instance) ShapedTextOverrunTrimToWidth ¶
func (self Instance) ShapedTextOverrunTrimToWidth(shaped RID.TextBuffer)
Trims text if it exceeds the given width.
func (Instance) ShapedTextPrevCharacterPos ¶
func (self Instance) ShapedTextPrevCharacterPos(shaped RID.TextBuffer, pos int) int
Returns composite character start position closest to the [param pos].
func (Instance) ShapedTextPrevGraphemePos ¶
func (self Instance) ShapedTextPrevGraphemePos(shaped RID.TextBuffer, pos int) int
Returns grapheme start position closest to the [param pos].
func (Instance) ShapedTextResizeObject ¶
Sets new size and alignment of embedded object.
func (Instance) ShapedTextSetBidiOverride ¶
func (self Instance) ShapedTextSetBidiOverride(shaped RID.TextBuffer, override []any)
Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
func (Instance) ShapedTextSetCustomEllipsis ¶
func (self Instance) ShapedTextSetCustomEllipsis(shaped RID.TextBuffer, char int)
Sets ellipsis character used for text clipping.
func (Instance) ShapedTextSetCustomPunctuation ¶
func (self Instance) ShapedTextSetCustomPunctuation(shaped RID.TextBuffer, punct string)
Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
func (Instance) ShapedTextSetDirection ¶
func (self Instance) ShapedTextSetDirection(shaped RID.TextBuffer)
Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale. [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
func (Instance) ShapedTextSetOrientation ¶
func (self Instance) ShapedTextSetOrientation(shaped RID.TextBuffer)
Sets desired text orientation. [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
func (Instance) ShapedTextSetPreserveControl ¶
func (self Instance) ShapedTextSetPreserveControl(shaped RID.TextBuffer, enabled bool)
If set to [code]true[/code] text buffer will display control characters.
func (Instance) ShapedTextSetPreserveInvalid ¶
func (self Instance) ShapedTextSetPreserveInvalid(shaped RID.TextBuffer, enabled bool)
If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
func (Instance) ShapedTextSetSpacing ¶
func (self Instance) ShapedTextSetSpacing(shaped RID.TextBuffer, spacing gdclass.TextServerSpacingType, value int)
Sets extra spacing added between glyphs or lines in pixels.
func (Instance) ShapedTextShape ¶
func (self Instance) ShapedTextShape(shaped RID.TextBuffer) bool
Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully. [b]Note:[/b] It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
func (Instance) ShapedTextSortLogical ¶
func (self Instance) ShapedTextSortLogical(shaped RID.TextBuffer) []map[int]int
Returns text glyphs in the logical order.
func (Instance) ShapedTextSubstr ¶
func (self Instance) ShapedTextSubstr(shaped RID.TextBuffer, start int, length int) RID.TextBuffer
Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).
func (Instance) ShapedTextTabAlign ¶
Aligns shaped text to the given tab-stops.
func (Instance) SpoofCheck ¶
Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader. [b]Note:[/b] Always returns [code]false[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
func (Instance) StringGetCharacterBreaks ¶
Returns array of the composite character boundaries. [codeblock] var ts = TextServerManager.get_primary_interface() print(ts.string_get_word_breaks("Test ❤️🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14] [/codeblock]
func (Instance) StringGetWordBreaks ¶
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. When [param chars_per_line] is greater than zero, line break boundaries are returned instead. [codeblock] var ts = TextServerManager.get_primary_interface() print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19], which corresponds to the following substrings: "The", "Godot", "Engine", "4" print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19], which corresponds to the following substrings: "The", "Godot", "Engin", "e, 4" print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19], which corresponds to the following substrings: "The Godot", "Engine, 4" [/codeblock]
func (Instance) StringToLower ¶
Returns the string converted to lowercase. [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]). [b]Note:[/b] The result may be longer or shorter than the original.
func (Instance) StringToTitle ¶
Returns the string converted to title case. [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]). [b]Note:[/b] The result may be longer or shorter than the original.
func (Instance) StringToUpper ¶
Returns the string converted to uppercase. [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]). [b]Note:[/b] The result may be longer or shorter than the original.
func (Instance) StripDiacritics ¶
Strips diacritics from the string. [b]Note:[/b] The result may be longer or shorter than the original.
func (Instance) TagToName ¶
Converts OpenType tag to readable feature, variation, script, or language name.
func (*Instance) UnsafePointer ¶
type JustificationFlag ¶
type JustificationFlag = gdclass.TextServerJustificationFlag //gd:TextServer.JustificationFlag
const ( /*Do not justify text.*/ JustificationNone JustificationFlag = 0 /*Justify text by adding and removing kashidas.*/ JustificationKashida JustificationFlag = 1 /*Justify text by changing width of the spaces between the words.*/ JustificationWordBound JustificationFlag = 2 /*Remove trailing and leading spaces from the justified text.*/ JustificationTrimEdgeSpaces JustificationFlag = 4 /*Only apply justification to the part of the text after the last tab.*/ JustificationAfterLastTab JustificationFlag = 8 /*Apply justification to the trimmed line with ellipsis.*/ JustificationConstrainEllipsis JustificationFlag = 16 /*Do not apply justification to the last line of the paragraph.*/ JustificationSkipLastLine JustificationFlag = 32 /*Do not apply justification to the last line of the paragraph with visible characters (takes precedence over [constant JUSTIFICATION_SKIP_LAST_LINE]).*/ JustificationSkipLastLineWithVisibleChars JustificationFlag = 64 /*Always apply justification to the paragraphs with a single line ([constant JUSTIFICATION_SKIP_LAST_LINE] and [constant JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS] are ignored).*/ JustificationDoNotSkipSingleLine JustificationFlag = 128 )
type LineBreakFlag ¶
type LineBreakFlag = gdclass.TextServerLineBreakFlag //gd:TextServer.LineBreakFlag
const ( /*Do not break the line.*/ BreakNone LineBreakFlag = 0 /*Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).*/ BreakMandatory LineBreakFlag = 1 /*Break the line between the words.*/ BreakWordBound LineBreakFlag = 2 /*Break the line between any unconnected graphemes.*/ BreakGraphemeBound LineBreakFlag = 4 /*Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words.*/ BreakAdaptive LineBreakFlag = 8 /*Remove edge spaces from the broken line segments.*/ BreakTrimEdgeSpaces LineBreakFlag = 16 /*Subtract first line indentation width from all lines after the first one.*/ BreakTrimIndent LineBreakFlag = 32 )
type Orientation ¶
type Orientation = gdclass.TextServerOrientation //gd:TextServer.Orientation
const ( /*Text is written horizontally.*/ OrientationHorizontal Orientation = 0 /*Left to right text is written vertically from top to bottom. Right to left text is written vertically from bottom to top.*/ OrientationVertical Orientation = 1 )
type OverrunBehavior ¶
type OverrunBehavior = gdclass.TextServerOverrunBehavior //gd:TextServer.OverrunBehavior
const ( /*No text trimming is performed.*/ OverrunNoTrimming OverrunBehavior = 0 /*Trims the text per character.*/ OverrunTrimChar OverrunBehavior = 1 /*Trims the text per word.*/ OverrunTrimWord OverrunBehavior = 2 /*Trims the text per character and adds an ellipsis to indicate that parts are hidden.*/ OverrunTrimEllipsis OverrunBehavior = 3 /*Trims the text per word and adds an ellipsis to indicate that parts are hidden.*/ OverrunTrimWordEllipsis OverrunBehavior = 4 )
type SpacingType ¶
type SpacingType = gdclass.TextServerSpacingType //gd:TextServer.SpacingType
const ( /*Spacing for each glyph.*/ SpacingGlyph SpacingType = 0 /*Spacing for the space character.*/ SpacingSpace SpacingType = 1 /*Spacing at the top of the line.*/ SpacingTop SpacingType = 2 /*Spacing at the bottom of the line.*/ SpacingBottom SpacingType = 3 /*Represents the size of the [enum SpacingType] enum.*/ SpacingMax SpacingType = 4 )
type StructuredTextParser ¶
type StructuredTextParser = gdclass.TextServerStructuredTextParser //gd:TextServer.StructuredTextParser
const ( /*Use default Unicode BiDi algorithm.*/ StructuredTextDefault StructuredTextParser = 0 /*BiDi override for URI.*/ StructuredTextUri StructuredTextParser = 1 /*BiDi override for file path.*/ StructuredTextFile StructuredTextParser = 2 /*BiDi override for email.*/ StructuredTextEmail StructuredTextParser = 3 /*BiDi override for lists. Structured text options: list separator [String].*/ StructuredTextList StructuredTextParser = 4 /*BiDi override for GDScript.*/ StructuredTextGdscript StructuredTextParser = 5 /*User defined structured text BiDi override function.*/ StructuredTextCustom StructuredTextParser = 6 )
type SubpixelPositioning ¶
type SubpixelPositioning = gdclass.TextServerSubpixelPositioning //gd:TextServer.SubpixelPositioning
const ( /*Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.*/ SubpixelPositioningDisabled SubpixelPositioning = 0 /*Glyph horizontal position is rounded based on font size. - To one quarter of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE]. - To one half of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE]. - To the whole pixel size for larger fonts.*/ SubpixelPositioningAuto SubpixelPositioning = 1 /*Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.*/ SubpixelPositioningOneHalf SubpixelPositioning = 2 /*Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.*/ SubpixelPositioningOneQuarter SubpixelPositioning = 3 /*Maximum font size which will use one half of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.*/ SubpixelPositioningOneHalfMaxSize SubpixelPositioning = 20 /*Maximum font size which will use one quarter of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.*/ SubpixelPositioningOneQuarterMaxSize SubpixelPositioning = 16 )
type TextOverrunFlag ¶
type TextOverrunFlag = gdclass.TextServerTextOverrunFlag //gd:TextServer.TextOverrunFlag
const ( /*No trimming is performed.*/ OverrunNoTrim TextOverrunFlag = 0 /*Trims the text when it exceeds the given width.*/ OverrunTrim TextOverrunFlag = 1 /*Trims the text per word instead of per grapheme.*/ OverrunTrimWordOnly TextOverrunFlag = 2 /*Determines whether an ellipsis should be added at the end of the text.*/ OverrunAddEllipsis TextOverrunFlag = 4 /*Determines whether the ellipsis at the end of the text is enforced and may not be hidden.*/ OverrunEnforceEllipsis TextOverrunFlag = 8 /*Accounts for the text being justified before attempting to trim it (see [enum JustificationFlag]).*/ OverrunJustificationAware TextOverrunFlag = 16 )
type VisibleCharactersBehavior ¶
type VisibleCharactersBehavior = gdclass.TextServerVisibleCharactersBehavior //gd:TextServer.VisibleCharactersBehavior
const ( /*Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.*/ VcCharsBeforeShaping VisibleCharactersBehavior = 0 /*Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.*/ VcCharsAfterShaping VisibleCharactersBehavior = 1 /*Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.*/ VcGlyphsAuto VisibleCharactersBehavior = 2 /*Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left.*/ VcGlyphsLtr VisibleCharactersBehavior = 3 /*Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the right.*/ VcGlyphsRtl VisibleCharactersBehavior = 4 )