BLF: Ignore Combining Characters for Mouse Selection #120675

Merged
Harley Acheson merged 1 commits from Harley/blender:ForEachCombining into main 2024-04-15 21:19:14 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -980,7 +980,8 @@ void blf_font_boundbox_foreach_glyph(FontBLF *font,
const size_t i_curr = i;
g = blf_glyph_from_utf8_and_step(font, gc, g, str, str_len, &i, &pen_x);
if (UNLIKELY(g == nullptr)) {
if (UNLIKELY(g == nullptr || g->advance_x == 0)) {
/* Ignore combining characters like diacritical marks. */
continue;
}
rcti bounds;