[TextServer] Improve embedded objects handling performance.
This commit is contained in:
committed by
Pāvels Nadtočajevs
parent
4cf02312f6
commit
cc1db569e1
@ -468,6 +468,7 @@ public:
|
||||
|
||||
virtual int64_t shaped_get_span_count(const RID &p_shaped) const = 0;
|
||||
virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const = 0;
|
||||
virtual Variant shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const = 0;
|
||||
virtual void shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary()) = 0;
|
||||
|
||||
virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const = 0; // Copy shaped substring (e.g. line break) without reshaping, but correctly reordered, preservers range.
|
||||
@ -587,9 +588,11 @@ struct Glyph {
|
||||
float advance = 0.f; // Advance to the next glyph along baseline(x for horizontal layout, y for vertical).
|
||||
|
||||
RID font_rid; // Font resource.
|
||||
int font_size = 0; // Font size;
|
||||
int font_size = 0; // Font size.
|
||||
int32_t index = 0; // Glyph index (font specific) or UTF-32 codepoint (for the invalid glyphs).
|
||||
|
||||
int span_index = -1;
|
||||
|
||||
bool operator==(const Glyph &p_a) const;
|
||||
bool operator!=(const Glyph &p_a) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user