godot_core::classes

Trait ITextServerExtension

Source
pub trait ITextServerExtension: GodotClass<Base = TextServerExtension> + You_forgot_the_attribute__godot_api {
Show 223 methods // Required methods fn has_feature(&self, feature: Feature) -> bool; fn get_name(&self) -> GString; fn get_features(&self) -> i64; fn free_rid(&mut self, rid: Rid); fn has(&mut self, rid: Rid) -> bool; fn create_font(&mut self) -> Rid; fn font_set_fixed_size(&mut self, font_rid: Rid, fixed_size: i64); fn font_get_fixed_size(&self, font_rid: Rid) -> i64; fn font_set_fixed_size_scale_mode( &mut self, font_rid: Rid, fixed_size_scale_mode: FixedSizeScaleMode, ); fn font_get_fixed_size_scale_mode( &self, font_rid: Rid, ) -> FixedSizeScaleMode; fn font_get_size_cache_list(&self, font_rid: Rid) -> Array<Vector2i>; fn font_clear_size_cache(&mut self, font_rid: Rid); fn font_remove_size_cache(&mut self, font_rid: Rid, size: Vector2i); fn font_set_ascent(&mut self, font_rid: Rid, size: i64, ascent: f64); fn font_get_ascent(&self, font_rid: Rid, size: i64) -> f64; fn font_set_descent(&mut self, font_rid: Rid, size: i64, descent: f64); fn font_get_descent(&self, font_rid: Rid, size: i64) -> f64; fn font_set_underline_position( &mut self, font_rid: Rid, size: i64, underline_position: f64, ); fn font_get_underline_position(&self, font_rid: Rid, size: i64) -> f64; fn font_set_underline_thickness( &mut self, font_rid: Rid, size: i64, underline_thickness: f64, ); fn font_get_underline_thickness(&self, font_rid: Rid, size: i64) -> f64; fn font_set_scale(&mut self, font_rid: Rid, size: i64, scale: f64); fn font_get_scale(&self, font_rid: Rid, size: i64) -> f64; fn font_get_texture_count(&self, font_rid: Rid, size: Vector2i) -> i64; fn font_clear_textures(&mut self, font_rid: Rid, size: Vector2i); fn font_remove_texture( &mut self, font_rid: Rid, size: Vector2i, texture_index: i64, ); fn font_set_texture_image( &mut self, font_rid: Rid, size: Vector2i, texture_index: i64, image: Option<Gd<Image>>, ); fn font_get_texture_image( &self, font_rid: Rid, size: Vector2i, texture_index: i64, ) -> Option<Gd<Image>>; fn font_get_glyph_list( &self, font_rid: Rid, size: Vector2i, ) -> PackedInt32Array; fn font_clear_glyphs(&mut self, font_rid: Rid, size: Vector2i); fn font_remove_glyph(&mut self, font_rid: Rid, size: Vector2i, glyph: i64); fn font_get_glyph_advance( &self, font_rid: Rid, size: i64, glyph: i64, ) -> Vector2; fn font_set_glyph_advance( &mut self, font_rid: Rid, size: i64, glyph: i64, advance: Vector2, ); fn font_get_glyph_offset( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Vector2; fn font_set_glyph_offset( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, offset: Vector2, ); fn font_get_glyph_size( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Vector2; fn font_set_glyph_size( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, gl_size: Vector2, ); fn font_get_glyph_uv_rect( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Rect2; fn font_set_glyph_uv_rect( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, uv_rect: Rect2, ); fn font_get_glyph_texture_idx( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> i64; fn font_set_glyph_texture_idx( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, texture_idx: i64, ); fn font_get_glyph_texture_rid( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Rid; fn font_get_glyph_texture_size( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Vector2; fn font_get_glyph_index( &self, font_rid: Rid, size: i64, char: i64, variation_selector: i64, ) -> i64; fn font_get_char_from_glyph_index( &self, font_rid: Rid, size: i64, glyph_index: i64, ) -> i64; fn font_has_char(&self, font_rid: Rid, char: i64) -> bool; fn font_get_supported_chars(&self, font_rid: Rid) -> GString; fn font_draw_glyph( &self, font_rid: Rid, canvas: Rid, size: i64, pos: Vector2, index: i64, color: Color, ); fn font_draw_glyph_outline( &self, font_rid: Rid, canvas: Rid, size: i64, outline_size: i64, pos: Vector2, index: i64, color: Color, ); fn create_shaped_text( &mut self, direction: Direction, orientation: Orientation, ) -> Rid; fn shaped_text_clear(&mut self, shaped: Rid); fn shaped_text_add_string( &mut self, shaped: Rid, text: GString, fonts: Array<Rid>, size: i64, opentype_features: Dictionary, language: GString, meta: Variant, ) -> bool; fn shaped_text_add_object( &mut self, shaped: Rid, key: Variant, size: Vector2, inline_align: InlineAlignment, length: i64, baseline: f64, ) -> bool; fn shaped_text_resize_object( &mut self, shaped: Rid, key: Variant, size: Vector2, inline_align: InlineAlignment, baseline: f64, ) -> bool; fn shaped_get_span_count(&self, shaped: Rid) -> i64; fn shaped_get_span_meta(&self, shaped: Rid, index: i64) -> Variant; fn shaped_set_span_update_font( &mut self, shaped: Rid, index: i64, fonts: Array<Rid>, size: i64, opentype_features: Dictionary, ); fn shaped_text_substr(&self, shaped: Rid, start: i64, length: i64) -> Rid; fn shaped_text_get_parent(&self, shaped: Rid) -> Rid; fn shaped_text_shape(&mut self, shaped: Rid) -> bool; fn shaped_text_is_ready(&self, shaped: Rid) -> bool; unsafe fn shaped_text_get_glyphs(&self, shaped: Rid) -> *const Glyph; unsafe fn shaped_text_sort_logical(&mut self, shaped: Rid) -> *const Glyph; fn shaped_text_get_glyph_count(&self, shaped: Rid) -> i64; fn shaped_text_get_range(&self, shaped: Rid) -> Vector2i; fn shaped_text_get_trim_pos(&self, shaped: Rid) -> i64; fn shaped_text_get_ellipsis_pos(&self, shaped: Rid) -> i64; fn shaped_text_get_ellipsis_glyph_count(&self, shaped: Rid) -> i64; unsafe fn shaped_text_get_ellipsis_glyphs( &self, shaped: Rid, ) -> *const Glyph; fn shaped_text_get_objects(&self, shaped: Rid) -> VariantArray; fn shaped_text_get_object_rect(&self, shaped: Rid, key: Variant) -> Rect2; fn shaped_text_get_object_range( &self, shaped: Rid, key: Variant, ) -> Vector2i; fn shaped_text_get_object_glyph(&self, shaped: Rid, key: Variant) -> i64; fn shaped_text_get_size(&self, shaped: Rid) -> Vector2; fn shaped_text_get_ascent(&self, shaped: Rid) -> f64; fn shaped_text_get_descent(&self, shaped: Rid) -> f64; fn shaped_text_get_width(&self, shaped: Rid) -> f64; fn shaped_text_get_underline_position(&self, shaped: Rid) -> f64; fn shaped_text_get_underline_thickness(&self, shaped: Rid) -> f64; // Provided methods fn init(base: Base<Self::Base>) -> Self { ... } fn to_string(&self) -> GString { ... } fn on_notification(&mut self, what: ObjectNotification) { ... } fn get_property(&self, property: StringName) -> Option<Variant> { ... } fn set_property(&mut self, property: StringName, value: Variant) -> bool { ... } fn get_property_list(&mut self) -> Vec<PropertyInfo> { ... } fn property_get_revert(&self, property: StringName) -> Option<Variant> { ... } fn load_support_data(&mut self, filename: GString) -> bool { ... } fn get_support_data_filename(&self) -> GString { ... } fn get_support_data_info(&self) -> GString { ... } fn save_support_data(&self, filename: GString) -> bool { ... } fn is_locale_right_to_left(&self, locale: GString) -> bool { ... } fn name_to_tag(&self, name: GString) -> i64 { ... } fn tag_to_name(&self, tag: i64) -> GString { ... } fn create_font_linked_variation(&mut self, font_rid: Rid) -> Rid { ... } fn font_set_data(&mut self, font_rid: Rid, data: PackedByteArray) { ... } unsafe fn font_set_data_ptr( &mut self, font_rid: Rid, data_ptr: *const u8, data_size: i64, ) { ... } fn font_set_face_index(&mut self, font_rid: Rid, face_index: i64) { ... } fn font_get_face_index(&self, font_rid: Rid) -> i64 { ... } fn font_get_face_count(&self, font_rid: Rid) -> i64 { ... } fn font_set_style(&mut self, font_rid: Rid, style: FontStyle) { ... } fn font_get_style(&self, font_rid: Rid) -> FontStyle { ... } fn font_set_name(&mut self, font_rid: Rid, name: GString) { ... } fn font_get_name(&self, font_rid: Rid) -> GString { ... } fn font_get_ot_name_strings(&self, font_rid: Rid) -> Dictionary { ... } fn font_set_style_name(&mut self, font_rid: Rid, name_style: GString) { ... } fn font_get_style_name(&self, font_rid: Rid) -> GString { ... } fn font_set_weight(&mut self, font_rid: Rid, weight: i64) { ... } fn font_get_weight(&self, font_rid: Rid) -> i64 { ... } fn font_set_stretch(&mut self, font_rid: Rid, stretch: i64) { ... } fn font_get_stretch(&self, font_rid: Rid) -> i64 { ... } fn font_set_antialiasing( &mut self, font_rid: Rid, antialiasing: FontAntialiasing, ) { ... } fn font_get_antialiasing(&self, font_rid: Rid) -> FontAntialiasing { ... } fn font_set_disable_embedded_bitmaps( &mut self, font_rid: Rid, disable_embedded_bitmaps: bool, ) { ... } fn font_get_disable_embedded_bitmaps(&self, font_rid: Rid) -> bool { ... } fn font_set_generate_mipmaps( &mut self, font_rid: Rid, generate_mipmaps: bool, ) { ... } fn font_get_generate_mipmaps(&self, font_rid: Rid) -> bool { ... } fn font_set_multichannel_signed_distance_field( &mut self, font_rid: Rid, msdf: bool, ) { ... } fn font_is_multichannel_signed_distance_field(&self, font_rid: Rid) -> bool { ... } fn font_set_msdf_pixel_range( &mut self, font_rid: Rid, msdf_pixel_range: i64, ) { ... } fn font_get_msdf_pixel_range(&self, font_rid: Rid) -> i64 { ... } fn font_set_msdf_size(&mut self, font_rid: Rid, msdf_size: i64) { ... } fn font_get_msdf_size(&self, font_rid: Rid) -> i64 { ... } fn font_set_allow_system_fallback( &mut self, font_rid: Rid, allow_system_fallback: bool, ) { ... } fn font_is_allow_system_fallback(&self, font_rid: Rid) -> bool { ... } fn font_set_force_autohinter( &mut self, font_rid: Rid, force_autohinter: bool, ) { ... } fn font_is_force_autohinter(&self, font_rid: Rid) -> bool { ... } fn font_set_hinting(&mut self, font_rid: Rid, hinting: Hinting) { ... } fn font_get_hinting(&self, font_rid: Rid) -> Hinting { ... } fn font_set_subpixel_positioning( &mut self, font_rid: Rid, subpixel_positioning: SubpixelPositioning, ) { ... } fn font_get_subpixel_positioning( &self, font_rid: Rid, ) -> SubpixelPositioning { ... } fn font_set_embolden(&mut self, font_rid: Rid, strength: f64) { ... } fn font_get_embolden(&self, font_rid: Rid) -> f64 { ... } fn font_set_spacing( &mut self, font_rid: Rid, spacing: SpacingType, value: i64, ) { ... } fn font_get_spacing(&self, font_rid: Rid, spacing: SpacingType) -> i64 { ... } fn font_set_baseline_offset(&mut self, font_rid: Rid, baseline_offset: f64) { ... } fn font_get_baseline_offset(&self, font_rid: Rid) -> f64 { ... } fn font_set_transform(&mut self, font_rid: Rid, transform: Transform2D) { ... } fn font_get_transform(&self, font_rid: Rid) -> Transform2D { ... } fn font_set_variation_coordinates( &mut self, font_rid: Rid, variation_coordinates: Dictionary, ) { ... } fn font_get_variation_coordinates(&self, font_rid: Rid) -> Dictionary { ... } fn font_set_oversampling(&mut self, font_rid: Rid, oversampling: f64) { ... } fn font_get_oversampling(&self, font_rid: Rid) -> f64 { ... } fn font_set_texture_offsets( &mut self, font_rid: Rid, size: Vector2i, texture_index: i64, offset: PackedInt32Array, ) { ... } fn font_get_texture_offsets( &self, font_rid: Rid, size: Vector2i, texture_index: i64, ) -> PackedInt32Array { ... } fn font_get_glyph_contours( &self, font_rid: Rid, size: i64, index: i64, ) -> Dictionary { ... } fn font_get_kerning_list(&self, font_rid: Rid, size: i64) -> Array<Vector2i> { ... } fn font_clear_kerning_map(&mut self, font_rid: Rid, size: i64) { ... } fn font_remove_kerning( &mut self, font_rid: Rid, size: i64, glyph_pair: Vector2i, ) { ... } fn font_set_kerning( &mut self, font_rid: Rid, size: i64, glyph_pair: Vector2i, kerning: Vector2, ) { ... } fn font_get_kerning( &self, font_rid: Rid, size: i64, glyph_pair: Vector2i, ) -> Vector2 { ... } fn font_render_range( &mut self, font_rid: Rid, size: Vector2i, start: i64, end: i64, ) { ... } fn font_render_glyph(&mut self, font_rid: Rid, size: Vector2i, index: i64) { ... } fn font_is_language_supported( &self, font_rid: Rid, language: GString, ) -> bool { ... } fn font_set_language_support_override( &mut self, font_rid: Rid, language: GString, supported: bool, ) { ... } fn font_get_language_support_override( &mut self, font_rid: Rid, language: GString, ) -> bool { ... } fn font_remove_language_support_override( &mut self, font_rid: Rid, language: GString, ) { ... } fn font_get_language_support_overrides( &mut self, font_rid: Rid, ) -> PackedStringArray { ... } fn font_is_script_supported(&self, font_rid: Rid, script: GString) -> bool { ... } fn font_set_script_support_override( &mut self, font_rid: Rid, script: GString, supported: bool, ) { ... } fn font_get_script_support_override( &mut self, font_rid: Rid, script: GString, ) -> bool { ... } fn font_remove_script_support_override( &mut self, font_rid: Rid, script: GString, ) { ... } fn font_get_script_support_overrides( &mut self, font_rid: Rid, ) -> PackedStringArray { ... } fn font_set_opentype_feature_overrides( &mut self, font_rid: Rid, overrides: Dictionary, ) { ... } fn font_get_opentype_feature_overrides(&self, font_rid: Rid) -> Dictionary { ... } fn font_supported_feature_list(&self, font_rid: Rid) -> Dictionary { ... } fn font_supported_variation_list(&self, font_rid: Rid) -> Dictionary { ... } fn font_get_global_oversampling(&self) -> f64 { ... } fn font_set_global_oversampling(&mut self, oversampling: f64) { ... } fn get_hex_code_box_size(&self, size: i64, index: i64) -> Vector2 { ... } fn draw_hex_code_box( &self, canvas: Rid, size: i64, pos: Vector2, index: i64, color: Color, ) { ... } fn shaped_text_set_direction(&mut self, shaped: Rid, direction: Direction) { ... } fn shaped_text_get_direction(&self, shaped: Rid) -> Direction { ... } fn shaped_text_get_inferred_direction(&self, shaped: Rid) -> Direction { ... } fn shaped_text_set_bidi_override( &mut self, shaped: Rid, override_: VariantArray, ) { ... } fn shaped_text_set_custom_punctuation( &mut self, shaped: Rid, punct: GString, ) { ... } fn shaped_text_get_custom_punctuation(&self, shaped: Rid) -> GString { ... } fn shaped_text_set_custom_ellipsis(&mut self, shaped: Rid, char: i64) { ... } fn shaped_text_get_custom_ellipsis(&self, shaped: Rid) -> i64 { ... } fn shaped_text_set_orientation( &mut self, shaped: Rid, orientation: Orientation, ) { ... } fn shaped_text_get_orientation(&self, shaped: Rid) -> Orientation { ... } fn shaped_text_set_preserve_invalid(&mut self, shaped: Rid, enabled: bool) { ... } fn shaped_text_get_preserve_invalid(&self, shaped: Rid) -> bool { ... } fn shaped_text_set_preserve_control(&mut self, shaped: Rid, enabled: bool) { ... } fn shaped_text_get_preserve_control(&self, shaped: Rid) -> bool { ... } fn shaped_text_set_spacing( &mut self, shaped: Rid, spacing: SpacingType, value: i64, ) { ... } fn shaped_text_get_spacing(&self, shaped: Rid, spacing: SpacingType) -> i64 { ... } fn shaped_text_fit_to_width( &mut self, shaped: Rid, width: f64, justification_flags: JustificationFlag, ) -> f64 { ... } fn shaped_text_tab_align( &mut self, shaped: Rid, tab_stops: PackedFloat32Array, ) -> f64 { ... } fn shaped_text_update_breaks(&mut self, shaped: Rid) -> bool { ... } fn shaped_text_update_justification_ops(&mut self, shaped: Rid) -> bool { ... } fn shaped_text_get_line_breaks_adv( &self, shaped: Rid, width: PackedFloat32Array, start: i64, once: bool, break_flags: LineBreakFlag, ) -> PackedInt32Array { ... } fn shaped_text_get_line_breaks( &self, shaped: Rid, width: f64, start: i64, break_flags: LineBreakFlag, ) -> PackedInt32Array { ... } fn shaped_text_get_word_breaks( &self, shaped: Rid, grapheme_flags: GraphemeFlag, skip_grapheme_flags: GraphemeFlag, ) -> PackedInt32Array { ... } fn shaped_text_overrun_trim_to_width( &mut self, shaped: Rid, width: f64, trim_flags: TextOverrunFlag, ) { ... } fn shaped_text_get_dominant_direction_in_range( &self, shaped: Rid, start: i64, end: i64, ) -> i64 { ... } unsafe fn shaped_text_get_carets( &self, shaped: Rid, position: i64, caret: *mut CaretInfo, ) { ... } fn shaped_text_get_selection( &self, shaped: Rid, start: i64, end: i64, ) -> PackedVector2Array { ... } fn shaped_text_hit_test_grapheme(&self, shaped: Rid, coord: f64) -> i64 { ... } fn shaped_text_hit_test_position(&self, shaped: Rid, coord: f64) -> i64 { ... } fn shaped_text_draw( &self, shaped: Rid, canvas: Rid, pos: Vector2, clip_l: f64, clip_r: f64, color: Color, ) { ... } fn shaped_text_draw_outline( &self, shaped: Rid, canvas: Rid, pos: Vector2, clip_l: f64, clip_r: f64, outline_size: i64, color: Color, ) { ... } fn shaped_text_get_grapheme_bounds(&self, shaped: Rid, pos: i64) -> Vector2 { ... } fn shaped_text_next_grapheme_pos(&self, shaped: Rid, pos: i64) -> i64 { ... } fn shaped_text_prev_grapheme_pos(&self, shaped: Rid, pos: i64) -> i64 { ... } fn shaped_text_get_character_breaks(&self, shaped: Rid) -> PackedInt32Array { ... } fn shaped_text_next_character_pos(&self, shaped: Rid, pos: i64) -> i64 { ... } fn shaped_text_prev_character_pos(&self, shaped: Rid, pos: i64) -> i64 { ... } fn shaped_text_closest_character_pos(&self, shaped: Rid, pos: i64) -> i64 { ... } fn format_number(&self, number: GString, language: GString) -> GString { ... } fn parse_number(&self, number: GString, language: GString) -> GString { ... } fn percent_sign(&self, language: GString) -> GString { ... } fn strip_diacritics(&self, string: GString) -> GString { ... } fn is_valid_identifier(&self, string: GString) -> bool { ... } fn is_valid_letter(&self, unicode: u64) -> bool { ... } fn string_get_word_breaks( &self, string: GString, language: GString, chars_per_line: i64, ) -> PackedInt32Array { ... } fn string_get_character_breaks( &self, string: GString, language: GString, ) -> PackedInt32Array { ... } fn is_confusable(&self, string: GString, dict: PackedStringArray) -> i64 { ... } fn spoof_check(&self, string: GString) -> bool { ... } fn string_to_upper(&self, string: GString, language: GString) -> GString { ... } fn string_to_lower(&self, string: GString, language: GString) -> GString { ... } fn string_to_title(&self, string: GString, language: GString) -> GString { ... } fn parse_structured_text( &self, parser_type: StructuredTextParser, args: VariantArray, text: GString, ) -> Array<Vector3i> { ... } fn cleanup(&mut self) { ... }
}
Expand description

Virtual methods for class TextServerExtension.

These methods represent constructors (init) or callbacks invoked by the engine.

See also Godot docs for TextServerExtension methods.

Required Methods§

Source

fn has_feature(&self, feature: Feature) -> bool

Source

fn get_name(&self) -> GString

Source

fn get_features(&self) -> i64

Source

fn free_rid(&mut self, rid: Rid)

Source

fn has(&mut self, rid: Rid) -> bool

Source

fn create_font(&mut self) -> Rid

Source

fn font_set_fixed_size(&mut self, font_rid: Rid, fixed_size: i64)

Source

fn font_get_fixed_size(&self, font_rid: Rid) -> i64

Source

fn font_set_fixed_size_scale_mode( &mut self, font_rid: Rid, fixed_size_scale_mode: FixedSizeScaleMode, )

Source

fn font_get_fixed_size_scale_mode(&self, font_rid: Rid) -> FixedSizeScaleMode

Source

fn font_get_size_cache_list(&self, font_rid: Rid) -> Array<Vector2i>

Source

fn font_clear_size_cache(&mut self, font_rid: Rid)

Source

fn font_remove_size_cache(&mut self, font_rid: Rid, size: Vector2i)

Source

fn font_set_ascent(&mut self, font_rid: Rid, size: i64, ascent: f64)

Source

fn font_get_ascent(&self, font_rid: Rid, size: i64) -> f64

Source

fn font_set_descent(&mut self, font_rid: Rid, size: i64, descent: f64)

Source

fn font_get_descent(&self, font_rid: Rid, size: i64) -> f64

Source

fn font_set_underline_position( &mut self, font_rid: Rid, size: i64, underline_position: f64, )

Source

fn font_get_underline_position(&self, font_rid: Rid, size: i64) -> f64

Source

fn font_set_underline_thickness( &mut self, font_rid: Rid, size: i64, underline_thickness: f64, )

Source

fn font_get_underline_thickness(&self, font_rid: Rid, size: i64) -> f64

Source

fn font_set_scale(&mut self, font_rid: Rid, size: i64, scale: f64)

Source

fn font_get_scale(&self, font_rid: Rid, size: i64) -> f64

Source

fn font_get_texture_count(&self, font_rid: Rid, size: Vector2i) -> i64

Source

fn font_clear_textures(&mut self, font_rid: Rid, size: Vector2i)

Source

fn font_remove_texture( &mut self, font_rid: Rid, size: Vector2i, texture_index: i64, )

Source

fn font_set_texture_image( &mut self, font_rid: Rid, size: Vector2i, texture_index: i64, image: Option<Gd<Image>>, )

Source

fn font_get_texture_image( &self, font_rid: Rid, size: Vector2i, texture_index: i64, ) -> Option<Gd<Image>>

Source

fn font_get_glyph_list(&self, font_rid: Rid, size: Vector2i) -> PackedInt32Array

Source

fn font_clear_glyphs(&mut self, font_rid: Rid, size: Vector2i)

Source

fn font_remove_glyph(&mut self, font_rid: Rid, size: Vector2i, glyph: i64)

Source

fn font_get_glyph_advance( &self, font_rid: Rid, size: i64, glyph: i64, ) -> Vector2

Source

fn font_set_glyph_advance( &mut self, font_rid: Rid, size: i64, glyph: i64, advance: Vector2, )

Source

fn font_get_glyph_offset( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Vector2

Source

fn font_set_glyph_offset( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, offset: Vector2, )

Source

fn font_get_glyph_size( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Vector2

Source

fn font_set_glyph_size( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, gl_size: Vector2, )

Source

fn font_get_glyph_uv_rect( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Rect2

Source

fn font_set_glyph_uv_rect( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, uv_rect: Rect2, )

Source

fn font_get_glyph_texture_idx( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> i64

Source

fn font_set_glyph_texture_idx( &mut self, font_rid: Rid, size: Vector2i, glyph: i64, texture_idx: i64, )

Source

fn font_get_glyph_texture_rid( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Rid

Source

fn font_get_glyph_texture_size( &self, font_rid: Rid, size: Vector2i, glyph: i64, ) -> Vector2

Source

fn font_get_glyph_index( &self, font_rid: Rid, size: i64, char: i64, variation_selector: i64, ) -> i64

Source

fn font_get_char_from_glyph_index( &self, font_rid: Rid, size: i64, glyph_index: i64, ) -> i64

Source

fn font_has_char(&self, font_rid: Rid, char: i64) -> bool

Source

fn font_get_supported_chars(&self, font_rid: Rid) -> GString

Source

fn font_draw_glyph( &self, font_rid: Rid, canvas: Rid, size: i64, pos: Vector2, index: i64, color: Color, )

Source

fn font_draw_glyph_outline( &self, font_rid: Rid, canvas: Rid, size: i64, outline_size: i64, pos: Vector2, index: i64, color: Color, )

Source

fn create_shaped_text( &mut self, direction: Direction, orientation: Orientation, ) -> Rid

Source

fn shaped_text_clear(&mut self, shaped: Rid)

Source

fn shaped_text_add_string( &mut self, shaped: Rid, text: GString, fonts: Array<Rid>, size: i64, opentype_features: Dictionary, language: GString, meta: Variant, ) -> bool

Source

fn shaped_text_add_object( &mut self, shaped: Rid, key: Variant, size: Vector2, inline_align: InlineAlignment, length: i64, baseline: f64, ) -> bool

Source

fn shaped_text_resize_object( &mut self, shaped: Rid, key: Variant, size: Vector2, inline_align: InlineAlignment, baseline: f64, ) -> bool

Source

fn shaped_get_span_count(&self, shaped: Rid) -> i64

Source

fn shaped_get_span_meta(&self, shaped: Rid, index: i64) -> Variant

Source

fn shaped_set_span_update_font( &mut self, shaped: Rid, index: i64, fonts: Array<Rid>, size: i64, opentype_features: Dictionary, )

Source

fn shaped_text_substr(&self, shaped: Rid, start: i64, length: i64) -> Rid

Source

fn shaped_text_get_parent(&self, shaped: Rid) -> Rid

Source

fn shaped_text_shape(&mut self, shaped: Rid) -> bool

Source

fn shaped_text_is_ready(&self, shaped: Rid) -> bool

Source

unsafe fn shaped_text_get_glyphs(&self, shaped: Rid) -> *const Glyph

§Safety

This method has automatically been marked unsafe because it accepts raw pointers as parameters. If Godot does not document any safety requirements, make sure you understand the underlying semantics.

Source

unsafe fn shaped_text_sort_logical(&mut self, shaped: Rid) -> *const Glyph

§Safety

This method has automatically been marked unsafe because it accepts raw pointers as parameters. If Godot does not document any safety requirements, make sure you understand the underlying semantics.

Source

fn shaped_text_get_glyph_count(&self, shaped: Rid) -> i64

Source

fn shaped_text_get_range(&self, shaped: Rid) -> Vector2i

Source

fn shaped_text_get_trim_pos(&self, shaped: Rid) -> i64

Source

fn shaped_text_get_ellipsis_pos(&self, shaped: Rid) -> i64

Source

fn shaped_text_get_ellipsis_glyph_count(&self, shaped: Rid) -> i64

Source

unsafe fn shaped_text_get_ellipsis_glyphs(&self, shaped: Rid) -> *const Glyph

§Safety

This method has automatically been marked unsafe because it accepts raw pointers as parameters. If Godot does not document any safety requirements, make sure you understand the underlying semantics.

Source

fn shaped_text_get_objects(&self, shaped: Rid) -> VariantArray

Source

fn shaped_text_get_object_rect(&self, shaped: Rid, key: Variant) -> Rect2

Source

fn shaped_text_get_object_range(&self, shaped: Rid, key: Variant) -> Vector2i

Source

fn shaped_text_get_object_glyph(&self, shaped: Rid, key: Variant) -> i64

Source

fn shaped_text_get_size(&self, shaped: Rid) -> Vector2

Source

fn shaped_text_get_ascent(&self, shaped: Rid) -> f64

Source

fn shaped_text_get_descent(&self, shaped: Rid) -> f64

Source

fn shaped_text_get_width(&self, shaped: Rid) -> f64

Source

fn shaped_text_get_underline_position(&self, shaped: Rid) -> f64

Source

fn shaped_text_get_underline_thickness(&self, shaped: Rid) -> f64

Provided Methods§

Source

fn init(base: Base<Self::Base>) -> Self

Godot constructor, accepting an injected base object.

base refers to the base instance of the class, which can either be stored in a Base<T> field or discarded. This method returns a fully-constructed instance, which will then be moved into a Gd<T> pointer.

If the class has a #[class(init)] attribute, this method will be auto-generated and must not be overridden.

Source

fn to_string(&self) -> GString

String representation of the Godot instance.

Override this method to define how the instance is represented as a string. Used by impl Display for Gd<T>, as well as str() and print() in GDScript.

Source

fn on_notification(&mut self, what: ObjectNotification)

Called when the object receives a Godot notification.

The type of notification can be identified through what. The enum is designed to hold all possible NOTIFICATION_* constants that the current class can handle. However, this is not validated in Godot, so an enum variant Unknown exists to represent integers out of known constants (mistakes or future additions).

This method is named _notification in Godot, but on_notification in Rust. To send notifications, use the Object::notify method.

See also in Godot docs:

Source

fn get_property(&self, property: StringName) -> Option<Variant>

Called whenever get() is called or Godot gets the value of a property.

Should return the given property’s value as Some(value), or None if the property should be handled normally.

See also in Godot docs:

Source

fn set_property(&mut self, property: StringName, value: Variant) -> bool

Called whenever Godot set() is called or Godot sets the value of a property.

Should set property to the given value and return true, or return false to indicate the property should be handled normally.

See also in Godot docs:

Source

fn get_property_list(&mut self) -> Vec<PropertyInfo>

Called whenever Godot get_property_list() is called, the returned vector here is appended to the existing list of properties.

This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor.

See also in Godot docs:

Source

fn property_get_revert(&self, property: StringName) -> Option<Variant>

Called by Godot to tell if a property has a custom revert or not.

Return None for no custom revert, and return Some(value) to specify the custom revert.

This is a combination of Godot’s Object::_property_get_revert and Object::_property_can_revert. This means that this function will usually be called twice by Godot to find the revert.

Note that this should be a pure function. That is, it should always return the same value for a property as long as self remains unchanged. Otherwise, this may lead to unexpected (safe) behavior.

Source

fn load_support_data(&mut self, filename: GString) -> bool

Source

fn get_support_data_filename(&self) -> GString

Source

fn get_support_data_info(&self) -> GString

Source

fn save_support_data(&self, filename: GString) -> bool

Source

fn is_locale_right_to_left(&self, locale: GString) -> bool

Source

fn name_to_tag(&self, name: GString) -> i64

Source

fn tag_to_name(&self, tag: i64) -> GString

Source

fn create_font_linked_variation(&mut self, font_rid: Rid) -> Rid

Source

fn font_set_data(&mut self, font_rid: Rid, data: PackedByteArray)

Source

unsafe fn font_set_data_ptr( &mut self, font_rid: Rid, data_ptr: *const u8, data_size: i64, )

§Safety

This method has automatically been marked unsafe because it accepts raw pointers as parameters. If Godot does not document any safety requirements, make sure you understand the underlying semantics.

Source

fn font_set_face_index(&mut self, font_rid: Rid, face_index: i64)

Source

fn font_get_face_index(&self, font_rid: Rid) -> i64

Source

fn font_get_face_count(&self, font_rid: Rid) -> i64

Source

fn font_set_style(&mut self, font_rid: Rid, style: FontStyle)

Source

fn font_get_style(&self, font_rid: Rid) -> FontStyle

Source

fn font_set_name(&mut self, font_rid: Rid, name: GString)

Source

fn font_get_name(&self, font_rid: Rid) -> GString

Source

fn font_get_ot_name_strings(&self, font_rid: Rid) -> Dictionary

Source

fn font_set_style_name(&mut self, font_rid: Rid, name_style: GString)

Source

fn font_get_style_name(&self, font_rid: Rid) -> GString

Source

fn font_set_weight(&mut self, font_rid: Rid, weight: i64)

Source

fn font_get_weight(&self, font_rid: Rid) -> i64

Source

fn font_set_stretch(&mut self, font_rid: Rid, stretch: i64)

Source

fn font_get_stretch(&self, font_rid: Rid) -> i64

Source

fn font_set_antialiasing( &mut self, font_rid: Rid, antialiasing: FontAntialiasing, )

Source

fn font_get_antialiasing(&self, font_rid: Rid) -> FontAntialiasing

Source

fn font_set_disable_embedded_bitmaps( &mut self, font_rid: Rid, disable_embedded_bitmaps: bool, )

Source

fn font_get_disable_embedded_bitmaps(&self, font_rid: Rid) -> bool

Source

fn font_set_generate_mipmaps(&mut self, font_rid: Rid, generate_mipmaps: bool)

Source

fn font_get_generate_mipmaps(&self, font_rid: Rid) -> bool

Source

fn font_set_multichannel_signed_distance_field( &mut self, font_rid: Rid, msdf: bool, )

Source

fn font_is_multichannel_signed_distance_field(&self, font_rid: Rid) -> bool

Source

fn font_set_msdf_pixel_range(&mut self, font_rid: Rid, msdf_pixel_range: i64)

Source

fn font_get_msdf_pixel_range(&self, font_rid: Rid) -> i64

Source

fn font_set_msdf_size(&mut self, font_rid: Rid, msdf_size: i64)

Source

fn font_get_msdf_size(&self, font_rid: Rid) -> i64

Source

fn font_set_allow_system_fallback( &mut self, font_rid: Rid, allow_system_fallback: bool, )

Source

fn font_is_allow_system_fallback(&self, font_rid: Rid) -> bool

Source

fn font_set_force_autohinter(&mut self, font_rid: Rid, force_autohinter: bool)

Source

fn font_is_force_autohinter(&self, font_rid: Rid) -> bool

Source

fn font_set_hinting(&mut self, font_rid: Rid, hinting: Hinting)

Source

fn font_get_hinting(&self, font_rid: Rid) -> Hinting

Source

fn font_set_subpixel_positioning( &mut self, font_rid: Rid, subpixel_positioning: SubpixelPositioning, )

Source

fn font_get_subpixel_positioning(&self, font_rid: Rid) -> SubpixelPositioning

Source

fn font_set_embolden(&mut self, font_rid: Rid, strength: f64)

Source

fn font_get_embolden(&self, font_rid: Rid) -> f64

Source

fn font_set_spacing(&mut self, font_rid: Rid, spacing: SpacingType, value: i64)

Source

fn font_get_spacing(&self, font_rid: Rid, spacing: SpacingType) -> i64

Source

fn font_set_baseline_offset(&mut self, font_rid: Rid, baseline_offset: f64)

Source

fn font_get_baseline_offset(&self, font_rid: Rid) -> f64

Source

fn font_set_transform(&mut self, font_rid: Rid, transform: Transform2D)

Source

fn font_get_transform(&self, font_rid: Rid) -> Transform2D

Source

fn font_set_variation_coordinates( &mut self, font_rid: Rid, variation_coordinates: Dictionary, )

Source

fn font_get_variation_coordinates(&self, font_rid: Rid) -> Dictionary

Source

fn font_set_oversampling(&mut self, font_rid: Rid, oversampling: f64)

Source

fn font_get_oversampling(&self, font_rid: Rid) -> f64

Source

fn font_set_texture_offsets( &mut self, font_rid: Rid, size: Vector2i, texture_index: i64, offset: PackedInt32Array, )

Source

fn font_get_texture_offsets( &self, font_rid: Rid, size: Vector2i, texture_index: i64, ) -> PackedInt32Array

Source

fn font_get_glyph_contours( &self, font_rid: Rid, size: i64, index: i64, ) -> Dictionary

Source

fn font_get_kerning_list(&self, font_rid: Rid, size: i64) -> Array<Vector2i>

Source

fn font_clear_kerning_map(&mut self, font_rid: Rid, size: i64)

Source

fn font_remove_kerning( &mut self, font_rid: Rid, size: i64, glyph_pair: Vector2i, )

Source

fn font_set_kerning( &mut self, font_rid: Rid, size: i64, glyph_pair: Vector2i, kerning: Vector2, )

Source

fn font_get_kerning( &self, font_rid: Rid, size: i64, glyph_pair: Vector2i, ) -> Vector2

Source

fn font_render_range( &mut self, font_rid: Rid, size: Vector2i, start: i64, end: i64, )

Source

fn font_render_glyph(&mut self, font_rid: Rid, size: Vector2i, index: i64)

Source

fn font_is_language_supported(&self, font_rid: Rid, language: GString) -> bool

Source

fn font_set_language_support_override( &mut self, font_rid: Rid, language: GString, supported: bool, )

Source

fn font_get_language_support_override( &mut self, font_rid: Rid, language: GString, ) -> bool

Source

fn font_remove_language_support_override( &mut self, font_rid: Rid, language: GString, )

Source

fn font_get_language_support_overrides( &mut self, font_rid: Rid, ) -> PackedStringArray

Source

fn font_is_script_supported(&self, font_rid: Rid, script: GString) -> bool

Source

fn font_set_script_support_override( &mut self, font_rid: Rid, script: GString, supported: bool, )

Source

fn font_get_script_support_override( &mut self, font_rid: Rid, script: GString, ) -> bool

Source

fn font_remove_script_support_override( &mut self, font_rid: Rid, script: GString, )

Source

fn font_get_script_support_overrides( &mut self, font_rid: Rid, ) -> PackedStringArray

Source

fn font_set_opentype_feature_overrides( &mut self, font_rid: Rid, overrides: Dictionary, )

Source

fn font_get_opentype_feature_overrides(&self, font_rid: Rid) -> Dictionary

Source

fn font_supported_feature_list(&self, font_rid: Rid) -> Dictionary

Source

fn font_supported_variation_list(&self, font_rid: Rid) -> Dictionary

Source

fn font_get_global_oversampling(&self) -> f64

Source

fn font_set_global_oversampling(&mut self, oversampling: f64)

Source

fn get_hex_code_box_size(&self, size: i64, index: i64) -> Vector2

Source

fn draw_hex_code_box( &self, canvas: Rid, size: i64, pos: Vector2, index: i64, color: Color, )

Source

fn shaped_text_set_direction(&mut self, shaped: Rid, direction: Direction)

Source

fn shaped_text_get_direction(&self, shaped: Rid) -> Direction

Source

fn shaped_text_get_inferred_direction(&self, shaped: Rid) -> Direction

Source

fn shaped_text_set_bidi_override( &mut self, shaped: Rid, override_: VariantArray, )

Source

fn shaped_text_set_custom_punctuation(&mut self, shaped: Rid, punct: GString)

Source

fn shaped_text_get_custom_punctuation(&self, shaped: Rid) -> GString

Source

fn shaped_text_set_custom_ellipsis(&mut self, shaped: Rid, char: i64)

Source

fn shaped_text_get_custom_ellipsis(&self, shaped: Rid) -> i64

Source

fn shaped_text_set_orientation(&mut self, shaped: Rid, orientation: Orientation)

Source

fn shaped_text_get_orientation(&self, shaped: Rid) -> Orientation

Source

fn shaped_text_set_preserve_invalid(&mut self, shaped: Rid, enabled: bool)

Source

fn shaped_text_get_preserve_invalid(&self, shaped: Rid) -> bool

Source

fn shaped_text_set_preserve_control(&mut self, shaped: Rid, enabled: bool)

Source

fn shaped_text_get_preserve_control(&self, shaped: Rid) -> bool

Source

fn shaped_text_set_spacing( &mut self, shaped: Rid, spacing: SpacingType, value: i64, )

Source

fn shaped_text_get_spacing(&self, shaped: Rid, spacing: SpacingType) -> i64

Source

fn shaped_text_fit_to_width( &mut self, shaped: Rid, width: f64, justification_flags: JustificationFlag, ) -> f64

Source

fn shaped_text_tab_align( &mut self, shaped: Rid, tab_stops: PackedFloat32Array, ) -> f64

Source

fn shaped_text_update_breaks(&mut self, shaped: Rid) -> bool

Source

fn shaped_text_update_justification_ops(&mut self, shaped: Rid) -> bool

Source

fn shaped_text_get_line_breaks_adv( &self, shaped: Rid, width: PackedFloat32Array, start: i64, once: bool, break_flags: LineBreakFlag, ) -> PackedInt32Array

Source

fn shaped_text_get_line_breaks( &self, shaped: Rid, width: f64, start: i64, break_flags: LineBreakFlag, ) -> PackedInt32Array

Source

fn shaped_text_get_word_breaks( &self, shaped: Rid, grapheme_flags: GraphemeFlag, skip_grapheme_flags: GraphemeFlag, ) -> PackedInt32Array

Source

fn shaped_text_overrun_trim_to_width( &mut self, shaped: Rid, width: f64, trim_flags: TextOverrunFlag, )

Source

fn shaped_text_get_dominant_direction_in_range( &self, shaped: Rid, start: i64, end: i64, ) -> i64

Source

unsafe fn shaped_text_get_carets( &self, shaped: Rid, position: i64, caret: *mut CaretInfo, )

§Safety

This method has automatically been marked unsafe because it accepts raw pointers as parameters. If Godot does not document any safety requirements, make sure you understand the underlying semantics.

Source

fn shaped_text_get_selection( &self, shaped: Rid, start: i64, end: i64, ) -> PackedVector2Array

Source

fn shaped_text_hit_test_grapheme(&self, shaped: Rid, coord: f64) -> i64

Source

fn shaped_text_hit_test_position(&self, shaped: Rid, coord: f64) -> i64

Source

fn shaped_text_draw( &self, shaped: Rid, canvas: Rid, pos: Vector2, clip_l: f64, clip_r: f64, color: Color, )

Source

fn shaped_text_draw_outline( &self, shaped: Rid, canvas: Rid, pos: Vector2, clip_l: f64, clip_r: f64, outline_size: i64, color: Color, )

Source

fn shaped_text_get_grapheme_bounds(&self, shaped: Rid, pos: i64) -> Vector2

Source

fn shaped_text_next_grapheme_pos(&self, shaped: Rid, pos: i64) -> i64

Source

fn shaped_text_prev_grapheme_pos(&self, shaped: Rid, pos: i64) -> i64

Source

fn shaped_text_get_character_breaks(&self, shaped: Rid) -> PackedInt32Array

Source

fn shaped_text_next_character_pos(&self, shaped: Rid, pos: i64) -> i64

Source

fn shaped_text_prev_character_pos(&self, shaped: Rid, pos: i64) -> i64

Source

fn shaped_text_closest_character_pos(&self, shaped: Rid, pos: i64) -> i64

Source

fn format_number(&self, number: GString, language: GString) -> GString

Source

fn parse_number(&self, number: GString, language: GString) -> GString

Source

fn percent_sign(&self, language: GString) -> GString

Source

fn strip_diacritics(&self, string: GString) -> GString

Source

fn is_valid_identifier(&self, string: GString) -> bool

Source

fn is_valid_letter(&self, unicode: u64) -> bool

Source

fn string_get_word_breaks( &self, string: GString, language: GString, chars_per_line: i64, ) -> PackedInt32Array

Source

fn string_get_character_breaks( &self, string: GString, language: GString, ) -> PackedInt32Array

Source

fn is_confusable(&self, string: GString, dict: PackedStringArray) -> i64

Source

fn spoof_check(&self, string: GString) -> bool

Source

fn string_to_upper(&self, string: GString, language: GString) -> GString

Source

fn string_to_lower(&self, string: GString, language: GString) -> GString

Source

fn string_to_title(&self, string: GString, language: GString) -> GString

Source

fn parse_structured_text( &self, parser_type: StructuredTextParser, args: VariantArray, text: GString, ) -> Array<Vector3i>

Source

fn cleanup(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§