Compare commits

..

No commits in common. "088646e1cf34e51bbf4801cc5a0b1325875a9191" and "d36df63b57991d9ad2073956eea70ab22cac273c" have entirely different histories.

5 changed files with 7 additions and 8 deletions

View File

@ -7,7 +7,6 @@ v1.1.4 (Month DD, YYYY)
- Fixed detection of encrypted strings that are too short (Issue #52)
- Fixed a TrueType CMAP decoding bug.
- Fixed a text rendering issue for Asian text.
v1.1.3 (November 15, 2023)

View File

@ -3053,7 +3053,7 @@ write_string(pdfio_stream_t *st, // I - Stream
// Start the string...
if (!pdfioStreamPuts(st, unicode ? "<" : "("))
if (!pdfioStreamPuts(st, unicode ? "<FEFF" : "("))
return (false);
// Loop through the string, handling UTF-8 as needed...

View File

@ -2392,8 +2392,7 @@ write_font_test(
"Märr-ŋamathirri",
"Ẹ ku abọ",
"Kíimak 'oolal",
"Ngiyakwemukela",
"いらっしゃいませ"
"Ngiyakwemukela"
};

View File

@ -165,7 +165,8 @@ test_font(const char *filename) // I - Font filename
}
else
{
puts("WARNING (no copyright found)");
puts("FAIL");
errors ++;
}
for (i = 0; i < (int)(sizeof(strings) / sizeof(strings[0])); i ++)
@ -194,7 +195,7 @@ test_font(const char *filename) // I - Font filename
}
fputs("ttfGetItalicAngle: ", stdout);
if ((realvalue = ttfGetItalicAngle(font)) >= -180.0 && realvalue <= 180.0)
if ((realvalue = ttfGetItalicAngle(font)) >= 0.0)
{
printf("PASS (%g)\n", realvalue);
}

4
ttf.c
View File

@ -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) + (segment - segments);
temp = segment->idRangeOffset / 2 - segCount + (ch - segment->startCode) + (seg - segCount);
TTF_DEBUG("read_cmap: ch=%d, temp=%d\n", ch, temp);
if (temp < 0 || temp >= numGlyphIdArray)