mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-04-30 12:26:46 +02:00
Compare commits
2 Commits
d36df63b57
...
088646e1cf
Author | SHA1 | Date | |
---|---|---|---|
|
088646e1cf | ||
|
3f0aad7564 |
@ -7,6 +7,7 @@ v1.1.4 (Month DD, YYYY)
|
|||||||
|
|
||||||
- Fixed detection of encrypted strings that are too short (Issue #52)
|
- Fixed detection of encrypted strings that are too short (Issue #52)
|
||||||
- Fixed a TrueType CMAP decoding bug.
|
- Fixed a TrueType CMAP decoding bug.
|
||||||
|
- Fixed a text rendering issue for Asian text.
|
||||||
|
|
||||||
|
|
||||||
v1.1.3 (November 15, 2023)
|
v1.1.3 (November 15, 2023)
|
||||||
|
@ -3053,7 +3053,7 @@ write_string(pdfio_stream_t *st, // I - Stream
|
|||||||
|
|
||||||
|
|
||||||
// Start the string...
|
// Start the string...
|
||||||
if (!pdfioStreamPuts(st, unicode ? "<FEFF" : "("))
|
if (!pdfioStreamPuts(st, unicode ? "<" : "("))
|
||||||
return (false);
|
return (false);
|
||||||
|
|
||||||
// Loop through the string, handling UTF-8 as needed...
|
// Loop through the string, handling UTF-8 as needed...
|
||||||
|
@ -2392,7 +2392,8 @@ write_font_test(
|
|||||||
"Märr-ŋamathirri",
|
"Märr-ŋamathirri",
|
||||||
"Ẹ ku abọ",
|
"Ẹ ku abọ",
|
||||||
"Kíimak 'oolal",
|
"Kíimak 'oolal",
|
||||||
"Ngiyakwemukela"
|
"Ngiyakwemukela",
|
||||||
|
"いらっしゃいませ"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -165,8 +165,7 @@ test_font(const char *filename) // I - Font filename
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
puts("FAIL");
|
puts("WARNING (no copyright found)");
|
||||||
errors ++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < (int)(sizeof(strings) / sizeof(strings[0])); i ++)
|
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);
|
fputs("ttfGetItalicAngle: ", stdout);
|
||||||
if ((realvalue = ttfGetItalicAngle(font)) >= 0.0)
|
if ((realvalue = ttfGetItalicAngle(font)) >= -180.0 && realvalue <= 180.0)
|
||||||
{
|
{
|
||||||
printf("PASS (%g)\n", realvalue);
|
printf("PASS (%g)\n", realvalue);
|
||||||
}
|
}
|
||||||
|
4
ttf.c
4
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
|
// Based on the end code of the segent table, allocate space for the
|
||||||
// uncompressed cmap table...
|
// 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->num_cmap = segments[segCount - 1].endCode + 1;
|
||||||
font->cmap = cmapptr = (int *)malloc(font->num_cmap * sizeof(int));
|
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
|
// Use an "obscure indexing trick" (words from the spec, not
|
||||||
// mine) to look up the glyph index...
|
// 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);
|
TTF_DEBUG("read_cmap: ch=%d, temp=%d\n", ch, temp);
|
||||||
if (temp < 0 || temp >= numGlyphIdArray)
|
if (temp < 0 || temp >= numGlyphIdArray)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user