From 7638d81e4608d900d5f33668fdcd320d836c68b0 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 22 Dec 2008 10:46:26 +0000 Subject: [PATCH] (get_uvs_glyph): New function. --- src/otfdrive.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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)); } -- 1.7.10.4