mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Merge pull request #100562 from AThousandShips/fix_text_server_binds
[TextServer] Fix use of `find_char` in text servers
This commit is contained in:
commit
e91b3ecd00
2 changed files with 8 additions and 0 deletions
|
@ -175,7 +175,11 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
|
|||
if (parser->has_attribute("id")) {
|
||||
const String &gl_name = parser->get_named_attribute_value("id");
|
||||
if (gl_name.begins_with("glyph")) {
|
||||
#ifdef GDEXTENSION
|
||||
int dot_pos = gl_name.find(".");
|
||||
#else
|
||||
int dot_pos = gl_name.find_char('.');
|
||||
#endif // GDEXTENSION
|
||||
int64_t gl_idx = gl_name.substr(5, (dot_pos > 0) ? dot_pos - 5 : -1).to_int();
|
||||
|
||||
TVG_NodeCache node_cache = TVG_NodeCache();
|
||||
|
|
|
@ -175,7 +175,11 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
|
|||
if (parser->has_attribute("id")) {
|
||||
const String &gl_name = parser->get_named_attribute_value("id");
|
||||
if (gl_name.begins_with("glyph")) {
|
||||
#ifdef GDEXTENSION
|
||||
int dot_pos = gl_name.find(".");
|
||||
#else
|
||||
int dot_pos = gl_name.find_char('.');
|
||||
#endif // GDEXTENSION
|
||||
int64_t gl_idx = gl_name.substr(5, (dot_pos > 0) ? dot_pos - 5 : -1).to_int();
|
||||
|
||||
TVG_NodeCache node_cache = TVG_NodeCache();
|
||||
|
|
Loading…
Add table
Reference in a new issue