summaryrefslogtreecommitdiff
path: root/rufl_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'rufl_init.c')
-rw-r--r--rufl_init.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/rufl_init.c b/rufl_init.c
index 3778978..7756ad9 100644
--- a/rufl_init.c
+++ b/rufl_init.c
@@ -521,9 +521,18 @@ rufl_code rufl_init_read_encoding(font_f font,
sizeof rufl_glyph_map[0],
rufl_glyph_map_cmp);
if (entry) {
- umap->map[u].u = entry->u;
- umap->map[u].c = i - 1;
- u++;
+ /* may be more than one unicode for the glyph
+ * sentinels stop overshooting array */
+ while (strcmp(s, (entry - 1)->glyph_name) == 0)
+ entry--;
+ for (; strcmp(s, entry->glyph_name) == 0;
+ entry++) {
+ umap->map[u].u = entry->u;
+ umap->map[u].c = i - 1;
+ u++;
+ if (u == 256)
+ break;
+ }
}
}
}