TextShapingExtension
Inherits: TextShaping < Shared < Object
Inherited by: TextShapingDriverDummy, TextShapingDriverFallback
Base class for custom TextShaping implementations (plugins).
Description
Section titled “Description”External TextShaping implementations should inherit from this class.
Methods
Section titled “Methods”Method descriptions
Section titled “Method descriptions”_cleanup
Section titled “_cleanup”void _cleanup() virtual
This method is called before text server is unregistered.
_create_font
Section titled “_create_font”RID _create_font() virtual required
Creates a new, empty font cache entry resource.
_create_font_linked_variation
Section titled “_create_font_linked_variation”RID _create_font_linked_variation(font_rid: RID) virtual
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.
_create_shaped_text
Section titled “_create_shaped_text”RID _create_shaped_text(direction: TextShaping.Direction, orientation: TextShaping.Orientation) virtual required
Creates a new buffer for complex text layout, with the given direction and orientation.
_draw_hex_code_box
Section titled “_draw_hex_code_box”void _draw_hex_code_box(canvas: RID, size: int, pos: Vector2, index: int, color: Color) virtual const
Draws box displaying character hexadecimal code.
_font_clear_glyphs
Section titled “_font_clear_glyphs”void _font_clear_glyphs(font_rid: RID, size: Vector2i) virtual required
Removes all rendered glyph information from the cache entry.
_font_clear_kerning_map
Section titled “_font_clear_kerning_map”void _font_clear_kerning_map(font_rid: RID, size: int) virtual
Removes all kerning overrides.
_font_clear_size_cache
Section titled “_font_clear_size_cache”void _font_clear_size_cache(font_rid: RID) virtual required
Removes all font sizes from the cache entry.
_font_clear_system_fallback_cache
Section titled “_font_clear_system_fallback_cache”void _font_clear_system_fallback_cache() virtual
Frees all automatically loaded system fonts.
_font_clear_textures
Section titled “_font_clear_textures”void _font_clear_textures(font_rid: RID, size: Vector2i) virtual required
Removes all textures from font cache entry.
_font_draw_glyph
Section titled “_font_draw_glyph”void _font_draw_glyph(font_rid: RID, canvas: RID, size: int, pos: Vector2, index: int, color: Color, oversampling: float) virtual required const
Draws single glyph into a canvas item at the position, using font_rid at the size size. If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
_font_draw_glyph_outline
Section titled “_font_draw_glyph_outline”void _font_draw_glyph_outline(font_rid: RID, canvas: RID, size: int, outline_size: int, pos: Vector2, index: int, color: Color, oversampling: float) virtual required const
Draws single glyph outline of size outline_size into a canvas item at the position, using font_rid at the size size. If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
_font_get_antialiasing
Section titled “_font_get_antialiasing”TextShaping.FontAntialiasing _font_get_antialiasing(font_rid: RID) virtual const
Returns font anti-aliasing mode.
_font_get_ascent
Section titled “_font_get_ascent”float _font_get_ascent(font_rid: RID, size: int) virtual required const
Returns the font ascent (number of pixels above the baseline).
_font_get_baseline_offset
Section titled “_font_get_baseline_offset”float _font_get_baseline_offset(font_rid: RID) virtual const
Returns extra baseline offset (as a fraction of font height).
_font_get_char_from_glyph_index
Section titled “_font_get_char_from_glyph_index”int _font_get_char_from_glyph_index(font_rid: RID, size: int, glyph_index: int) virtual required const
Returns character code associated with glyph_index, or 0 if glyph_index is invalid.
_font_get_descent
Section titled “_font_get_descent”float _font_get_descent(font_rid: RID, size: int) virtual required const
Returns the font descent (number of pixels below the baseline).
_font_get_disable_embedded_bitmaps
Section titled “_font_get_disable_embedded_bitmaps”bool _font_get_disable_embedded_bitmaps(font_rid: RID) virtual const
Returns whether the font’s embedded bitmap loading is disabled.
_font_get_embolden
Section titled “_font_get_embolden”float _font_get_embolden(font_rid: RID) virtual const
Returns font embolden strength.
_font_get_face_count
Section titled “_font_get_face_count”int _font_get_face_count(font_rid: RID) virtual const
Returns number of faces in the TrueType / OpenType collection.
_font_get_face_index
Section titled “_font_get_face_index”int _font_get_face_index(font_rid: RID) virtual const
Returns an active face index in the TrueType / OpenType collection.
_font_get_fixed_size
Section titled “_font_get_fixed_size”int _font_get_fixed_size(font_rid: RID) virtual required const
Returns bitmap font fixed size.
_font_get_fixed_size_scale_mode
Section titled “_font_get_fixed_size_scale_mode”TextShaping.FixedSizeScaleMode _font_get_fixed_size_scale_mode(font_rid: RID) virtual required const
Returns bitmap font scaling mode.
_font_get_generate_mipmaps
Section titled “_font_get_generate_mipmaps”bool _font_get_generate_mipmaps(font_rid: RID) virtual const
Returns true if font texture mipmap generation is enabled.
_font_get_glyph_advance
Section titled “_font_get_glyph_advance”Vector2 _font_get_glyph_advance(font_rid: RID, size: int, glyph: int) virtual required const
Returns glyph advance (offset of the next glyph).
_font_get_glyph_contours
Section titled “_font_get_glyph_contours”Dictionary _font_get_glyph_contours(font_rid: RID, size: int, index: int) virtual const
Returns outline contours of the glyph.
_font_get_glyph_index
Section titled “_font_get_glyph_index”int _font_get_glyph_index(font_rid: RID, size: int, char: int, variation_selector: int) virtual required const
Returns the glyph index of a char, optionally modified by the variation_selector.
_font_get_glyph_list
Section titled “_font_get_glyph_list”[]i32 _font_get_glyph_list(font_rid: RID, size: Vector2i) virtual required const
Returns list of rendered glyphs in the cache entry.
_font_get_glyph_offset
Section titled “_font_get_glyph_offset”Vector2 _font_get_glyph_offset(font_rid: RID, size: Vector2i, glyph: int) virtual required const
Returns glyph offset from the baseline.
_font_get_glyph_size
Section titled “_font_get_glyph_size”Vector2 _font_get_glyph_size(font_rid: RID, size: Vector2i, glyph: int) virtual required const
Returns size of the glyph.
_font_get_glyph_texture_idx
Section titled “_font_get_glyph_texture_idx”int _font_get_glyph_texture_idx(font_rid: RID, size: Vector2i, glyph: int) virtual required const
Returns index of the cache texture containing the glyph.
_font_get_glyph_texture_rid
Section titled “_font_get_glyph_texture_rid”RID _font_get_glyph_texture_rid(font_rid: RID, size: Vector2i, glyph: int) virtual required const
Returns resource ID of the cache texture containing the glyph.
_font_get_glyph_texture_size
Section titled “_font_get_glyph_texture_size”Vector2 _font_get_glyph_texture_size(font_rid: RID, size: Vector2i, glyph: int) virtual required const
Returns size of the cache texture containing the glyph.
_font_get_glyph_uv_rect
Section titled “_font_get_glyph_uv_rect”Rect2 _font_get_glyph_uv_rect(font_rid: RID, size: Vector2i, glyph: int) virtual required const
Returns rectangle in the cache texture containing the glyph.
_font_get_hinting
Section titled “_font_get_hinting”TextShaping.Hinting _font_get_hinting(font_rid: RID) virtual const
Returns the font hinting mode. Used by dynamic fonts only.
_font_get_keep_rounding_remainders
Section titled “_font_get_keep_rounding_remainders”bool _font_get_keep_rounding_remainders(font_rid: RID) virtual const
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.
_font_get_kerning
Section titled “_font_get_kerning”Vector2 _font_get_kerning(font_rid: RID, size: int, glyph_pair: Vector2i) virtual const
Returns kerning for the pair of glyphs.
_font_get_kerning_list
Section titled “_font_get_kerning_list”[]Vector2i _font_get_kerning_list(font_rid: RID, size: int) virtual const
Returns list of the kerning overrides.
_font_get_language_support_override
Section titled “_font_get_language_support_override”bool _font_get_language_support_override(font_rid: RID, language: String) virtual
Returns true if support override is enabled for the language.
_font_get_language_support_overrides
Section titled “_font_get_language_support_overrides”[]String _font_get_language_support_overrides(font_rid: RID) virtual
Returns list of language support overrides.
_font_get_msdf_pixel_range
Section titled “_font_get_msdf_pixel_range”int _font_get_msdf_pixel_range(font_rid: RID) virtual const
Returns the width of the range around the shape between the minimum and maximum representable signed distance.
_font_get_msdf_size
Section titled “_font_get_msdf_size”int _font_get_msdf_size(font_rid: RID) virtual const
Returns source font size used to generate MSDF textures.
_font_get_name
Section titled “_font_get_name”String _font_get_name(font_rid: RID) virtual const
Returns font family name.
_font_get_opentype_feature_overrides
Section titled “_font_get_opentype_feature_overrides”Dictionary _font_get_opentype_feature_overrides(font_rid: RID) virtual const
Returns font OpenType feature set override.
_font_get_ot_name_strings
Section titled “_font_get_ot_name_strings”Dictionary _font_get_ot_name_strings(font_rid: RID) virtual const
Returns Dictionary with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
_font_get_palette_colors
Section titled “_font_get_palette_colors”[]Color _font_get_palette_colors(font_rid: RID, index: int) virtual const
Returns the array in the predefined color palette at index. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using _font_set_palette_custom_colors().
_font_get_palette_count
Section titled “_font_get_palette_count”int _font_get_palette_count(font_rid: RID) virtual const
Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
_font_get_palette_custom_colors
Section titled “_font_get_palette_custom_colors”[]Color _font_get_palette_custom_colors(font_rid: RID) virtual const
Returns array of custom colors to override predefined palette.
_font_get_palette_name
Section titled “_font_get_palette_name”String _font_get_palette_name(font_rid: RID, index: int) virtual const
Returns the name of the predefined color palette at index. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
_font_get_scale
Section titled “_font_get_scale”float _font_get_scale(font_rid: RID, size: int) virtual required const
Returns scaling factor of the color bitmap font.
_font_get_script_support_override
Section titled “_font_get_script_support_override”bool _font_get_script_support_override(font_rid: RID, script: String) virtual
Returns true if support override is enabled for the script.
_font_get_script_support_overrides
Section titled “_font_get_script_support_overrides”[]String _font_get_script_support_overrides(font_rid: RID) virtual
Returns list of script support overrides.
_font_get_size_cache_info
Section titled “_font_get_size_cache_info”[]Dictionary _font_get_size_cache_info(font_rid: RID) virtual const
Returns font cache information, each entry contains the following fields: Vector2i size_px - font size in pixels, float viewport_oversampling - viewport oversampling factor, int glyphs - number of rendered glyphs, int textures - number of used textures, int textures_size - size of texture data in bytes.
_font_get_size_cache_list
Section titled “_font_get_size_cache_list”[]Vector2i _font_get_size_cache_list(font_rid: RID) virtual required const
Returns list of the font sizes in the cache. Each size is Vector2i with font size and outline size.
_font_get_spacing
Section titled “_font_get_spacing”int _font_get_spacing(font_rid: RID, spacing: TextShaping.SpacingType) virtual const
Returns the spacing for spacing in pixels (not relative to the font size).
_font_get_stretch
Section titled “_font_get_stretch”int _font_get_stretch(font_rid: RID) virtual const
Returns font stretch amount, compared to a normal width. A percentage value between 50% and 200%.
_font_get_style
Section titled “_font_get_style”TextShaping.FontStyle _font_get_style(font_rid: RID) virtual const
Returns font style flags.
_font_get_style_name
Section titled “_font_get_style_name”String _font_get_style_name(font_rid: RID) virtual const
Returns font style name.
_font_get_subpixel_positioning
Section titled “_font_get_subpixel_positioning”TextShaping.SubpixelPositioning _font_get_subpixel_positioning(font_rid: RID) virtual const
Returns font subpixel glyph positioning mode.
_font_get_supported_chars
Section titled “_font_get_supported_chars”String _font_get_supported_chars(font_rid: RID) virtual required const
Returns a string containing all the characters available in the font.
_font_get_supported_glyphs
Section titled “_font_get_supported_glyphs”[]i32 _font_get_supported_glyphs(font_rid: RID) virtual required const
Returns an array containing all glyph indices in the font.
_font_get_texture_count
Section titled “_font_get_texture_count”int _font_get_texture_count(font_rid: RID, size: Vector2i) virtual required const
Returns number of textures used by font cache entry.
_font_get_texture_image
Section titled “_font_get_texture_image”Image _font_get_texture_image(font_rid: RID, size: Vector2i, texture_index: int) virtual required const
Returns font cache texture image data.
_font_get_texture_offsets
Section titled “_font_get_texture_offsets”[]i32 _font_get_texture_offsets(font_rid: RID, size: Vector2i, texture_index: int) virtual const
Returns array containing glyph packing data.
_font_get_transform
Section titled “_font_get_transform”Transform2D _font_get_transform(font_rid: RID) virtual const
Returns 2D transform applied to the font outlines.
_font_get_underline_position
Section titled “_font_get_underline_position”float _font_get_underline_position(font_rid: RID, size: int) virtual required const
Returns pixel offset of the underline below the baseline.
_font_get_underline_thickness
Section titled “_font_get_underline_thickness”float _font_get_underline_thickness(font_rid: RID, size: int) virtual required const
Returns thickness of the underline in pixels.
_font_get_used_palette
Section titled “_font_get_used_palette”int _font_get_used_palette(font_rid: RID) virtual const
Returns used palette index.
_font_get_variation_coordinates
Section titled “_font_get_variation_coordinates”Dictionary _font_get_variation_coordinates(font_rid: RID) virtual const
Returns variation coordinates for the specified font cache entry.
_font_get_weight
Section titled “_font_get_weight”int _font_get_weight(font_rid: RID) virtual const
Returns weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.
_font_has_char
Section titled “_font_has_char”bool _font_has_char(font_rid: RID, char: int) virtual required const
Returns true if a Unicode char is available in the font.
_font_is_allow_system_fallback
Section titled “_font_is_allow_system_fallback”bool _font_is_allow_system_fallback(font_rid: RID) virtual const
Returns true if system fonts can be automatically used as fallbacks.
_font_is_force_autohinter
Section titled “_font_is_force_autohinter”bool _font_is_force_autohinter(font_rid: RID) virtual const
Returns true if auto-hinting is supported and preferred over font built-in hinting.
_font_is_language_supported
Section titled “_font_is_language_supported”bool _font_is_language_supported(font_rid: RID, language: String) virtual const
Returns true if the font supports the given language (as a ISO 639 code).
_font_is_modulate_color_glyphs
Section titled “_font_is_modulate_color_glyphs”bool _font_is_modulate_color_glyphs(font_rid: RID) virtual const
Returns true if color modulation is applied when drawing the font’s colored glyphs.
_font_is_multichannel_signed_distance_field
Section titled “_font_is_multichannel_signed_distance_field”bool _font_is_multichannel_signed_distance_field(font_rid: RID) virtual const
Returns true if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
_font_is_script_supported
Section titled “_font_is_script_supported”bool _font_is_script_supported(font_rid: RID, script: String) virtual const
Returns true if the font supports the given script (as a ISO 15924 code).
_font_remove_glyph
Section titled “_font_remove_glyph”void _font_remove_glyph(font_rid: RID, size: Vector2i, glyph: int) virtual required
Removes specified rendered glyph information from the cache entry.
_font_remove_kerning
Section titled “_font_remove_kerning”void _font_remove_kerning(font_rid: RID, size: int, glyph_pair: Vector2i) virtual
Removes kerning override for the pair of glyphs.
_font_remove_language_support_override
Section titled “_font_remove_language_support_override”void _font_remove_language_support_override(font_rid: RID, language: String) virtual
Remove language support override.
_font_remove_script_support_override
Section titled “_font_remove_script_support_override”void _font_remove_script_support_override(font_rid: RID, script: String) virtual
Removes script support override.
_font_remove_size_cache
Section titled “_font_remove_size_cache”void _font_remove_size_cache(font_rid: RID, size: Vector2i) virtual required
Removes specified font size from the cache entry.
_font_remove_texture
Section titled “_font_remove_texture”void _font_remove_texture(font_rid: RID, size: Vector2i, texture_index: int) virtual required
Removes specified texture from the cache entry.
_font_render_glyph
Section titled “_font_render_glyph”void _font_render_glyph(font_rid: RID, size: Vector2i, index: int) virtual
Renders specified glyph to the font cache texture.
_font_render_range
Section titled “_font_render_range”void _font_render_range(font_rid: RID, size: Vector2i, start: int, end: int) virtual
Renders the range of characters to the font cache texture.
_font_set_allow_system_fallback
Section titled “_font_set_allow_system_fallback”void _font_set_allow_system_fallback(font_rid: RID, allow_system_fallback: bool) virtual
If set to true, system fonts can be automatically used as fallbacks.
_font_set_antialiasing
Section titled “_font_set_antialiasing”void _font_set_antialiasing(font_rid: RID, antialiasing: TextShaping.FontAntialiasing) virtual
Sets font anti-aliasing mode.
_font_set_ascent
Section titled “_font_set_ascent”void _font_set_ascent(font_rid: RID, size: int, ascent: float) virtual required
Sets the font ascent (number of pixels above the baseline).
_font_set_baseline_offset
Section titled “_font_set_baseline_offset”void _font_set_baseline_offset(font_rid: RID, baseline_offset: float) virtual
Sets extra baseline offset (as a fraction of font height).
_font_set_data
Section titled “_font_set_data”void _font_set_data(font_rid: RID, data: []u8) virtual
Sets font source data, e.g contents of the dynamic font source file.
_font_set_data_ptr
Section titled “_font_set_data_ptr”void _font_set_data_ptr(font_rid: RID, data_ptr: const uint8_t*, data_size: int) virtual
Sets pointer to the font source data, e.g contents of the dynamic font source file.
_font_set_descent
Section titled “_font_set_descent”void _font_set_descent(font_rid: RID, size: int, descent: float) virtual required
Sets the font descent (number of pixels below the baseline).
_font_set_disable_embedded_bitmaps
Section titled “_font_set_disable_embedded_bitmaps”void _font_set_disable_embedded_bitmaps(font_rid: RID, disable_embedded_bitmaps: bool) virtual
If set to true, embedded font bitmap loading is disabled.
_font_set_embolden
Section titled “_font_set_embolden”void _font_set_embolden(font_rid: RID, strength: float) virtual
Sets font embolden strength. If strength is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
_font_set_face_index
Section titled “_font_set_face_index”void _font_set_face_index(font_rid: RID, face_index: int) virtual
Sets an active face index in the TrueType / OpenType collection.
_font_set_fixed_size
Section titled “_font_set_fixed_size”void _font_set_fixed_size(font_rid: RID, fixed_size: int) virtual required
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
_font_set_fixed_size_scale_mode
Section titled “_font_set_fixed_size_scale_mode”void _font_set_fixed_size_scale_mode(font_rid: RID, fixed_size_scale_mode: TextShaping.FixedSizeScaleMode) virtual required
Sets bitmap font scaling mode. This property is used only if fixed_size is greater than zero.
_font_set_force_autohinter
Section titled “_font_set_force_autohinter”void _font_set_force_autohinter(font_rid: RID, force_autohinter: bool) virtual
If set to true auto-hinting is preferred over font built-in hinting.
_font_set_generate_mipmaps
Section titled “_font_set_generate_mipmaps”void _font_set_generate_mipmaps(font_rid: RID, generate_mipmaps: bool) virtual
If set to true font texture mipmap generation is enabled.
_font_set_glyph_advance
Section titled “_font_set_glyph_advance”void _font_set_glyph_advance(font_rid: RID, size: int, glyph: int, advance: Vector2) virtual required
Sets glyph advance (offset of the next glyph).
_font_set_glyph_offset
Section titled “_font_set_glyph_offset”void _font_set_glyph_offset(font_rid: RID, size: Vector2i, glyph: int, offset: Vector2) virtual required
Sets glyph offset from the baseline.
_font_set_glyph_size
Section titled “_font_set_glyph_size”void _font_set_glyph_size(font_rid: RID, size: Vector2i, glyph: int, gl_size: Vector2) virtual required
Sets size of the glyph.
_font_set_glyph_texture_idx
Section titled “_font_set_glyph_texture_idx”void _font_set_glyph_texture_idx(font_rid: RID, size: Vector2i, glyph: int, texture_idx: int) virtual required
Sets index of the cache texture containing the glyph.
_font_set_glyph_uv_rect
Section titled “_font_set_glyph_uv_rect”void _font_set_glyph_uv_rect(font_rid: RID, size: Vector2i, glyph: int, uv_rect: Rect2) virtual required
Sets rectangle in the cache texture containing the glyph.
_font_set_hinting
Section titled “_font_set_hinting”void _font_set_hinting(font_rid: RID, hinting: TextShaping.Hinting) virtual
Sets font hinting mode. Used by dynamic fonts only.
_font_set_keep_rounding_remainders
Section titled “_font_set_keep_rounding_remainders”void _font_set_keep_rounding_remainders(font_rid: RID, keep_rounding_remainders: bool) virtual
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.
_font_set_kerning
Section titled “_font_set_kerning”void _font_set_kerning(font_rid: RID, size: int, glyph_pair: Vector2i, kerning: Vector2) virtual
Sets kerning for the pair of glyphs.
_font_set_language_support_override
Section titled “_font_set_language_support_override”void _font_set_language_support_override(font_rid: RID, language: String, supported: bool) virtual
Adds override for _font_is_language_supported().
_font_set_modulate_color_glyphs
Section titled “_font_set_modulate_color_glyphs”void _font_set_modulate_color_glyphs(font_rid: RID, modulate: bool) virtual
If set to true, color modulation is applied when drawing colored glyphs, otherwise it’s applied to the monochrome glyphs only.
_font_set_msdf_pixel_range
Section titled “_font_set_msdf_pixel_range”void _font_set_msdf_pixel_range(font_rid: RID, msdf_pixel_range: int) virtual
Sets the width of the range around the shape between the minimum and maximum representable signed distance.
_font_set_msdf_size
Section titled “_font_set_msdf_size”void _font_set_msdf_size(font_rid: RID, msdf_size: int) virtual
Sets source font size used to generate MSDF textures.
_font_set_multichannel_signed_distance_field
Section titled “_font_set_multichannel_signed_distance_field”void _font_set_multichannel_signed_distance_field(font_rid: RID, msdf: bool) virtual
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.
_font_set_name
Section titled “_font_set_name”void _font_set_name(font_rid: RID, name: String) virtual
Sets the font family name.
_font_set_opentype_feature_overrides
Section titled “_font_set_opentype_feature_overrides”void _font_set_opentype_feature_overrides(font_rid: RID, overrides: Dictionary) virtual
Sets font OpenType feature set override.
_font_set_palette_custom_colors
Section titled “_font_set_palette_custom_colors”void _font_set_palette_custom_colors(font_rid: RID, colors: []Color) virtual
Sets array of custom colors to override predefined palette. Set to empty array to reset overrides. Use Color(0, 0, 0, 0), to keep predefined palette color at specific position.
_font_set_scale
Section titled “_font_set_scale”void _font_set_scale(font_rid: RID, size: int, scale: float) virtual required
Sets scaling factor of the color bitmap font.
_font_set_script_support_override
Section titled “_font_set_script_support_override”void _font_set_script_support_override(font_rid: RID, script: String, supported: bool) virtual
Adds override for _font_is_script_supported().
_font_set_spacing
Section titled “_font_set_spacing”void _font_set_spacing(font_rid: RID, spacing: TextShaping.SpacingType, value: int) virtual
Sets the spacing for spacing to value in pixels (not relative to the font size).
_font_set_stretch
Section titled “_font_set_stretch”void _font_set_stretch(font_rid: RID, stretch: int) virtual
Sets font stretch amount, compared to a normal width. A percentage value between 50% and 200%.
_font_set_style
Section titled “_font_set_style”void _font_set_style(font_rid: RID, style: TextShaping.FontStyle) virtual
Sets the font style flags.
_font_set_style_name
Section titled “_font_set_style_name”void _font_set_style_name(font_rid: RID, name_style: String) virtual
Sets the font style name.
_font_set_subpixel_positioning
Section titled “_font_set_subpixel_positioning”void _font_set_subpixel_positioning(font_rid: RID, subpixel_positioning: TextShaping.SubpixelPositioning) virtual
Sets font subpixel glyph positioning mode.
_font_set_texture_image
Section titled “_font_set_texture_image”void _font_set_texture_image(font_rid: RID, size: Vector2i, texture_index: int, image: Image) virtual required
Sets font cache texture image data.
_font_set_texture_offsets
Section titled “_font_set_texture_offsets”void _font_set_texture_offsets(font_rid: RID, size: Vector2i, texture_index: int, offset: []i32) virtual
Sets array containing glyph packing data.
_font_set_transform
Section titled “_font_set_transform”void _font_set_transform(font_rid: RID, transform: Transform2D) virtual
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
_font_set_underline_position
Section titled “_font_set_underline_position”void _font_set_underline_position(font_rid: RID, size: int, underline_position: float) virtual required
Sets pixel offset of the underline below the baseline.
_font_set_underline_thickness
Section titled “_font_set_underline_thickness”void _font_set_underline_thickness(font_rid: RID, size: int, underline_thickness: float) virtual required
Sets thickness of the underline in pixels.
_font_set_used_palette
Section titled “_font_set_used_palette”void _font_set_used_palette(font_rid: RID, index: int) virtual
Sets used palette index.
_font_set_variation_coordinates
Section titled “_font_set_variation_coordinates”void _font_set_variation_coordinates(font_rid: RID, variation_coordinates: Dictionary) virtual
Sets variation coordinates for the specified font cache entry.
_font_set_weight
Section titled “_font_set_weight”void _font_set_weight(font_rid: RID, weight: int) virtual
Sets weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.
_font_supported_feature_list
Section titled “_font_supported_feature_list”Dictionary _font_supported_feature_list(font_rid: RID) virtual const
Returns the dictionary of the supported OpenType features.
_font_supported_variation_list
Section titled “_font_supported_variation_list”Dictionary _font_supported_variation_list(font_rid: RID) virtual const
Returns the dictionary of the supported OpenType variation coordinates.
_free_rid
Section titled “_free_rid”void _free_rid(rid: RID) virtual required
Frees an object created by this TextShaping.
_get_features
Section titled “_get_features”int _get_features() virtual required const
Returns text server features, see TextShaping.Feature.
_get_hex_code_box_size
Section titled “_get_hex_code_box_size”Vector2 _get_hex_code_box_size(size: int, index: int) virtual const
Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
_get_name
Section titled “_get_name”String _get_name() virtual required const
Returns the name of the server interface.
_get_support_data
Section titled “_get_support_data”[]u8 _get_support_data() virtual const
Returns default TextShaping database (e.g. ICU break iterators and dictionaries).
_get_support_data_filename
Section titled “_get_support_data_filename”String _get_support_data_filename() virtual const
Returns default TextShaping database (e.g. ICU break iterators and dictionaries) filename.
_get_support_data_info
Section titled “_get_support_data_info”String _get_support_data_info() virtual const
Returns TextShaping database (e.g. ICU break iterators and dictionaries) description.
bool _has(rid: RID) virtual required
Returns true if rid is valid resource owned by this text server.
_has_feature
Section titled “_has_feature”bool _has_feature(feature: TextShaping.Feature) virtual required const
Returns true if the server supports a feature.
_is_confusable
Section titled “_is_confusable”int _is_confusable(string: String, dict: []String) virtual const
Returns index of the first string in dict which is visually confusable with the string, or -1 if none is found.
_is_locale_right_to_left
Section titled “_is_locale_right_to_left”bool _is_locale_right_to_left(locale: String) virtual const
Returns true if locale is right-to-left.
_is_locale_using_support_data
Section titled “_is_locale_using_support_data”bool _is_locale_using_support_data(locale: String) virtual const
Returns true if the locale requires text server support data for line/word breaking.
_is_valid_identifier
Section titled “_is_valid_identifier”bool _is_valid_identifier(string: String) virtual const
Returns true if string is a valid identifier.
_is_valid_letter
Section titled “_is_valid_letter”bool _is_valid_letter(unicode: int) virtual const
No description yet.
_load_support_data
Section titled “_load_support_data”bool _load_support_data(filename: String) virtual
Loads optional TextShaping database (e.g. ICU break iterators and dictionaries).
_name_to_tag
Section titled “_name_to_tag”int _name_to_tag(name: String) virtual const
Converts the given readable name of a feature, variation, script, or language to an OpenType tag.
_parse_structured_text
Section titled “_parse_structured_text”[]Vector3i _parse_structured_text(parser_type: TextShaping.StructuredTextParser, args: Array, text: String) virtual const
Default implementation of the BiDi algorithm override function.
_reference_oversampling_level
Section titled “_reference_oversampling_level”void _reference_oversampling_level(oversampling: float) virtual
Increases the reference count of the specified oversampling level. This method is called by Viewport, and should not be used directly.
_save_support_data
Section titled “_save_support_data”bool _save_support_data(filename: String) virtual const
Saves optional TextShaping database (e.g. ICU break iterators and dictionaries) to the file.
_shaped_get_run_count
Section titled “_shaped_get_run_count”int _shaped_get_run_count(shaped: RID) virtual const
Returns the number of uniform text runs in the buffer.
_shaped_get_run_direction
Section titled “_shaped_get_run_direction”TextShaping.Direction _shaped_get_run_direction(shaped: RID, index: int) virtual const
Returns the direction of the index text run (in visual order).
_shaped_get_run_font_rid
Section titled “_shaped_get_run_font_rid”RID _shaped_get_run_font_rid(shaped: RID, index: int) virtual const
Returns the font RID of the index text run (in visual order).
_shaped_get_run_font_size
Section titled “_shaped_get_run_font_size”int _shaped_get_run_font_size(shaped: RID, index: int) virtual const
Returns the font size of the index text run (in visual order).
_shaped_get_run_glyph_range
Section titled “_shaped_get_run_glyph_range”Vector2i _shaped_get_run_glyph_range(shaped: RID, index: int) virtual const
Returns the glyph range of the index text run (in visual order).
_shaped_get_run_language
Section titled “_shaped_get_run_language”String _shaped_get_run_language(shaped: RID, index: int) virtual const
Returns the language of the index text run (in visual order).
_shaped_get_run_object
Section titled “_shaped_get_run_object”Variant _shaped_get_run_object(shaped: RID, index: int) virtual const
Returns the embedded object of the index text run (in visual order).
_shaped_get_run_range
Section titled “_shaped_get_run_range”Vector2i _shaped_get_run_range(shaped: RID, index: int) virtual const
Returns the source text range of the index text run (in visual order).
_shaped_get_run_text
Section titled “_shaped_get_run_text”String _shaped_get_run_text(shaped: RID, index: int) virtual const
Returns the source text of the index text run (in visual order).
_shaped_get_span_count
Section titled “_shaped_get_span_count”int _shaped_get_span_count(shaped: RID) virtual required const
Returns number of text spans added using _shaped_text_add_string() or _shaped_text_add_object().
_shaped_get_span_embedded_object
Section titled “_shaped_get_span_embedded_object”Variant _shaped_get_span_embedded_object(shaped: RID, index: int) virtual required const
Returns text embedded object key.
_shaped_get_span_meta
Section titled “_shaped_get_span_meta”Variant _shaped_get_span_meta(shaped: RID, index: int) virtual required const
Returns text span metadata.
_shaped_get_span_object
Section titled “_shaped_get_span_object”Variant _shaped_get_span_object(shaped: RID, index: int) virtual required const
Returns the text span embedded object key.
_shaped_get_span_text
Section titled “_shaped_get_span_text”String _shaped_get_span_text(shaped: RID, index: int) virtual required const
Returns the text span source text.
_shaped_get_text
Section titled “_shaped_get_text”String _shaped_get_text(shaped: RID) virtual required const
Returns the text buffer source text, including object replacement characters.
_shaped_set_span_update_font
Section titled “_shaped_set_span_update_font”void _shaped_set_span_update_font(shaped: RID, index: int, fonts: []RID, size: int, opentype_features: Dictionary) virtual required
Changes text span font, font size, and OpenType features, without changing the text.
_shaped_text_add_object
Section titled “_shaped_text_add_object”bool _shaped_text_add_object(shaped: RID, key: Variant, size: Vector2, inline_align: InlineAlignment, length: int, baseline: float) virtual required
Adds inline object to the text buffer, key must be unique. In the text, object is represented as length object replacement characters.
_shaped_text_add_string
Section titled “_shaped_text_add_string”bool _shaped_text_add_string(shaped: RID, text: String, fonts: []RID, size: int, opentype_features: Dictionary, language: String, meta: Variant) virtual required
Adds text span and font to draw it to the text buffer.
_shaped_text_clear
Section titled “_shaped_text_clear”void _shaped_text_clear(shaped: RID) virtual required
Clears text buffer (removes text and inline objects).
_shaped_text_closest_character_pos
Section titled “_shaped_text_closest_character_pos”int _shaped_text_closest_character_pos(shaped: RID, pos: int) virtual const
Returns composite character position closest to the pos.
_shaped_text_draw
Section titled “_shaped_text_draw”void _shaped_text_draw(shaped: RID, canvas: RID, pos: Vector2, clip_l: float, clip_r: float, color: Color, oversampling: float) virtual const
Draw shaped text into a canvas item at a given position, with color. pos specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
_shaped_text_draw_outline
Section titled “_shaped_text_draw_outline”void _shaped_text_draw_outline(shaped: RID, canvas: RID, pos: Vector2, clip_l: float, clip_r: float, outline_size: int, color: Color, oversampling: float) virtual const
Draw the outline of the shaped text into a canvas item at a given position, with color. pos specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If oversampling is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
_shaped_text_duplicate
Section titled “_shaped_text_duplicate”RID _shaped_text_duplicate(shaped: RID) virtual required
Duplicates shaped text buffer.
_shaped_text_fit_to_width
Section titled “_shaped_text_fit_to_width”float _shaped_text_fit_to_width(shaped: RID, width: float, justification_flags: TextShaping.JustificationFlag) virtual
Adjusts text width to fit to specified width, returns new text width.
_shaped_text_get_ascent
Section titled “_shaped_text_get_ascent”float _shaped_text_get_ascent(shaped: RID) virtual required const
Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
_shaped_text_get_carets
Section titled “_shaped_text_get_carets”void _shaped_text_get_carets(shaped: RID, position: int, r_caret: CaretInfo*) virtual const
Returns shapes of the carets corresponding to the character offset position in the text. Returned caret shape is 1 pixel wide rectangle.
_shaped_text_get_character_breaks
Section titled “_shaped_text_get_character_breaks”[]i32 _shaped_text_get_character_breaks(shaped: RID) virtual const
Returns array of the composite character boundaries.
_shaped_text_get_custom_ellipsis
Section titled “_shaped_text_get_custom_ellipsis”int _shaped_text_get_custom_ellipsis(shaped: RID) virtual const
Returns ellipsis character used for text clipping.
_shaped_text_get_custom_punctuation
Section titled “_shaped_text_get_custom_punctuation”String _shaped_text_get_custom_punctuation(shaped: RID) virtual const
Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
_shaped_text_get_descent
Section titled “_shaped_text_get_descent”float _shaped_text_get_descent(shaped: RID) virtual required const
Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
_shaped_text_get_direction
Section titled “_shaped_text_get_direction”TextShaping.Direction _shaped_text_get_direction(shaped: RID) virtual const
Returns direction of the text.
_shaped_text_get_dominant_direction_in_range
Section titled “_shaped_text_get_dominant_direction_in_range”int _shaped_text_get_dominant_direction_in_range(shaped: RID, start: int, end: int) virtual const
Returns dominant direction of in the range of text.
_shaped_text_get_ellipsis_glyph_count
Section titled “_shaped_text_get_ellipsis_glyph_count”int _shaped_text_get_ellipsis_glyph_count(shaped: RID) virtual required const
Returns number of glyphs in the ellipsis.
_shaped_text_get_ellipsis_glyphs
Section titled “_shaped_text_get_ellipsis_glyphs”const Glyph* _shaped_text_get_ellipsis_glyphs(shaped: RID) virtual required const
Returns array of the glyphs in the ellipsis.
_shaped_text_get_ellipsis_pos
Section titled “_shaped_text_get_ellipsis_pos”int _shaped_text_get_ellipsis_pos(shaped: RID) virtual required const
Returns position of the ellipsis.
_shaped_text_get_glyph_count
Section titled “_shaped_text_get_glyph_count”int _shaped_text_get_glyph_count(shaped: RID) virtual required const
Returns number of glyphs in the buffer.
_shaped_text_get_glyphs
Section titled “_shaped_text_get_glyphs”const Glyph* _shaped_text_get_glyphs(shaped: RID) virtual required const
Returns an array of glyphs in the visual order.
_shaped_text_get_grapheme_bounds
Section titled “_shaped_text_get_grapheme_bounds”Vector2 _shaped_text_get_grapheme_bounds(shaped: RID, pos: int) virtual const
Returns composite character’s bounds as offsets from the start of the line.
_shaped_text_get_inferred_direction
Section titled “_shaped_text_get_inferred_direction”TextShaping.Direction _shaped_text_get_inferred_direction(shaped: RID) virtual const
Returns direction of the text, inferred by the BiDi algorithm.
_shaped_text_get_line_breaks
Section titled “_shaped_text_get_line_breaks”[]i32 _shaped_text_get_line_breaks(shaped: RID, width: float, start: int, break_flags: TextShaping.LineBreakFlag) virtual const
Breaks text to the lines and returns character ranges for each line.
_shaped_text_get_line_breaks_adv
Section titled “_shaped_text_get_line_breaks_adv”[]i32 _shaped_text_get_line_breaks_adv(shaped: RID, width: []f32, start: int, once: bool, break_flags: TextShaping.LineBreakFlag) virtual const
Breaks text to the lines and columns. Returns character ranges for each segment.
_shaped_text_get_object_glyph
Section titled “_shaped_text_get_object_glyph”int _shaped_text_get_object_glyph(shaped: RID, key: Variant) virtual required const
Returns the glyph index of the inline object.
_shaped_text_get_object_range
Section titled “_shaped_text_get_object_range”Vector2i _shaped_text_get_object_range(shaped: RID, key: Variant) virtual required const
Returns the character range of the inline object.
_shaped_text_get_object_rect
Section titled “_shaped_text_get_object_rect”Rect2 _shaped_text_get_object_rect(shaped: RID, key: Variant) virtual required const
Returns bounding rectangle of the inline object.
_shaped_text_get_objects
Section titled “_shaped_text_get_objects”Array _shaped_text_get_objects(shaped: RID) virtual required const
Returns array of inline objects.
_shaped_text_get_orientation
Section titled “_shaped_text_get_orientation”TextShaping.Orientation _shaped_text_get_orientation(shaped: RID) virtual const
Returns text orientation.
_shaped_text_get_parent
Section titled “_shaped_text_get_parent”RID _shaped_text_get_parent(shaped: RID) virtual required const
Returns the parent buffer from which the substring originates.
_shaped_text_get_preserve_control
Section titled “_shaped_text_get_preserve_control”bool _shaped_text_get_preserve_control(shaped: RID) virtual const
Returns true if text buffer is configured to display control characters.
_shaped_text_get_preserve_invalid
Section titled “_shaped_text_get_preserve_invalid”bool _shaped_text_get_preserve_invalid(shaped: RID) virtual const
Returns true if text buffer is configured to display hexadecimal codes in place of invalid characters.
_shaped_text_get_range
Section titled “_shaped_text_get_range”Vector2i _shaped_text_get_range(shaped: RID) virtual required const
Returns substring buffer character range in the parent buffer.
_shaped_text_get_selection
Section titled “_shaped_text_get_selection”[]Vector2 _shaped_text_get_selection(shaped: RID, start: int, end: int) virtual const
Returns selection rectangles for the specified character range.
_shaped_text_get_size
Section titled “_shaped_text_get_size”Vector2 _shaped_text_get_size(shaped: RID) virtual required const
Returns size of the text.
_shaped_text_get_spacing
Section titled “_shaped_text_get_spacing”int _shaped_text_get_spacing(shaped: RID, spacing: TextShaping.SpacingType) virtual const
Returns extra spacing added between glyphs or lines in pixels.
_shaped_text_get_trim_pos
Section titled “_shaped_text_get_trim_pos”int _shaped_text_get_trim_pos(shaped: RID) virtual required const
Returns the position of the overrun trim.
_shaped_text_get_underline_position
Section titled “_shaped_text_get_underline_position”float _shaped_text_get_underline_position(shaped: RID) virtual required const
Returns pixel offset of the underline below the baseline.
_shaped_text_get_underline_thickness
Section titled “_shaped_text_get_underline_thickness”float _shaped_text_get_underline_thickness(shaped: RID) virtual required const
Returns thickness of the underline.
_shaped_text_get_width
Section titled “_shaped_text_get_width”float _shaped_text_get_width(shaped: RID) virtual required const
Returns width (for horizontal layout) or height (for vertical) of the text.
_shaped_text_get_word_breaks
Section titled “_shaped_text_get_word_breaks”[]i32 _shaped_text_get_word_breaks(shaped: RID, grapheme_flags: TextShaping.GraphemeFlag, skip_grapheme_flags: TextShaping.GraphemeFlag) virtual const
Breaks text into words and returns array of character ranges. Use grapheme_flags to set what characters are used for breaking.
_shaped_text_has_object
Section titled “_shaped_text_has_object”bool _shaped_text_has_object(shaped: RID, key: Variant) virtual required const
Returns true if an object with key is embedded in this shaped text buffer.
_shaped_text_hit_test_grapheme
Section titled “_shaped_text_hit_test_grapheme”int _shaped_text_hit_test_grapheme(shaped: RID, coord: float) virtual const
Returns grapheme index at the specified pixel offset at the baseline, or -1 if none is found.
_shaped_text_hit_test_position
Section titled “_shaped_text_hit_test_position”int _shaped_text_hit_test_position(shaped: RID, coord: float) virtual const
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
_shaped_text_is_ready
Section titled “_shaped_text_is_ready”bool _shaped_text_is_ready(shaped: RID) virtual required const
Returns true if buffer is successfully shaped.
_shaped_text_next_character_pos
Section titled “_shaped_text_next_character_pos”int _shaped_text_next_character_pos(shaped: RID, pos: int) virtual const
Returns composite character end position closest to the pos.
_shaped_text_next_grapheme_pos
Section titled “_shaped_text_next_grapheme_pos”int _shaped_text_next_grapheme_pos(shaped: RID, pos: int) virtual const
Returns grapheme end position closest to the pos.
_shaped_text_overrun_trim_to_width
Section titled “_shaped_text_overrun_trim_to_width”void _shaped_text_overrun_trim_to_width(shaped: RID, width: float, trim_flags: TextShaping.TextOverrunFlag) virtual
Trims text if it exceeds the given width.
_shaped_text_prev_character_pos
Section titled “_shaped_text_prev_character_pos”int _shaped_text_prev_character_pos(shaped: RID, pos: int) virtual const
Returns composite character start position closest to the pos.
_shaped_text_prev_grapheme_pos
Section titled “_shaped_text_prev_grapheme_pos”int _shaped_text_prev_grapheme_pos(shaped: RID, pos: int) virtual const
Returns grapheme start position closest to the pos.
_shaped_text_resize_object
Section titled “_shaped_text_resize_object”bool _shaped_text_resize_object(shaped: RID, key: Variant, size: Vector2, inline_align: InlineAlignment, baseline: float) virtual required
Sets new size and alignment of embedded object.
_shaped_text_set_bidi_override
Section titled “_shaped_text_set_bidi_override”void _shaped_text_set_bidi_override(shaped: RID, override: Array) virtual
Overrides BiDi for the structured text.
_shaped_text_set_custom_ellipsis
Section titled “_shaped_text_set_custom_ellipsis”void _shaped_text_set_custom_ellipsis(shaped: RID, char: int) virtual
Sets ellipsis character used for text clipping.
_shaped_text_set_custom_punctuation
Section titled “_shaped_text_set_custom_punctuation”void _shaped_text_set_custom_punctuation(shaped: RID, punct: String) virtual
Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
_shaped_text_set_direction
Section titled “_shaped_text_set_direction”void _shaped_text_set_direction(shaped: RID, direction: TextShaping.Direction) virtual
Sets desired text direction. If set to TextShaping.DIRECTION_AUTO, direction will be detected based on the buffer contents and current locale.
_shaped_text_set_orientation
Section titled “_shaped_text_set_orientation”void _shaped_text_set_orientation(shaped: RID, orientation: TextShaping.Orientation) virtual
Sets desired text orientation.
_shaped_text_set_preserve_control
Section titled “_shaped_text_set_preserve_control”void _shaped_text_set_preserve_control(shaped: RID, enabled: bool) virtual
If set to true text buffer will display control characters.
_shaped_text_set_preserve_invalid
Section titled “_shaped_text_set_preserve_invalid”void _shaped_text_set_preserve_invalid(shaped: RID, enabled: bool) virtual
If set to true text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
_shaped_text_set_spacing
Section titled “_shaped_text_set_spacing”void _shaped_text_set_spacing(shaped: RID, spacing: TextShaping.SpacingType, value: int) virtual
Sets extra spacing added between glyphs or lines in pixels.
_shaped_text_shape
Section titled “_shaped_text_shape”bool _shaped_text_shape(shaped: RID) virtual required
Shapes buffer if it’s not shaped. Returns true if the string is shaped successfully.
_shaped_text_sort_logical
Section titled “_shaped_text_sort_logical”const Glyph* _shaped_text_sort_logical(shaped: RID) virtual required
Returns text glyphs in the logical order.
_shaped_text_substr
Section titled “_shaped_text_substr”RID _shaped_text_substr(shaped: RID, start: int, length: int) virtual required const
Returns text buffer for the substring of the text in the shaped text buffer (including inline objects).
_shaped_text_tab_align
Section titled “_shaped_text_tab_align”float _shaped_text_tab_align(shaped: RID, tab_stops: []f32) virtual
Aligns shaped text to the given tab-stops.
_shaped_text_update_breaks
Section titled “_shaped_text_update_breaks”bool _shaped_text_update_breaks(shaped: RID) virtual
Updates break points in the shaped text. This method is called by default implementation of text breaking functions.
_shaped_text_update_justification_ops
Section titled “_shaped_text_update_justification_ops”bool _shaped_text_update_justification_ops(shaped: RID) virtual
Updates justification points in the shaped text. This method is called by default implementation of text justification functions.
_spoof_check
Section titled “_spoof_check”bool _spoof_check(string: String) virtual const
Returns true if string is likely to be an attempt at confusing the reader.
_string_get_character_breaks
Section titled “_string_get_character_breaks”[]i32 _string_get_character_breaks(string: String, language: String) virtual const
Returns array of the composite character boundaries.
_string_get_word_breaks
Section titled “_string_get_word_breaks”[]i32 _string_get_word_breaks(string: String, language: String, chars_per_line: int) virtual const
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_to_lower
Section titled “_string_to_lower”String _string_to_lower(string: String, language: String) virtual const
Returns the string converted to lowercase.
_string_to_title
Section titled “_string_to_title”String _string_to_title(string: String, language: String) virtual const
Returns the string converted to Title Case.
_string_to_upper
Section titled “_string_to_upper”String _string_to_upper(string: String, language: String) virtual const
Returns the string converted to UPPERCASE.
_strip_diacritics
Section titled “_strip_diacritics”String _strip_diacritics(string: String) virtual const
Strips diacritics from the string.
_tag_to_name
Section titled “_tag_to_name”String _tag_to_name(tag: int) virtual const
Converts the given OpenType tag to the readable name of a feature, variation, script, or language.
_unreference_oversampling_level
Section titled “_unreference_oversampling_level”void _unreference_oversampling_level(oversampling: float) virtual
Decreases the reference count of the specified oversampling level, and frees the font cache for oversampling level when the reference count reaches zero. This method is called by Viewport, and should not be used directly.