From: handa Date: Tue, 23 Dec 2008 01:07:50 +0000 (+0000) Subject: (dump_cmap_table): Fix previous change. X-Git-Tag: REL-0-9-9~28 X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Flibotf.git;a=commitdiff_plain;h=eeb0a0b253ed5d2f4fa35f3dd09358599d627569 (dump_cmap_table): Fix previous change. --- diff --git a/example/otfdump.c b/example/otfdump.c index f598d67..f5961e5 100644 --- a/example/otfdump.c +++ b/example/otfdump.c @@ -1383,16 +1383,52 @@ dump_cmap_table (int indent, OTF_cmap *cmap) { OTF_EncodingSubtable14 *sub14 = cmap->EncodingRecord[i].subtable.f.f14; - int j; + unsigned j,k; - IPRINT ("(raw-data"); - for (j = 0; j < sub14->nbytes; j++) + IPRINT ("(VariationSelectorRecords %d)",sub14->nRecords); + for (j = 0; j < sub14->nRecords; j++) { - if ((j % 16) == 0) - IPRINT (" "); - printf (" %02X", sub14->data[j]); + OTF_VariationSelectorRecord *record = sub14->Records + j; + IPRINT ("(VariationSelectorRecord (varSelector #x%x)", + record->varSelector); + indent += 1; + IPRINT ("(defaultUVSOffset #x%x)", + record->defaultUVSOffset); + if (record->defaultUVSOffset) + { + IPRINT ("(defaultUVS"); + indent += 1; + for (k = 0 ; k < record->numUnicodeValueRanges; k++) + { + OTF_UnicodeValueRange *unicodeValueRange + = &record->unicodeValueRanges[k]; + IPRINT("(startUnicodeValue #x%x) (additionalCount %d)", + unicodeValueRange->startUnicodeValue, + unicodeValueRange->additionalCount); + } + printf (")"); + indent -= 1; + } + IPRINT ("(nonDefaultUVSOffset #x%x)", + record->nonDefaultUVSOffset); + if (record->nonDefaultUVSOffset) + { + IPRINT ("(NonDefaultUVS"); + indent += 1; + for (k=0; k < record->numUVSMappings; k++) + { + OTF_UVSMapping *uvsMapping + = &record->uvsMappings[k]; + IPRINT("(unicodeValue #x%x) (glyphID %d)", + uvsMapping->unicodeValue, + uvsMapping->glyphID); + } + printf (")"); + indent -= 1; + } + printf (")"); + indent -= 1; } - printf (")"); } }