You are not logged in.

#1 2006-07-13 00:14:07

miller0521
Member
Registered: 2006-05-17
Posts: 38

DPI for Fonts

I use a resolution of 1024x768, If i find the res for fonts it says 81x81, on Windows it is set as 96. Would my fonts look better under Linux if I were to use 96, and if so, how do I go about changing this? I'd like to do whatever I can to make fonts look as good as possible in Arch Linux.

Also, I instaleld all my Microsoft Fonts via KDE's Font Install program, will this put the fonts everywhere I need them?

Thanks

Offline

#2 2006-07-13 00:26:25

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: DPI for Fonts

Why install manually? pacman -S ttf-ms-fonts does the job wink
I put other fonts in ~/.fonts - I belive that's what KDE does when you install a font too.

I'm not sure about this, but I think the DPI setting only changes the size of the fonts.

Offline

#3 2006-07-13 00:26:59

allucid
Member
Registered: 2006-01-06
Posts: 259

Re: DPI for Fonts

Add this line at the end of the Section "Monitor" in your xorg.conf:

DisplaySize    270    203    # 1024x768 96dpi

Offline

#4 2006-07-13 04:06:36

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: DPI for Fonts

Typically, you would get better results by using the native DPI of your monitor. You should search the forum for one of the many discussions about this subject that already exist.

Offline

#5 2006-07-13 05:22:01

McQueen
Member
From: Arizona
Registered: 2006-03-20
Posts: 387

Re: DPI for Fonts

For DPI you can as a general guide take the resolution of your monitor and divide by the physical size.
So, for a 15" LCD: 1024 / 11.96 (inches) = 85.6DPI.

DisplaySize is a measurement of (screen width)*25.4/dpi and (screen height)*25.4/dpi, where 'screen width/height' refer to your desired monitor resolution. Some monitors can give their physical dimensions to the display adapter, and if the driver supports this, it is possible to compute the DPI automatically.

From man xorg:

"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."

On my system:

$ xdpyinfo | grep -B1 dot
  dimensions:    1280x1024 pixels (339x271 millimeters)
  resolution:    96x96 dots per inch


You can also get the values by using the X server to calculate the numbers.
Run it using "startx -- -dpi 96" command (or your preferred dpi)

Then check the dimension:

$ xdpyinfo | grep dimension
dimensions: 1400x1050 pixels (XXXxYYY millimeters)

Use these XXX and YYY values for DisplaySize parameter in xorg.conf.
Just another method to get the results automagically.

Many people like to set their DPI to 96 (this will vary wildly based on the monitor size, resolution settings, and what users prefer) because that is generally the Windows default for the most common resolutions, and the font size that it provides is familiar to their usage. To get a 96 DPI squared with my monitor (there are other many other methods to obtain this) I use this entry in my xorg.conf file:

DisplaySize 338 270

The forumla for that is:

X = screen-res-x * 25.4 / desired-dpi
Y = screen-res-y * 25.4 / desired-dpi

Which in turn gives me:

$ xdpyinfo | grep -i resolution
resolution:    96x96 dots per inch

When X assigns the dpi, the -dpi command line option has highest priority. If this is not used, the DisplaySize setting in the X config file is used to derive the DPI, given the screen resolution. If no DisplaySize is given, the monitor size values from DDC are used to derive the DPI, given the screen resolution. If DDC does not specify a size, 75 DPI is used by default. Individual settings in the DE can override any and all of these.


/path/to/Truth

Offline

#6 2006-07-13 05:28:28

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: DPI for Fonts

You should also consider adding a DPI line to /etc/fonts/local.conf to possibly correct any problems you've been having with font rendering.

Offline

#7 2006-07-13 08:49:43

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: DPI for Fonts

McQueen, that's a nice little overview. You know you want to put it in the wiki.

Ah, go on! smile

Offline

#8 2006-07-13 12:47:03

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: DPI for Fonts

I think it's already there :-) (not mentioning it's been discussed 1000 times on the forums...)

Offline

#9 2006-07-13 19:08:01

miller0521
Member
Registered: 2006-05-17
Posts: 38

Re: DPI for Fonts

Ok I put
DisplaySize 269 201 # 96 DPI @ 1024x768
into my Monitor section and things seem to be a bit better. Obvsiously still not as good as Windows, or BSD, but should be usable.

Offline

#10 2006-07-13 20:50:49

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: DPI for Fonts

Thanks McQueen, now my fonts are the right DPI

Offline

#11 2006-07-13 21:07:43

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: DPI for Fonts

jaboua wrote:

Thanks McQueen, now my fonts are the right DPI

Well, technically they aren't. If you put your monitor's actual viewable dimensions on that line then it would be right. DPI == Dots Per Inch, or the number of pixels per inch. It's not ideally something you'd mess with other than to set it in accordance with reality. Of course, until computers incorporate scaling seperate from DPI (which they really should), you may find it necessary to make up fake numbers.

Offline

#12 2006-07-14 02:06:55

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: DPI for Fonts

Ok. I know what DPI is, I just thought that method found the real dimensions (xorg may have grabbed it from DDC or whatever it's called)

Offline

#13 2006-07-14 07:16:15

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: DPI for Fonts

jaboua wrote:

Ok. I know what DPI is, I just thought that method found the real dimensions (xorg may have grabbed it from DDC or whatever it's called)

I'm not sure if the xdpyinfo | grep dimensions method does, but I thought you meant that you had chosen dimensions other than the real ones in order to make X think you had a 96 dpi display.

Offline

#14 2006-07-14 13:40:32

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: DPI for Fonts

It's better to measure it yourself and use the real values in DisplaySize. Don't forget to tell firefox to use system dpi (same value as in /etc/fonts/local.conf). Also the dpi looks usually better when it's "sqare" - xdpyinfo should show for example 96 x 96 dpi. If it's not you can change the size a little to achieve the sqare dpi.

Offline

Board footer

Powered by FluxBB