Skip to content

Commit e91b3ec

Browse files
committed
Merge pull request #100562 from AThousandShips/fix_text_server_binds
[TextServer] Fix use of `find_char` in text servers
2 parents 119c99a + 15b4331 commit e91b3ec

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

modules/text_server_adv/thorvg_svg_in_ot.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
175175
if (parser->has_attribute("id")) {
176176
const String &gl_name = parser->get_named_attribute_value("id");
177177
if (gl_name.begins_with("glyph")) {
178+
#ifdef GDEXTENSION
179+
int dot_pos = gl_name.find(".");
180+
#else
178181
int dot_pos = gl_name.find_char('.');
182+
#endif // GDEXTENSION
179183
int64_t gl_idx = gl_name.substr(5, (dot_pos > 0) ? dot_pos - 5 : -1).to_int();
180184

181185
TVG_NodeCache node_cache = TVG_NodeCache();

modules/text_server_fb/thorvg_svg_in_ot.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
175175
if (parser->has_attribute("id")) {
176176
const String &gl_name = parser->get_named_attribute_value("id");
177177
if (gl_name.begins_with("glyph")) {
178+
#ifdef GDEXTENSION
179+
int dot_pos = gl_name.find(".");
180+
#else
178181
int dot_pos = gl_name.find_char('.');
182+
#endif // GDEXTENSION
179183
int64_t gl_idx = gl_name.substr(5, (dot_pos > 0) ? dot_pos - 5 : -1).to_int();
180184

181185
TVG_NodeCache node_cache = TVG_NodeCache();

0 commit comments

Comments
 (0)