Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f3fe91a

Browse files
committed
[[ Bug 19094 ]] Ensure single codepoint grapheme clusters are checked
Previously single-codepoint grapheme clusters were not checked for font support, so they were skipping the fallback mechanism and just displaying a missing character.
1 parent 235c4f6 commit f3fe91a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/notes/bugfix-19094.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Certain unicode characters render incorrectly on Android 7
1+
# Ensure single-codepoint grapheme clusters are checked for font support

libgraphics/src/harfbuzztext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static bool cluster_is_supported(hb_glyph_info_t* p_info, uindex_t p_index, uind
241241
{
242242
bool t_supported = true;
243243
uindex_t t_cluster = p_info[p_index] . cluster;
244-
while (++p_index < p_count &&
244+
while (p_index < p_count &&
245245
p_info[p_index] . cluster == t_cluster)
246246
{
247247
if (p_info[p_index] . codepoint == 0)
@@ -250,6 +250,7 @@ static bool cluster_is_supported(hb_glyph_info_t* p_info, uindex_t p_index, uind
250250
// whole cluster is unsupported
251251
t_supported = false;
252252
}
253+
p_index++;
253254
}
254255

255256
r_cluster_end = p_index;

0 commit comments

Comments
 (0)