Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Oversize (or undersized) fonts in firefox, etc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Wed Nov 08, 2006 5:39 pm    Post subject: Oversize (or undersized) fonts in firefox, etc Reply with quote

I had an issue with some fonts on certain web pages display way way to big. I couldn't find anything on the forums and took lots of work to find the answer on google so I am sharing it here. I noticed the problem mainly with firefox, but it was also apperent in my WM (fvwm) b/c I had all my desktop font stuff set to 6 or 7.

This problem was the DPI. The autoDPI of xorg was setting mine to nearly 120. I found the formally for using the DPI of your choice with Xorg option DisplaySize, here is how:

Take your Screen resolution (mine is 1440x900) multiple each by 25.4 and the divide by the DPI you want (I wanted 96). Plug these numbers into DisplaySize option and you are set. So Here is the math and a code exert from my xorg.conf

(1440 * 25.4) / 96 = 381
(900 * 25.4) / 96 = 238

Add 'DisplaySize 381 238' to your Monitor Section and you are good to go ex:
Code:
Section "Monitor"
        Identifier   "Laptop LCD"
        DisplaySize 381 238
        Option      "DPMS"
EndSection


This gave me to correct DPI and now all my fonts in every app are consitent and look great.

You can use
Code:
xdpyinfo | grep resolution
to find out if the DPI took, and also your current DPI if you are unsure of it.

*Note* Be sure to restart X :) and enjoy
_________________
GibbonsR.net | OpenLaptops.org

Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 447
Location: England

PostPosted: Wed Nov 08, 2006 6:46 pm    Post subject: Reply with quote

Pity -- I'd had a similar solution to this written up for months on the fvwmwiki.org site before it went down.

-- Thomas Adam
Back to top
View user's profile Send private message
chovy
Guru
Guru


Joined: 03 Dec 2004
Posts: 453

PostPosted: Sat Jan 06, 2007 3:37 am    Post subject: Reply with quote

thanks, i still have some weird font issues...looks great on winXP. Perhaps that's just the nature of the linux font.

Anyway, I corrected mine using your calculations and now have:

$ xdpyinfo | grep resolution
resolution: 95x96 dots per inch


It looks clearer, but still too crisp. glxgears is slow as hell too...but I think that's another issue.
_________________
Woof, Woof! Add "[solved]" to the title! Woof, Woof!
Back to top
View user's profile Send private message
klowe
n00b
n00b


Joined: 23 May 2006
Posts: 10

PostPosted: Sat Jan 13, 2007 11:13 am    Post subject: Oversize (or undersized) fonts in firefox, etc. Reply with quote

Another useful reference is: www.wordstar.org/computing/pages/monitor_cal.htm
Back to top
View user's profile Send private message
torf
n00b
n00b


Joined: 27 Apr 2004
Posts: 65
Location: Constance/Germany

PostPosted: Wed Feb 06, 2008 2:29 pm    Post subject: Reply with quote

Thanks a lot, exactly what I needed!

Anybody got an explanation of the formula itself? Where does the 25.4 come from?
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Wed Feb 06, 2008 3:28 pm    Post subject: Reply with quote

Quote:
Anybody got an explanation of the formula itself? Where does the 25.4 come from?
millimeter to inch ratio
1 inch == 25.4 mm.
Back to top
View user's profile Send private message
micr0c0sm
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2005
Posts: 148
Location: New York

PostPosted: Wed Feb 06, 2008 5:47 pm    Post subject: Reply with quote

Code:

# xdpyinfo | grep reso
  resolution:    122x127 dots per inch


Should the DPI be YxY or is it ok that I have a 5 dpi difference?
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2180
Location: Netherlands

PostPosted: Wed Feb 06, 2008 7:02 pm    Post subject: Reply with quote

Hello all,
I would like to change my resolution also but adding DisplaySize doesn't work.
It remains at 93 x 95 dpi.
My display is 1920x1200.
1920 * 25.4/120 = 406.4
1200 * 25.4/120 = 254
Code:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    DisplaySize       406 254   
    HorizSync       30.0 - 80.0
    VertRefresh       56.0 - 76.0
    Option         "DPMS"
EndSection

I'd like to know if I am doing something wrong.
I rebooted the whole box.
Gerard.

Edit:
This is not going to work.
Here is an excerpt of man xorg.conf:
Code:

DisplaySize width height
 This optional entry gives the width and height, in millimetres, of the picture area of the monitor. If given this is used to calculate the horizontal and vertical pitch (DPI) of the screen.

My system uses EDID and sets resolution accordingly 1920 x 1200 (524 x 321 millimetres).
This is an LCD (TFT?) monitor which will not allow you to use another resolution AFAIK.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has midori to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download


Last edited by gerard82 on Wed Feb 06, 2008 7:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2671
Location: here, there or in transit

PostPosted: Wed Feb 06, 2008 7:16 pm    Post subject: Reply with quote

Gerard van Vuuren wrote:
I would like to change my resolution also but adding DisplaySize doesn't work.
It remains at 93 x 95 dpi.
If you're using GNOME, go to System > Preferences > Font, click the Details... button and adjust the DPI there. Once you've made any change to this setting--even only to experiment--it overrides the DPI from the X configuration.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2180
Location: Netherlands

PostPosted: Wed Feb 06, 2008 7:34 pm    Post subject: Reply with quote

Hi timeBandit,
I use KDE and it has the same possibility.
Unfortunately Firefox etc. use GTK.
I could change some of the fonts with gtk-chtheme,but I am still not satisfied.
Thanks for answering though.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has midori to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 284
Location: Denmark

PostPosted: Wed Feb 06, 2008 8:12 pm    Post subject: Reply with quote

Gerard: If you use nvidia drivers you can use the following options in xorg.conf:
Code:
Section "Screen"
        Identifier      "Default Screen"
        Device          "Nvidia 7300GT"
        Monitor         "Philips 170B"
        DefaultDepth    24
        Option          "UseEdidDpi"    "False"
        Option          "DPI"   "96 x 96"
        SubSection "Display"
                Depth           1
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
                etc....
I wouldn't recommend using other than the native DPI with an LCD though...
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2180
Location: Netherlands

PostPosted: Sun Feb 10, 2008 3:06 pm    Post subject: Reply with quote

Thanks gsoe,
I've been away hence the late answer.
Well I guess not all new things are an improvement.
I tried to lower the resolution for pictures and noticed that it won't work.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has midori to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 706
Location: NY, USA

PostPosted: Wed Feb 27, 2008 6:36 am    Post subject: Reply with quote

I found this thread incredibly helpful in resolving my unreadable small fonts on my laptop. However, the 95x96 was driving my nuts after the fix, so I decided not to round...

Code:

alexiea ~ # grep DisplaySize /etc/X11/xorg.conf
    DisplaySize 270.93333333333 203.2


Which makes it an even 96x96. So, it helps to be as exact as possible (within reason).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum