From: handa Date: Mon, 22 Dec 2008 10:46:26 +0000 (+0000) Subject: (get_uvs_glyph): New function. X-Git-Tag: REL-0-9-9~32 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7638d81e4608d900d5f33668fdcd320d836c68b0;p=m17n%2Flibotf.git (get_uvs_glyph): New function. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index 7d0824d..735681d 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -1336,12 +1336,19 @@ lookup_encoding_12 (OTF_EncodingSubtable12 *sub12, OTF_GlyphString *gstring) return 0; } +static OTF_GlyphID +get_uvs_glyph (OTF_EncodingSubtable14 *sub14, int c1, int c2) +{ + return 0; +} + static void check_cmap_uvs (OTF_cmap *cmap, OTF_GlyphString *gstring, int idx) { OTF_EncodingSubtable14 *sub14; int c1 = gstring->glyphs[idx - 1].c; int c2 = gstring->glyphs[idx].c; + OTF_GlyphID code; int i; gstring->glyphs[idx].glyph_id = 0; @@ -1350,8 +1357,13 @@ check_cmap_uvs (OTF_cmap *cmap, OTF_GlyphString *gstring, int idx) break; if (i == cmap->numTables) return; - sub14 = cmap->EncodingRecord[i].subtable.f.f14; - /* */ + code = get_uvs_glyph (cmap->EncodingRecord[i].subtable.f.f14, c1, c2); + if (code == 0) + return; + gstring->glyphs[idx - 1].glyph_id = code; + gstring->used--; + memmove (gstring->glyphs + idx, gstring->glyphs + idx + 1, + sizeof (OTF_Glyph) * (gstring->used - idx)); }