View previous topic :: View next topic |
Author |
Message |
Insanity5902 Veteran
Joined: 23 Jan 2004 Posts: 1228 Location: Fort Worth, Texas
|
Posted: Wed Nov 08, 2006 5:39 pm Post subject: Oversize (or undersized) fonts in firefox, etc |
|
|
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 _________________ Join the adopt an unanswered post initiative today |
|
Back to top |
|
|
ThomasAdam Guru
Joined: 20 Mar 2005 Posts: 448 Location: England
|
Posted: Wed Nov 08, 2006 6:46 pm Post subject: |
|
|
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 |
|
|
chovy Guru
Joined: 03 Dec 2004 Posts: 453
|
Posted: Sat Jan 06, 2007 3:37 am Post subject: |
|
|
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 |
|
|
klowe n00b
Joined: 23 May 2006 Posts: 8
|
Posted: Sat Jan 13, 2007 11:13 am Post subject: |
|
|
Deleted
Last edited by klowe on Wed Apr 29, 2015 11:25 am; edited 1 time in total |
|
Back to top |
|
|
torf n00b
Joined: 27 Apr 2004 Posts: 65 Location: Constance/Germany
|
Posted: Wed Feb 06, 2008 2:29 pm Post subject: |
|
|
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 |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Wed Feb 06, 2008 3:28 pm Post subject: |
|
|
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 |
|
|
micr0c0sm Tux's lil' helper
Joined: 29 Oct 2005 Posts: 148 Location: New York
|
Posted: Wed Feb 06, 2008 5:47 pm Post subject: |
|
|
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 |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Wed Feb 06, 2008 7:02 pm Post subject: |
|
|
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 firefox 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 gerard27 on Wed Feb 06, 2008 7:28 pm; edited 1 time in total |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Wed Feb 06, 2008 7:16 pm Post subject: |
|
|
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 |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Wed Feb 06, 2008 7:34 pm Post subject: |
|
|
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 firefox 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 |
|
|
gsoe Apprentice
Joined: 10 Dec 2006 Posts: 289 Location: Denmark
|
Posted: Wed Feb 06, 2008 8:12 pm Post subject: |
|
|
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 |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Sun Feb 10, 2008 3:06 pm Post subject: |
|
|
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 firefox 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 |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Wed Feb 27, 2008 6:36 am Post subject: |
|
|
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). _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
|