Folks,

Net Llama! wrote:
> hrmmm, this got me wondering.  on one of my boxes i have:
> xdpyinfo | egrep 'resol|dimen'
>    dimensions:    1600x1200 pixels (383x290 millimeters)
>    resolution:    106x105 dots per inch
> 
> is it normal for the 'resolution' to be rectangular, rather than
> square? 

It is normal for the dots-per-inch to be square.  Otherwise images are
distorted.  106x105 is *not* so off that it will cause observable
distortion, however.


Many thanks to Llama & Kurt for ways to check resolution.  My screen
resolution reads the same on both laptops:

Bailey:root:/root:992 # xdpyinfo | egrep 'resol|dimen'
  dimensions:    1024x786 pixels (347x260 millimeters)
  resolution:    75x75 dots per inch

I've taken this topic "Off Topic", because it must be some combination of
programming and system setup.  Coders with thoughts are welcome to
contribute.

The java code below is identical on both machines:

-----------------------------------------------
TestsApp( String title )
{
   super( title );

   int xPad = 10;
   int yPad = 10;
   int width = 10;
   int height = 10;
   Font butnFont = new Font( "Courier", Font.BOLD, 14 );
   FontMetrics butnFontMet = getFontMetrics( butnFont );
   int butnHeight = ( 6 * butnFontMet.getHeight() ) / 2;
   int butnWidth = butnFontMet.stringWidth( "ARCHIVE LOGS" ) + xPad;
   GridBagLayout nfcs = new GridBagLayout();
   GridBagConstraints constr = new GridBagConstraints();
   setLayout( nfcs );
   Color col = new Color( 255, 255, 255 );

   testFrame = (Frame)this;

   width = ( ( butnWidth + xPad ) * 4 ) + xPad;
   height = ( 2 * ( textHeight + yPad ) ) + ( 8 * ( butnHeight + yPad ) ) +
yPad;

   this.setSize( width, height );
...
}
-----------------------------------------------

Yet when executed on them (with data dumps to show results) I find these
results:
Laptop          Bailey          wobbly
Text Height     25                      25
Head Width      468                     364    (width of header string)
xPad                    10                      10
yPad                    10                      10
Button Wid      142                     106
Button Hgt      45                      42
Width           618                     474
Height          520                     496


Now, one might reasonably conclude that given the same font (courier) and
the same font size (14) and the same font style (bold) and the same string
(ARCHIVE FILES) that the calculation of the size of any of these things
would be the same.  Not so in this case.  Bailey is RedHat 6.2 installed by
the folks at Emperor Linux.  Wobbly is Gentoo 1.4 installed by myself.
However, I have another laptop with Red Hat 7.0 on it (also installed by the
Emperor Linux people) that shows the same compressed display that wobbly
does.  The window in question is nicely spaced out on Bailey, just as
designed.  The window on wobbly has the buttons run into each other and the
text of some of the buttons running into the borders.  If I hard code
wobbly's window size to match that calculated in Bailey it looks as desired.
The font appears (to my engineer's eye) to be identical in size and shape on
both machines.

I'm still researching why, but if anyone has ideas I'm open to suggestions.


In Harmony's Way, and In A Chord,

Tom  :-})

Thomas A. Condon
Barbershop Bass Singer
Registered Linux User #154358
A Jester Unemployed
_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to