diff --git a/testttf.c b/testttf.c index dc4b55f..58ef9c2 100644 --- a/testttf.c +++ b/testttf.c @@ -165,8 +165,7 @@ test_font(const char *filename) // I - Font filename } else { - puts("FAIL"); - errors ++; + puts("WARNING (no copyright found)"); } for (i = 0; i < (int)(sizeof(strings) / sizeof(strings[0])); i ++) @@ -195,7 +194,7 @@ test_font(const char *filename) // I - Font filename } fputs("ttfGetItalicAngle: ", stdout); - if ((realvalue = ttfGetItalicAngle(font)) >= 0.0) + if ((realvalue = ttfGetItalicAngle(font)) >= -180.0 && realvalue <= 180.0) { printf("PASS (%g)\n", realvalue); } diff --git a/ttf.c b/ttf.c index aca0045..8e22baf 100644 --- a/ttf.c +++ b/ttf.c @@ -1282,7 +1282,7 @@ read_cmap(ttf_t *font) // I - Font // Based on the end code of the segent table, allocate space for the // uncompressed cmap table... - segCount --; // Last segment is not used (sigh) +// segCount --; // Last segment is not used (sigh) font->num_cmap = segments[segCount - 1].endCode + 1; font->cmap = cmapptr = (int *)malloc(font->num_cmap * sizeof(int)); @@ -1307,7 +1307,7 @@ read_cmap(ttf_t *font) // I - Font { // Use an "obscure indexing trick" (words from the spec, not // mine) to look up the glyph index... - temp = segment->idRangeOffset / 2 - segCount + (ch - segment->startCode) + (seg - segCount); + temp = segment->idRangeOffset / 2 - segCount + (ch - segment->startCode) + (segment - segments); TTF_DEBUG("read_cmap: ch=%d, temp=%d\n", ch, temp); if (temp < 0 || temp >= numGlyphIdArray)