summaryrefslogtreecommitdiff
path: root/servers/text_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/text_server.h')
-rw-r--r--servers/text_server.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/servers/text_server.h b/servers/text_server.h
index 07f0ae5045..6724c02caf 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -109,7 +109,8 @@ public:
FEATURE_BREAK_ITERATORS = 1 << 4,
FEATURE_FONT_SYSTEM = 1 << 5,
FEATURE_FONT_VARIABLE = 1 << 6,
- FEATURE_USE_SUPPORT_DATA = 1 << 7
+ FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION = 1 << 7,
+ FEATURE_USE_SUPPORT_DATA = 1 << 8,
};
enum ContourPointTag {
@@ -154,20 +155,6 @@ protected:
TextServer::Direction direction = DIRECTION_LTR; // Desired text direction.
TextServer::Orientation orientation = ORIENTATION_HORIZONTAL;
- struct Span {
- int start = -1;
- int end = -1;
-
- Vector<RID> fonts;
- int font_size = 0;
-
- Variant embedded_key;
-
- String language;
- Dictionary features;
- };
- Vector<Span> spans;
-
struct EmbeddedObject {
int pos = 0;
InlineAlignment inline_align = INLINE_ALIGNMENT_CENTER;
@@ -386,10 +373,14 @@ public:
virtual void shaped_text_set_preserve_control(RID p_shaped, bool p_enabled) = 0;
virtual bool shaped_text_get_preserve_control(RID p_shaped) const = 0;
- virtual bool shaped_text_add_string(RID p_shaped, const String &p_text, const Vector<RID> &p_fonts, int p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "") = 0;
+ virtual bool shaped_text_add_string(RID p_shaped, const String &p_text, const Vector<RID> &p_fonts, int p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "", const Variant &p_meta = Variant()) = 0;
virtual bool shaped_text_add_object(RID p_shaped, Variant p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER, int p_length = 1) = 0;
virtual bool shaped_text_resize_object(RID p_shaped, Variant p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER) = 0;
+ virtual int shaped_get_span_count(RID p_shaped) const = 0;
+ virtual Variant shaped_get_span_meta(RID p_shaped, int p_index) const = 0;
+ virtual void shaped_set_span_update_font(RID p_shaped, int p_index, const Vector<RID> &p_fonts, int p_size, const Dictionary &p_opentype_features = Dictionary()) = 0;
+
virtual RID shaped_text_substr(RID p_shaped, int p_start, int p_length) const = 0; // Copy shaped substring (e.g. line break) without reshaping, but correctly reordered, preservers range.
virtual RID shaped_text_get_parent(RID p_shaped) const = 0;
@@ -457,6 +448,10 @@ public:
virtual String strip_diacritics(const String &p_string) const;
+ // Other string operations.
+ virtual String string_to_upper(const String &p_string, const String &p_language = "") const = 0;
+ virtual String string_to_lower(const String &p_string, const String &p_language = "") const = 0;
+
TextServer();
~TextServer();
};