summaryrefslogtreecommitdiffstats
path: root/libass/ass_shaper.c
diff options
context:
space:
mode:
author11rcombs <rodger.combs@gmail.com>2013-12-06 08:02:56 -0600
committer11rcombs <rodger.combs@gmail.com>2013-12-06 08:05:10 -0600
commite41836007a13b7ac05da42e252f20b7fb8c9db59 (patch)
tree128da5ecc7ac0bec82a9262fa520684f27a9ac17 /libass/ass_shaper.c
parent1373b67c160aaff85dce5bb6c4b730d15bcb3d57 (diff)
downloadlibass-e41836007a13b7ac05da42e252f20b7fb8c9db59.tar.bz2
libass-e41836007a13b7ac05da42e252f20b7fb8c9db59.tar.xz
Added ass_font_index_magic to fix char indexes in weird encodings
Diffstat (limited to 'libass/ass_shaper.c')
-rw-r--r--libass/ass_shaper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c
index 7e0d7d1..395f9c5 100644
--- a/libass/ass_shaper.c
+++ b/libass/ass_shaper.c
@@ -220,9 +220,9 @@ get_glyph(hb_font_t *font, void *font_data, hb_codepoint_t unicode,
FT_Face face = font_data;
if (variation)
- *glyph = FT_Face_GetCharVariantIndex(face, unicode, variation);
+ *glyph = FT_Face_GetCharVariantIndex(face, ass_font_index_magic(face, unicode), variation);
else
- *glyph = FT_Get_Char_Index(face, unicode);
+ *glyph = FT_Get_Char_Index(face, ass_font_index_magic(face, unicode));
return *glyph != 0;
}
@@ -668,7 +668,7 @@ static void shape_fribidi(ASS_Shaper *shaper, GlyphInfo *glyphs, size_t len)
GlyphInfo *info = glyphs + i;
FT_Face face = info->font->faces[info->face_index];
info->symbol = shaper->event_text[i];
- info->glyph_index = FT_Get_Char_Index(face, shaper->event_text[i]);
+ info->glyph_index = FT_Get_Char_Index(face, ass_font_index_magic(face, shaper->event_text[i]));
}
free(joins);