[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gv] Incorrect aspect ratio on scaled laptop display (II)

From: William Bader
Subject: Re: [bug-gv] Incorrect aspect ratio on scaled laptop display (II)
Date: Wed, 22 May 2019 21:16:36 +0000

My guess is that scale_getScreenSize() in scale.c is getting the viewport pixel dimensions from the "screenSize" resource and the full display size from WidthMMOfScreen() and HeightMMOfScreen() (which are macros defined in X11/Xlib.h). You could try using a debugger or throwing in some debug code to check that, and then looking around to see if you can get either the MM of the viewport or the pixel dimensions of the entire display.

From: bug-gv <bug-gv-bounces+address@hidden> on behalf of address@hidden <address@hidden>
Sent: Wednesday, May 22, 2019 4:02 PM
To: address@hidden
Subject: [bug-gv] Incorrect aspect ratio on scaled laptop display (II)
Corrected previous post:


I noticed that in a certain X11 setup gv is displaying
files with the horizontal dimension compressed (too narrow
windows and contents).

Setup: laptop with a physical 1920x1080 screen, running in
twinview clone mode for a 4:3 aspect projector (1024x768):

     xorg.conf contains a MetaMode for a 1024x768 viewport
     (nvidia driver):

         Option "MetaModes" "DFP-1: nvidia-auto-select
         @1024x768 +0+0 {viewportin=1024x768,
         viewportout=1024x768+448+156}, 1024x768 @1024x768"

This results, as intended, in a 1024x768 viewport
occupying the central physical 1024x768 pixels (1-to-1)
and having black borders. xdpyinfo reports conflicting
aspect ratio information (4:3 vs. 16:9):

     dimensions:    1024x768 pixels (342x191 millimeters)
     resolution:    76x102 dots per inch

The gv windows and their contents are too narrow and would
appear correctly if the 4:3 viewport were stretched
horizontally or compressed vertically to a 16:9 aspect
ratio. The same behavior resulted if the 1024x768 viewport
was uniformly expanded to 1440x1080 physical pixels (...,
viewportout=1440x1080+240+0}, ...). (In these particular
cases, gv should take cue from pixel resolutions, not
physical dimensions.)

Other info;


     The PS or EPS files are self-generated (gnuplot) and
     the BoundingBox comments exist, e.g. %%BoundingBox: 50
     50 554 770 or 50 05 554 856.

     Everything else (text, images, etc.) is displayed
     correctly. evince displays PS, EPS at the correct
     aspect ratio in the same setup. PDF files converted
     using ps2pdf are shown correctly by xpdf and evince
     (and incorrectly by gv).

Thanks and best regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]