[Font] Implement get_char_from_glyph_index function.
This commit is contained in:
@@ -178,6 +178,7 @@ void TextServerExtension::_bind_methods() {
|
||||
GDVIRTUAL_BIND(_font_get_kerning, "font_rid", "size", "glyph_pair");
|
||||
|
||||
GDVIRTUAL_BIND(_font_get_glyph_index, "font_rid", "size", "char", "variation_selector");
|
||||
GDVIRTUAL_BIND(_font_get_char_from_glyph_index, "font_rid", "size", "glyph_index");
|
||||
|
||||
GDVIRTUAL_BIND(_font_has_char, "font_rid", "char");
|
||||
GDVIRTUAL_BIND(_font_get_supported_chars, "font_rid");
|
||||
@@ -825,6 +826,12 @@ int64_t TextServerExtension::font_get_glyph_index(const RID &p_font_rid, int64_t
|
||||
return ret;
|
||||
}
|
||||
|
||||
int64_t TextServerExtension::font_get_char_from_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_glyph_index) const {
|
||||
int64_t ret = 0;
|
||||
GDVIRTUAL_CALL(_font_get_char_from_glyph_index, p_font_rid, p_size, p_glyph_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool TextServerExtension::font_has_char(const RID &p_font_rid, int64_t p_char) const {
|
||||
bool ret = false;
|
||||
GDVIRTUAL_CALL(_font_has_char, p_font_rid, p_char, ret);
|
||||
|
||||
@@ -294,6 +294,9 @@ public:
|
||||
virtual int64_t font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector = 0) const override;
|
||||
GDVIRTUAL4RC(int64_t, _font_get_glyph_index, RID, int64_t, int64_t, int64_t);
|
||||
|
||||
virtual int64_t font_get_char_from_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_glyph_index) const override;
|
||||
GDVIRTUAL3RC(int64_t, _font_get_char_from_glyph_index, RID, int64_t, int64_t);
|
||||
|
||||
virtual bool font_has_char(const RID &p_font_rid, int64_t p_char) const override;
|
||||
virtual String font_get_supported_chars(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2RC(bool, _font_has_char, RID, int64_t);
|
||||
|
||||
Reference in New Issue
Block a user