diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-29 23:30:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-29 23:30:47 +0000 |
commit | 810eb77b962e31dc585406153dbd26b1730fca99 (patch) | |
tree | f128d8cb4f1ab44b2bc2d15ceb934e0f263de592 /Build/source/texk/dvipsk/output.c | |
parent | a0ed0ffbda4a0a7b1d95edddb1cfab20e252ea5b (diff) |
%%ViewingOrientation comment to cope with wrong Distiller autorotation, if the bitmap font encoding is enabled and at least one bitmap font is used
git-svn-id: svn://tug.org/texlive/trunk@53979 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/output.c')
-rw-r--r-- | Build/source/texk/dvipsk/output.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/texk/dvipsk/output.c b/Build/source/texk/dvipsk/output.c index 1d7a7288ec3..8a72696cb7c 100644 --- a/Build/source/texk/dvipsk/output.c +++ b/Build/source/texk/dvipsk/output.c @@ -1468,6 +1468,25 @@ initprinter(sectiontype *sect) tell_needed_fonts(); paperspec(finpapsiz->specdat, 1); fprintf(bitfile, "%%%%EndComments\n"); +/* + * If we encode Type 3 fonts with an encoding vector, this can cause + * Distiller's autoorientation to get confused. We remedy this by + * emitting underdocumented ViewingOrientation comments right after + * EndComments. Known defect: if a user "flips" the landscape to be + * 180 degrees using one of the \special{} commands available, the + * document will be rendered in the viewer upside down. (But only + * with bitmap font encoding enabled and bitmapped fonts actually used.) + * --tgr, 29 February 2020. + */ + if (encodetype3 && bitmapfontseen) { + fprintf(bitfile, "%%%%BeginDefaults\n") ; + if (landscape) { + fprintf(bitfile, "%%%%ViewingOrientation: 0 -1 1 0\n") ; + } else { + fprintf(bitfile, "%%%%ViewingOrientation: 1 0 0 1\n") ; + } + fprintf(bitfile, "%%%%EndDefaults\n") ; + } } { int i, len; |