/ Hathaway Weblog / How to fix Linux fonts

Shane :: Linux :: July 14, 2004 # How to fix Linux fonts

I finally learned how to make fonts appear correctly in Linux. You just have to tell XFree86 how big your monitor is. If you don't, XFree86 seems to assume your monitor is a mammoth, making fonts appear small.

In /etc/X11/XF86Config, look for a Section "Monitor" header. Inside that section, add a DisplaySize directive and specify the size of the monitor in millimeters. man XF86Config has the details. If you have multiple monitors, put the directive in each monitor section. Increase the numbers a bit if you prefer small fonts. Here is an example monitor section:

Section "Monitor"
  Identifier   "Hitachi"
  HorizSync    31.0 - 95.0
  VertRefresh  50.0 - 120.0
  DisplaySize  400 300
EndSection

400 x 300 is about right for a 20" monitor. Restart the X server for the changes to take effect.

Comments

Shane (September 04, 2004 18:51)
Testing comments, please disregard...

some dude (August 01, 2005 08:45)

how can i know the correct values for a monitor? I mean, how did you know those were the values for your screen? im using a 1024x768, Thank you! :D

Shane Hathaway (August 01, 2005 22:07)

The numbers are the size of the monitor's viewable area in millimeters. In my case, it measures about 400mm wide by 300mm high. You could measure it, but I admit I actually didn't have a tape measure around. ;-) I took 19, the length of the diagonal of the visible area as indicated by the manufacturer, multiplied by 2.54 to convert to centimeters, multiplied by 10 to convert to millimeters, then rounded up to 500. Then, knowing that the aspect ratio of the monitor is 4:3, I noticed that the proportions match the 3-4-5 right triangle. I scaled the standard triangle to 300-400-500, giving me the numbers I wanted.

No further comments may be added.

1 Nephi 19:23 (Click below to fill in the blanks.)
Your browser is not able to display the scripture fill-in program. To see it, enable Javascript or use Mozilla 1.0 or better.

Church: lds scriptures provident games pearls kzion shiblon film chancellor gateway cumorah byutv happiness nephi
Zope: freezope org com zen labs newbies zettai warnes
Python: home pyzine daily icanprogram
Genealogy: cyndi
Weblogs: jeffrey paul jon joel another-shane guido barry jeremy windley chrism zac
News: quakes lwn dc weather deseret zeitgeist softwarelivre
Zaurus: software developer
Tech: tango spintronics thin
Semantic: aaron sean
Reference: css rdf html4 javascript geckodom iecss emacs phrases acronyms
Reverse: advogato slashdot
Misc: gimp-savvy directory soda jokes shouldexist pdphoto