Skip to content

Commit 8ca5cbd

Browse files
committed
Warn when TTF contains an unknown transformation type in a composite character.
svn path=/trunk/matplotlib/; revision=3495
1 parent fb8d796 commit 8ca5cbd

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ttconv/pprdrv_tt2.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,19 @@ void GlyphToType3::do_composite(TTStreamWriter& stream, struct TTFONT *font, BYT
572572
#endif
573573

574574
if (pdf_mode) {
575-
stream.printf("q 1 0 0 1 %d %d cm\n", topost(arg1), topost(arg2));
575+
if ( flags & ARGS_ARE_XY_VALUES ) {
576+
/* We should have been able to use 'Do' to reference the
577+
subglyph here. However, that doesn't seem to work with
578+
xpdf or gs (only acrobat), so instead, this just includes
579+
the subglyph here inline. */
580+
stream.printf("q 1 0 0 1 %d %d cm\n", topost(arg1), topost(arg2));
581+
} else {
582+
stream.printf("%% unimplemented shift, arg1=%d, arg2=%d\n",arg1,arg2);
583+
}
576584
GlyphToType3(stream, font, glyphIndex, true);
577-
stream.printf("\nQ\n");
585+
if ( flags & ARGS_ARE_XY_VALUES ) {
586+
stream.printf("\nQ\n");
587+
}
578588
} else {
579589
/* If we have an (X,Y) shif and it is non-zero, */
580590
/* translate the coordinate system. */

0 commit comments

Comments
 (0)