You are not logged in.

#1 2014-06-01 20:20:21

CopOnTheRun
Member
Registered: 2013-12-12
Posts: 5

For some reason changing my screen orientation changes some font sizes

So when I use xrandr --rotate {orientation} to put my screen in portrait mode, then open a new application the font will be larger than usual. Example 1 (normal), Example 2 (larger). I think I know what the problem is, just not how to fix it. For some background, I'm running arch with the i3 windows manager. I've got a 24" screen with 1920x1200 resolution. Recently I uninstalled gnome, and after that is when I noticed the problems popping up.

Here are some outputs:

xdpyinfo (horizontal orientation)

xdpyinfo | grep -E 'dimensions|resolution'
  dimensions:    1920x1200 pixels (508x317 millimeters)
  resolution:    96x96 dots per inch

xdpyinfo (vertical orientation)

xdpyinfo | grep -E 'dimensions|resolution'
  dimensions:    1200x1920 pixels (508x317 millimeters)
  resolution:    60x154 dots per inch

xrandr (horizontal orientation)

xrandr | grep -w connected
HDMI1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm

xrandr (vertical orientation)

xrandr | grep -w connected 
HDMI1 connected 1200x1920+0+0 left (normal left inverted right x axis y axis) 518mm x 324mm

It seems the big thing to note is that in landscape and portrait the dpi is different (96x96 vs 60x154). I think the reason for this is because in portrait the dpi calculation is dividing horizontal pixels by vertical screen length, instead of horizontal screen length and vice versa (I actually did the calculation myself to see if this was the case, and my numbers matched up).

So I guess my question is, why is this happening, and what's the best way to go about fixing it? Also why does xdpyinfo show a different screen length than xrandr? (508x317mm vs 518x324) Xrandr is actually closer.

Thanks!

Last edited by CopOnTheRun (2014-06-01 21:15:38)

Offline

#2 2014-06-01 21:04:15

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: For some reason changing my screen orientation changes some font sizes

Hopefully you can reset the DPI with e.g.:

xrandr --fbmm 324x518

Offline

#3 2014-06-01 21:28:33

CopOnTheRun
Member
Registered: 2013-12-12
Posts: 5

Re: For some reason changing my screen orientation changes some font sizes

Yes,  I am able to change the dpi temporarily by using

xrandr --dpi 96x96

I've actually tried putting the command in my .xinitrc, but it doesn't seem to work for some reason.

Offline

#4 2014-06-01 21:42:26

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: For some reason changing my screen orientation changes some font sizes

A common mistake is to put code lines *after* the "exec startmyguiblah" line, and the exec command prevents any such further code from executing wink

Your command is wrong - --dpi only accepts a single value sad

Check with:

xdpyinfo | grep -B1 dot

Whereas --fbmm can change the DPI properly, since the DPI is 2 values - horizontal and vertical.

Last edited by brebs (2014-06-01 21:45:23)

Offline

#5 2014-06-01 22:29:15

CopOnTheRun
Member
Registered: 2013-12-12
Posts: 5

Re: For some reason changing my screen orientation changes some font sizes

Oops, I mistyped the command here, it was correct (xrandr --dpi 96) in my .xinitrc file. Also the command was before my "exec i3" and there weren't any misspellings. This is perplexing hmm

Also, I'm 99% certain that the pixels on my monitor are square, so the orientation shouldn't change the DPI. eg it should always have a 96x96 dpi.

Any more ideas?

Last edited by CopOnTheRun (2014-06-02 17:09:23)

Offline

Board footer

Powered by FluxBB