class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCountedTextServer TextServerExtension
Base class for custom TextServer implementations (plugins).

External TextServer implementations should inherit from this class.

void _cleanup<>():void

Optional.

This method is called before text server is unregistered.

RID _create_font<>():RID

Required.

Creates a new, empty font cache entry resource.

RID _create_font_linked_variation<>( RID font_rid=, font_rid:RID=, ):RID

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

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

RID _create_shaped_text<>( Direction direction=, direction:Direction=, Orientation orientation=, orientation:Orientation=, ):RID

Required.

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

void _draw_hex_code_box<>( RID canvas=, canvas:RID=, int size=, size:int=, Vector2 pos=, pos:Vector2=, int index=, index:int=, Color color=, color:Color=, ):void

Optional.

Draws box displaying character hexadecimal code.

void _font_clear_glyphs<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, ):void

Required.

Removes all rendered glyph information from the cache entry.

void _font_clear_kerning_map<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):void

Optional.

Removes all kerning overrides.

void _font_clear_size_cache<>( RID font_rid=, font_rid:RID=, ):void

Required.

Removes all font sizes from the cache entry.

void _font_clear_textures<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, ):void

Required.

Removes all textures from font cache entry.

void _font_draw_glyph<>( RID font_rid=, font_rid:RID=, RID canvas=, canvas:RID=, int size=, size:int=, Vector2 pos=, pos:Vector2=, int index=, index:int=, Color color=, color:Color=, ):void

Required.

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

void _font_draw_glyph_outline<>( RID font_rid=, font_rid:RID=, RID canvas=, canvas:RID=, int size=, size:int=, int outline_size=, outline_size:int=, Vector2 pos=, pos:Vector2=, int index=, index:int=, Color color=, color:Color=, ):void

Required.

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

FontAntialiasing _font_get_antialiasing<>( RID font_rid=, font_rid:RID=, ):FontAntialiasing

Optional.

Returns font anti-aliasing mode.

float _font_get_ascent<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):float

Required.

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

float _font_get_baseline_offset<>( RID font_rid=, font_rid:RID=, ):float

Optional.

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

int _font_get_char_from_glyph_index<>( RID font_rid=, font_rid:RID=, int size=, size:int=, int glyph_index=, glyph_index:int=, ):int

Required.

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

float _font_get_descent<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):float

Required.

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

bool _font_get_disable_embedded_bitmaps<>( RID font_rid=, font_rid:RID=, ):bool

Optional.

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

float _font_get_embolden<>( RID font_rid=, font_rid:RID=, ):float

Optional.

Returns font embolden strength.

int _font_get_face_count<>( RID font_rid=, font_rid:RID=, ):int

Optional.

Returns number of faces in the TrueType / OpenType collection.

int _font_get_face_index<>( RID font_rid=, font_rid:RID=, ):int

Optional.

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

int _font_get_fixed_size<>( RID font_rid=, font_rid:RID=, ):int

Required.

Returns bitmap font fixed size.

FixedSizeScaleMode _font_get_fixed_size_scale_mode<>( RID font_rid=, font_rid:RID=, ):FixedSizeScaleMode

Required.

Returns bitmap font scaling mode.

bool _font_get_generate_mipmaps<>( RID font_rid=, font_rid:RID=, ):bool

Optional.

Returns true if font texture mipmap generation is enabled.

float _font_get_global_oversampling<>():float

Optional.

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

Vector2 _font_get_glyph_advance<>( RID font_rid=, font_rid:RID=, int size=, size:int=, int glyph=, glyph:int=, ):Vector2

Required.

Returns glyph advance (offset of the next glyph).

Dictionary _font_get_glyph_contours<>( RID font_rid=, font_rid:RID=, int size=, size:int=, int index=, index:int=, ):Dictionary

Optional.

Returns outline contours of the glyph.

int _font_get_glyph_index<>( RID font_rid=, font_rid:RID=, int size=, size:int=, int char=, char:int=, int variation_selector=, variation_selector:int=, ):int

Required.

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

PackedInt32Array _font_get_glyph_list<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, ):PackedInt32Array

Required.

Returns list of rendered glyphs in the cache entry.

Vector2 _font_get_glyph_offset<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):Vector2

Required.

Returns glyph offset from the baseline.

Vector2 _font_get_glyph_size<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):Vector2

Required.

Returns size of the glyph.

int _font_get_glyph_texture_idx<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):int

Required.

Returns index of the cache texture containing the glyph.

RID _font_get_glyph_texture_rid<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):RID

Required.

Returns resource ID of the cache texture containing the glyph.

Vector2 _font_get_glyph_texture_size<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):Vector2

Required.

Returns size of the cache texture containing the glyph.

Rect2 _font_get_glyph_uv_rect<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):Rect2

Required.

Returns rectangle in the cache texture containing the glyph.

Hinting _font_get_hinting<>( RID font_rid=, font_rid:RID=, ):Hinting

Optional.

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

bool _font_get_keep_rounding_remainders<>( RID font_rid=, font_rid:RID=, ):bool

Optional.

Returns glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

Vector2 _font_get_kerning<>( RID font_rid=, font_rid:RID=, int size=, size:int=, Vector2i glyph_pair=, glyph_pair:Vector2i=, ):Vector2

Optional.

Returns kerning for the pair of glyphs.

Array _font_get_kerning_list<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):Array

Optional.

Returns list of the kerning overrides.

bool _font_get_language_support_override<>( RID font_rid=, font_rid:RID=, String language=, language:String=, ):bool

Optional.

Returns true if support override is enabled for the language.

PackedStringArray _font_get_language_support_overrides<>( RID font_rid=, font_rid:RID=, ):PackedStringArray

Optional.

Returns list of language support overrides.

int _font_get_msdf_pixel_range<>( RID font_rid=, font_rid:RID=, ):int

Optional.

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

int _font_get_msdf_size<>( RID font_rid=, font_rid:RID=, ):int

Optional.

Returns source font size used to generate MSDF textures.

String _font_get_name<>( RID font_rid=, font_rid:RID=, ):String

Optional.

Returns font family name.

Dictionary _font_get_opentype_feature_overrides<>( RID font_rid=, font_rid:RID=, ):Dictionary

Optional.

Returns font OpenType feature set override.

Dictionary _font_get_ot_name_strings<>( RID font_rid=, font_rid:RID=, ):Dictionary

Optional.

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

float _font_get_oversampling<>( RID font_rid=, font_rid:RID=, ):float

Optional.

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

float _font_get_scale<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):float

Required.

Returns scaling factor of the color bitmap font.

bool _font_get_script_support_override<>( RID font_rid=, font_rid:RID=, String script=, script:String=, ):bool

Optional.

Returns true if support override is enabled for the script.

PackedStringArray _font_get_script_support_overrides<>( RID font_rid=, font_rid:RID=, ):PackedStringArray

Optional.

Returns list of script support overrides.

Array _font_get_size_cache_list<>( RID font_rid=, font_rid:RID=, ):Array

Required.

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

int _font_get_spacing<>( RID font_rid=, font_rid:RID=, SpacingType spacing=, spacing:SpacingType=, ):int

Optional.

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

int _font_get_stretch<>( RID font_rid=, font_rid:RID=, ):int

Optional.

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

BitField _font_get_style<>( RID font_rid=, font_rid:RID=, ):BitField

Optional.

Returns font style flags, see FontStyle.

String _font_get_style_name<>( RID font_rid=, font_rid:RID=, ):String

Optional.

Returns font style name.

SubpixelPositioning _font_get_subpixel_positioning<>( RID font_rid=, font_rid:RID=, ):SubpixelPositioning

Optional.

Returns font subpixel glyph positioning mode.

String _font_get_supported_chars<>( RID font_rid=, font_rid:RID=, ):String

Required.

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

PackedInt32Array _font_get_supported_glyphs<>( RID font_rid=, font_rid:RID=, ):PackedInt32Array

Required.

Returns an array containing all glyph indices in the font.

int _font_get_texture_count<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, ):int

Required.

Returns number of textures used by font cache entry.

Image _font_get_texture_image<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int texture_index=, texture_index:int=, ):Image

Required.

Returns font cache texture image data.

PackedInt32Array _font_get_texture_offsets<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int texture_index=, texture_index:int=, ):PackedInt32Array

Optional.

Returns array containing glyph packing data.

Transform2D _font_get_transform<>( RID font_rid=, font_rid:RID=, ):Transform2D

Optional.

Returns 2D transform applied to the font outlines.

float _font_get_underline_position<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):float

Required.

Returns pixel offset of the underline below the baseline.

float _font_get_underline_thickness<>( RID font_rid=, font_rid:RID=, int size=, size:int=, ):float

Required.

Returns thickness of the underline in pixels.

Dictionary _font_get_variation_coordinates<>( RID font_rid=, font_rid:RID=, ):Dictionary

Optional.

Returns variation coordinates for the specified font cache entry.

int _font_get_weight<>( RID font_rid=, font_rid:RID=, ):int

Optional.

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

bool _font_has_char<>( RID font_rid=, font_rid:RID=, int char=, char:int=, ):bool

Required.

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

bool _font_is_allow_system_fallback<>( RID font_rid=, font_rid:RID=, ):bool

Optional.

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

bool _font_is_force_autohinter<>( RID font_rid=, font_rid:RID=, ):bool

Optional.

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

bool _font_is_language_supported<>( RID font_rid=, font_rid:RID=, String language=, language:String=, ):bool

Optional.

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

bool _font_is_multichannel_signed_distance_field<>( RID font_rid=, font_rid:RID=, ):bool

Optional.

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

bool _font_is_script_supported<>( RID font_rid=, font_rid:RID=, String script=, script:String=, ):bool

Optional.

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

void _font_remove_glyph<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, ):void

Required.

Removes specified rendered glyph information from the cache entry.

void _font_remove_kerning<>( RID font_rid=, font_rid:RID=, int size=, size:int=, Vector2i glyph_pair=, glyph_pair:Vector2i=, ):void

Optional.

Removes kerning override for the pair of glyphs.

void _font_remove_language_support_override<>( RID font_rid=, font_rid:RID=, String language=, language:String=, ):void

Optional.

Remove language support override.

void _font_remove_script_support_override<>( RID font_rid=, font_rid:RID=, String script=, script:String=, ):void

Optional.

Removes script support override.

void _font_remove_size_cache<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, ):void

Required.

Removes specified font size from the cache entry.

void _font_remove_texture<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int texture_index=, texture_index:int=, ):void

Required.

Removes specified texture from the cache entry.

void _font_render_glyph<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int index=, index:int=, ):void

Optional.

Renders specified glyph to the font cache texture.

void _font_render_range<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int start=, start:int=, int end=, end:int=, ):void

Optional.

Renders the range of characters to the font cache texture.

void _font_set_allow_system_fallback<>( RID font_rid=, font_rid:RID=, bool allow_system_fallback=, allow_system_fallback:bool=, ):void

Optional.

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

void _font_set_antialiasing<>( RID font_rid=, font_rid:RID=, FontAntialiasing antialiasing=, antialiasing:FontAntialiasing=, ):void

Optional.

Sets font anti-aliasing mode.

void _font_set_ascent<>( RID font_rid=, font_rid:RID=, int size=, size:int=, float ascent=, ascent:float=, ):void

Required.

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

void _font_set_baseline_offset<>( RID font_rid=, font_rid:RID=, float baseline_offset=, baseline_offset:float=, ):void

Optional.

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

void _font_set_data<>( RID font_rid=, font_rid:RID=, PackedByteArray data=, data:PackedByteArray=, ):void

Optional.

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

void _font_set_data_ptr<>( RID font_rid=, font_rid:RID=, =, :=, int data_size=, data_size:int=, ):void

Optional.

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

void _font_set_descent<>( RID font_rid=, font_rid:RID=, int size=, size:int=, float descent=, descent:float=, ):void

Required.

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

void _font_set_disable_embedded_bitmaps<>( RID font_rid=, font_rid:RID=, bool disable_embedded_bitmaps=, disable_embedded_bitmaps:bool=, ):void

Optional.

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

void _font_set_embolden<>( RID font_rid=, font_rid:RID=, float strength=, strength:float=, ):void

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

void _font_set_face_index<>( RID font_rid=, font_rid:RID=, int face_index=, face_index:int=, ):void

Optional.

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

void _font_set_fixed_size<>( RID font_rid=, font_rid:RID=, int fixed_size=, fixed_size:int=, ):void

Required.

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

void _font_set_fixed_size_scale_mode<>( RID font_rid=, font_rid:RID=, FixedSizeScaleMode fixed_size_scale_mode=, fixed_size_scale_mode:FixedSizeScaleMode=, ):void

Required.

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

void _font_set_force_autohinter<>( RID font_rid=, font_rid:RID=, bool force_autohinter=, force_autohinter:bool=, ):void

Optional.

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

void _font_set_generate_mipmaps<>( RID font_rid=, font_rid:RID=, bool generate_mipmaps=, generate_mipmaps:bool=, ):void

Optional.

If set to true font texture mipmap generation is enabled.

void _font_set_global_oversampling<>( float oversampling=, oversampling:float=, ):void

Optional.

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

void _font_set_glyph_advance<>( RID font_rid=, font_rid:RID=, int size=, size:int=, int glyph=, glyph:int=, Vector2 advance=, advance:Vector2=, ):void

Required.

Sets glyph advance (offset of the next glyph).

void _font_set_glyph_offset<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, Vector2 offset=, offset:Vector2=, ):void

Required.

Sets glyph offset from the baseline.

void _font_set_glyph_size<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, Vector2 gl_size=, gl_size:Vector2=, ):void

Required.

Sets size of the glyph.

void _font_set_glyph_texture_idx<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, int texture_idx=, texture_idx:int=, ):void

Required.

Sets index of the cache texture containing the glyph.

void _font_set_glyph_uv_rect<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int glyph=, glyph:int=, Rect2 uv_rect=, uv_rect:Rect2=, ):void

Required.

Sets rectangle in the cache texture containing the glyph.

void _font_set_hinting<>( RID font_rid=, font_rid:RID=, Hinting hinting=, hinting:Hinting=, ):void

Optional.

Sets font hinting mode. Used by dynamic fonts only.

void _font_set_keep_rounding_remainders<>( RID font_rid=, font_rid:RID=, bool keep_rounding_remainders=, keep_rounding_remainders:bool=, ):void

Optional.

Sets glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

void _font_set_kerning<>( RID font_rid=, font_rid:RID=, int size=, size:int=, Vector2i glyph_pair=, glyph_pair:Vector2i=, Vector2 kerning=, kerning:Vector2=, ):void

Optional.

Sets kerning for the pair of glyphs.

void _font_set_language_support_override<>( RID font_rid=, font_rid:RID=, String language=, language:String=, bool supported=, supported:bool=, ):void

Optional.

Adds override for _font_is_language_supported().

void _font_set_msdf_pixel_range<>( RID font_rid=, font_rid:RID=, int msdf_pixel_range=, msdf_pixel_range:int=, ):void

Optional.

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

void _font_set_msdf_size<>( RID font_rid=, font_rid:RID=, int msdf_size=, msdf_size:int=, ):void

Optional.

Sets source font size used to generate MSDF textures.

void _font_set_multichannel_signed_distance_field<>( RID font_rid=, font_rid:RID=, bool msdf=, msdf:bool=, ):void

Optional.

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

void _font_set_name<>( RID font_rid=, font_rid:RID=, String name=, name:String=, ):void

Optional.

Sets the font family name.

void _font_set_opentype_feature_overrides<>( RID font_rid=, font_rid:RID=, Dictionary overrides=, overrides:Dictionary=, ):void

Optional.

Sets font OpenType feature set override.

void _font_set_oversampling<>( RID font_rid=, font_rid:RID=, float oversampling=, oversampling:float=, ):void

Optional.

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

void _font_set_scale<>( RID font_rid=, font_rid:RID=, int size=, size:int=, float scale=, scale:float=, ):void

Required.

Sets scaling factor of the color bitmap font.

void _font_set_script_support_override<>( RID font_rid=, font_rid:RID=, String script=, script:String=, bool supported=, supported:bool=, ):void

Optional.

Adds override for _font_is_script_supported().

void _font_set_spacing<>( RID font_rid=, font_rid:RID=, SpacingType spacing=, spacing:SpacingType=, int value=, value:int=, ):void

Optional.

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

void _font_set_stretch<>( RID font_rid=, font_rid:RID=, int stretch=, stretch:int=, ):void

Optional.

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

void _font_set_style<>( RID font_rid=, font_rid:RID=, =, :=, ):void

Optional.

Sets the font style flags, see FontStyle.

void _font_set_style_name<>( RID font_rid=, font_rid:RID=, String name_style=, name_style:String=, ):void

Optional.

Sets the font style name.

void _font_set_subpixel_positioning<>( RID font_rid=, font_rid:RID=, SubpixelPositioning subpixel_positioning=, subpixel_positioning:SubpixelPositioning=, ):void

Optional.

Sets font subpixel glyph positioning mode.

void _font_set_texture_image<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int texture_index=, texture_index:int=, Image image=, image:Image=, ):void

Required.

Sets font cache texture image data.

void _font_set_texture_offsets<>( RID font_rid=, font_rid:RID=, Vector2i size=, size:Vector2i=, int texture_index=, texture_index:int=, PackedInt32Array offset=, offset:PackedInt32Array=, ):void

Optional.

Sets array containing glyph packing data.

void _font_set_transform<>( RID font_rid=, font_rid:RID=, Transform2D transform=, transform:Transform2D=, ):void

Optional.

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

void _font_set_underline_position<>( RID font_rid=, font_rid:RID=, int size=, size:int=, float underline_position=, underline_position:float=, ):void

Required.

Sets pixel offset of the underline below the baseline.

void _font_set_underline_thickness<>( RID font_rid=, font_rid:RID=, int size=, size:int=, float underline_thickness=, underline_thickness:float=, ):void

Required.

Sets thickness of the underline in pixels.

void _font_set_variation_coordinates<>( RID font_rid=, font_rid:RID=, Dictionary variation_coordinates=, variation_coordinates:Dictionary=, ):void

Optional.

Sets variation coordinates for the specified font cache entry.

void _font_set_weight<>( RID font_rid=, font_rid:RID=, int weight=, weight:int=, ):void

Optional.

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

Dictionary _font_supported_feature_list<>( RID font_rid=, font_rid:RID=, ):Dictionary

Optional.

Returns the dictionary of the supported OpenType features.

Dictionary _font_supported_variation_list<>( RID font_rid=, font_rid:RID=, ):Dictionary

Optional.

Returns the dictionary of the supported OpenType variation coordinates.

String _format_number<>( String number=, number:String=, String language=, language:String=, ):String

Optional.

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

void _free_rid<>( RID rid=, rid:RID=, ):void

Required.

Frees an object created by this TextServer.

int _get_features<>():int

Required.

Returns text server features, see Feature.

Vector2 _get_hex_code_box_size<>( int size=, size:int=, int index=, index:int=, ):Vector2

Optional.

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

String _get_name<>():String

Required.

Returns the name of the server interface.

PackedByteArray _get_support_data<>():PackedByteArray

Optional.

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

String _get_support_data_filename<>():String

Optional.

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

String _get_support_data_info<>():String

Optional.

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

bool _has<>( RID rid=, rid:RID=, ):bool

Required.

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

bool _has_feature<>( Feature feature=, feature:Feature=, ):bool

Required.

Returns true if the server supports a feature.

int _is_confusable<>( String string=, string:String=, PackedStringArray dict=, dict:PackedStringArray=, ):int

Optional.

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

bool _is_locale_right_to_left<>( String locale=, locale:String=, ):bool

Required.

Returns true if locale is right-to-left.

bool _is_valid_identifier<>( String string=, string:String=, ):bool

Optional.

Returns true if string is a valid identifier.

bool _is_valid_letter<>( int unicode=, unicode:int=, ):bool

There is currently no description for this method. Please help us by contributing one!

bool _load_support_data<>( String filename=, filename:String=, ):bool

Optional.

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

int _name_to_tag<>( String name=, name:String=, ):int

Optional.

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

String _parse_number<>( String number=, number:String=, String language=, language:String=, ):String

Optional.

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

Array _parse_structured_text<>( StructuredTextParser parser_type=, parser_type:StructuredTextParser=, Array args=, args:Array=, String text=, text:String=, ):Array

Optional.

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

String _percent_sign<>( String language=, language:String=, ):String

Optional.

Returns percent sign used in the language.

bool _save_support_data<>( String filename=, filename:String=, ):bool

Optional.

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

int _shaped_get_span_count<>( RID shaped=, shaped:RID=, ):int

Required.

Returns number of text spans added using _shaped_text_add_string() or _shaped_text_add_object().

Variant _shaped_get_span_embedded_object<>( RID shaped=, shaped:RID=, int index=, index:int=, ):Variant

Required.

Returns text embedded object key.

Variant _shaped_get_span_meta<>( RID shaped=, shaped:RID=, int index=, index:int=, ):Variant

Required.

Returns text span metadata.

void _shaped_set_span_update_font<>( RID shaped=, shaped:RID=, int index=, index:int=, =, :=, int size=, size:int=, Dictionary opentype_features=, opentype_features:Dictionary=, ):void

Required.

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

bool _shaped_text_add_object<>( RID shaped=, shaped:RID=, Variant key=, key:Variant=, Vector2 size=, size:Vector2=, InlineAlignment inline_align=, inline_align:InlineAlignment=, int length=, length:int=, float baseline=, baseline:float=, ):bool

Required.

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

bool _shaped_text_add_string<>( RID shaped=, shaped:RID=, String text=, text:String=, =, :=, int size=, size:int=, Dictionary opentype_features=, opentype_features:Dictionary=, String language=, language:String=, Variant meta=, meta:Variant=, ):bool

Required.

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

void _shaped_text_clear<>( RID shaped=, shaped:RID=, ):void

Required.

Clears text buffer (removes text and inline objects).

int _shaped_text_closest_character_pos<>( RID shaped=, shaped:RID=, int pos=, pos:int=, ):int

Optional.

Returns composite character position closest to the pos.

void _shaped_text_draw<>( RID shaped=, shaped:RID=, RID canvas=, canvas:RID=, Vector2 pos=, pos:Vector2=, float clip_l=, clip_l:float=, float clip_r=, clip_r:float=, Color color=, color:Color=, ):void

Optional.

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

void _shaped_text_draw_outline<>( RID shaped=, shaped:RID=, RID canvas=, canvas:RID=, Vector2 pos=, pos:Vector2=, float clip_l=, clip_l:float=, float clip_r=, clip_r:float=, int outline_size=, outline_size:int=, Color color=, color:Color=, ):void

Optional.

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

float _shaped_text_fit_to_width<>( RID shaped=, shaped:RID=, float width=, width:float=, =, :=, ):float

Optional.

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

float _shaped_text_get_ascent<>( RID shaped=, shaped:RID=, ):float

Required.

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

void _shaped_text_get_carets<>( RID shaped=, shaped:RID=, int position=, position:int=, =, :=, ):void

Optional.

Returns shapes of the carets corresponding to the character offset position in the text. Returned caret shape is 1 pixel wide rectangle.

PackedInt32Array _shaped_text_get_character_breaks<>( RID shaped=, shaped:RID=, ):PackedInt32Array

Optional.

Returns array of the composite character boundaries.

int _shaped_text_get_custom_ellipsis<>( RID shaped=, shaped:RID=, ):int

Optional.

Returns ellipsis character used for text clipping.

String _shaped_text_get_custom_punctuation<>( RID shaped=, shaped:RID=, ):String

Optional.

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

float _shaped_text_get_descent<>( RID shaped=, shaped:RID=, ):float

Required.

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

Direction _shaped_text_get_direction<>( RID shaped=, shaped:RID=, ):Direction

Optional.

Returns direction of the text.

int _shaped_text_get_dominant_direction_in_range<>( RID shaped=, shaped:RID=, int start=, start:int=, int end=, end:int=, ):int

Optional.

Returns dominant direction of in the range of text.

int _shaped_text_get_ellipsis_glyph_count<>( RID shaped=, shaped:RID=, ):int

Required.

Returns number of glyphs in the ellipsis.

const Glyph* _shaped_text_get_ellipsis_glyphs<>( RID shaped=, shaped:RID=, ):const Glyph*

Required.

Returns array of the glyphs in the ellipsis.

int _shaped_text_get_ellipsis_pos<>( RID shaped=, shaped:RID=, ):int

Required.

Returns position of the ellipsis.

int _shaped_text_get_glyph_count<>( RID shaped=, shaped:RID=, ):int

Required.

Returns number of glyphs in the buffer.

const Glyph* _shaped_text_get_glyphs<>( RID shaped=, shaped:RID=, ):const Glyph*

Required.

Returns an array of glyphs in the visual order.

Vector2 _shaped_text_get_grapheme_bounds<>( RID shaped=, shaped:RID=, int pos=, pos:int=, ):Vector2

Optional.

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

Direction _shaped_text_get_inferred_direction<>( RID shaped=, shaped:RID=, ):Direction

Optional.

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

PackedInt32Array _shaped_text_get_line_breaks<>( RID shaped=, shaped:RID=, float width=, width:float=, int start=, start:int=, =, :=, ):PackedInt32Array

Optional.

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

PackedInt32Array _shaped_text_get_line_breaks_adv<>( RID shaped=, shaped:RID=, PackedFloat32Array width=, width:PackedFloat32Array=, int start=, start:int=, bool once=, once:bool=, =, :=, ):PackedInt32Array

Optional.

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

int _shaped_text_get_object_glyph<>( RID shaped=, shaped:RID=, Variant key=, key:Variant=, ):int

Required.

Returns the glyph index of the inline object.

Vector2i _shaped_text_get_object_range<>( RID shaped=, shaped:RID=, Variant key=, key:Variant=, ):Vector2i

Required.

Returns the character range of the inline object.

Rect2 _shaped_text_get_object_rect<>( RID shaped=, shaped:RID=, Variant key=, key:Variant=, ):Rect2

Required.

Returns bounding rectangle of the inline object.

Array _shaped_text_get_objects<>( RID shaped=, shaped:RID=, ):Array

Required.

Returns array of inline objects.

Orientation _shaped_text_get_orientation<>( RID shaped=, shaped:RID=, ):Orientation

Optional.

Returns text orientation.

RID _shaped_text_get_parent<>( RID shaped=, shaped:RID=, ):RID

Required.

Returns the parent buffer from which the substring originates.

bool _shaped_text_get_preserve_control<>( RID shaped=, shaped:RID=, ):bool

Optional.

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

bool _shaped_text_get_preserve_invalid<>( RID shaped=, shaped:RID=, ):bool

Optional.

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

Vector2i _shaped_text_get_range<>( RID shaped=, shaped:RID=, ):Vector2i

Required.

Returns substring buffer character range in the parent buffer.

PackedVector2Array _shaped_text_get_selection<>( RID shaped=, shaped:RID=, int start=, start:int=, int end=, end:int=, ):PackedVector2Array

Optional.

Returns selection rectangles for the specified character range.

Vector2 _shaped_text_get_size<>( RID shaped=, shaped:RID=, ):Vector2

Required.

Returns size of the text.

int _shaped_text_get_spacing<>( RID shaped=, shaped:RID=, SpacingType spacing=, spacing:SpacingType=, ):int

Optional.

Returns extra spacing added between glyphs or lines in pixels.

int _shaped_text_get_trim_pos<>( RID shaped=, shaped:RID=, ):int

Required.

Returns the position of the overrun trim.

float _shaped_text_get_underline_position<>( RID shaped=, shaped:RID=, ):float

Required.

Returns pixel offset of the underline below the baseline.

float _shaped_text_get_underline_thickness<>( RID shaped=, shaped:RID=, ):float

Required.

Returns thickness of the underline.

float _shaped_text_get_width<>( RID shaped=, shaped:RID=, ):float

Required.

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

PackedInt32Array _shaped_text_get_word_breaks<>( RID shaped=, shaped:RID=, =, :=, =, :=, ):PackedInt32Array

Optional.

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

int _shaped_text_hit_test_grapheme<>( RID shaped=, shaped:RID=, float coord=, coord:float=, ):int

Optional.

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

int _shaped_text_hit_test_position<>( RID shaped=, shaped:RID=, float coord=, coord:float=, ):int

Optional.

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

bool _shaped_text_is_ready<>( RID shaped=, shaped:RID=, ):bool

Required.

Returns true if buffer is successfully shaped.

int _shaped_text_next_character_pos<>( RID shaped=, shaped:RID=, int pos=, pos:int=, ):int

Optional.

Returns composite character end position closest to the pos.

int _shaped_text_next_grapheme_pos<>( RID shaped=, shaped:RID=, int pos=, pos:int=, ):int

Optional.

Returns grapheme end position closest to the pos.

void _shaped_text_overrun_trim_to_width<>( RID shaped=, shaped:RID=, float width=, width:float=, =, :=, ):void

Optional.

Trims text if it exceeds the given width.

int _shaped_text_prev_character_pos<>( RID shaped=, shaped:RID=, int pos=, pos:int=, ):int

Optional.

Returns composite character start position closest to the pos.

int _shaped_text_prev_grapheme_pos<>( RID shaped=, shaped:RID=, int pos=, pos:int=, ):int

Optional.

Returns grapheme start position closest to the pos.

bool _shaped_text_resize_object<>( RID shaped=, shaped:RID=, Variant key=, key:Variant=, Vector2 size=, size:Vector2=, InlineAlignment inline_align=, inline_align:InlineAlignment=, float baseline=, baseline:float=, ):bool

Required.

Sets new size and alignment of embedded object.

void _shaped_text_set_bidi_override<>( RID shaped=, shaped:RID=, Array override=, override:Array=, ):void

Optional.

Overrides BiDi for the structured text.

void _shaped_text_set_custom_ellipsis<>( RID shaped=, shaped:RID=, int char=, char:int=, ):void

Optional.

Sets ellipsis character used for text clipping.

void _shaped_text_set_custom_punctuation<>( RID shaped=, shaped:RID=, String punct=, punct:String=, ):void

Optional.

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

void _shaped_text_set_direction<>( RID shaped=, shaped:RID=, Direction direction=, direction:Direction=, ):void

Optional.

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

void _shaped_text_set_orientation<>( RID shaped=, shaped:RID=, Orientation orientation=, orientation:Orientation=, ):void

Optional.

Sets desired text orientation.

void _shaped_text_set_preserve_control<>( RID shaped=, shaped:RID=, bool enabled=, enabled:bool=, ):void

Optional.

If set to true text buffer will display control characters.

void _shaped_text_set_preserve_invalid<>( RID shaped=, shaped:RID=, bool enabled=, enabled:bool=, ):void

Optional.

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

void _shaped_text_set_spacing<>( RID shaped=, shaped:RID=, SpacingType spacing=, spacing:SpacingType=, int value=, value:int=, ):void

Optional.

Sets extra spacing added between glyphs or lines in pixels.

bool _shaped_text_shape<>( RID shaped=, shaped:RID=, ):bool

Required.

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

const Glyph* _shaped_text_sort_logical<>( RID shaped=, shaped:RID=, ):const Glyph*

Required.

Returns text glyphs in the logical order.

RID _shaped_text_substr<>( RID shaped=, shaped:RID=, int start=, start:int=, int length=, length:int=, ):RID

Required.

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

float _shaped_text_tab_align<>( RID shaped=, shaped:RID=, PackedFloat32Array tab_stops=, tab_stops:PackedFloat32Array=, ):float

Optional.

Aligns shaped text to the given tab-stops.

bool _shaped_text_update_breaks<>( RID shaped=, shaped:RID=, ):bool

Optional.

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

bool _shaped_text_update_justification_ops<>( RID shaped=, shaped:RID=, ):bool

Optional.

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

bool _spoof_check<>( String string=, string:String=, ):bool

Optional.

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

PackedInt32Array _string_get_character_breaks<>( String string=, string:String=, String language=, language:String=, ):PackedInt32Array

Optional.

Returns array of the composite character boundaries.

PackedInt32Array _string_get_word_breaks<>( String string=, string:String=, String language=, language:String=, int chars_per_line=, chars_per_line:int=, ):PackedInt32Array

Optional.

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

String _string_to_lower<>( String string=, string:String=, String language=, language:String=, ):String

Optional.

Returns the string converted to lowercase.

String _string_to_title<>( String string=, string:String=, String language=, language:String=, ):String

Optional.

Returns the string converted to title case.

String _string_to_upper<>( String string=, string:String=, String language=, language:String=, ):String

Optional.

Returns the string converted to uppercase.

String _strip_diacritics<>( String string=, string:String=, ):String

Optional.

Strips diacritics from the string.

String _tag_to_name<>( int tag=, tag:int=, ):String

Optional.

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




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...