PDA

View Full Version : Fonts don't display properly



leigh123linux
31st December 2006, 02:29 AM
I noticed in fedora that the fonts look terrible with LCD screens when viewing web pages.

The default font is 96x96

However when I checked my screen size ( height & width ) and font resolution I found it
was 86x84 which will really screw your fonts up.
solution

add or change this line in xorg.conf


DisplaySize 270 203


Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Philips 105S(15inch/CM2300)"
DisplaySize 270 203
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 30.0 - 60.0
VertRefresh 50.0 - 120.0
Option "dpms"
EndSection

Here the correct values to give 96x96 fonts for most resolutions


DisplaySize 270 203 # 1024x768 96dpi
DisplaySize 338 254 # 1280x960 96dpi
DisplaySize 338 270 # 1280x1024 96dpi
DisplaySize 370 277 # 1400x1050 96dpi
DisplaySize 442 277 # 1680x1050 96dpi
DisplaySize 423 370 # 1600x1400 96dpi



To get other values, use the following formula:
displaysize = <pixelsize>/96*25.4

To change this type in terminal


su
gedit /etc/X11/xorg.conf

Then edit .

Don't worry if these sizes don't correspond to monitor size. These figures are correct and wont effect the real screen size.

To check screen size.


xdpyinfo | grep dimensions

To check font resolution.


xdpyinfo | grep resolution

If the resolution is not 96x96 dots per inch slightly adjust the DisplaySize values until correct.

Configure Gnome to run at 96 dpi in desktop > Preferences > Font > Details

sideways
31st December 2006, 02:39 AM
I find font settings pretty tricky in Fedora with LCDs, I'm using Gnome desktop, 1280x1024 L1710B monitor:

System->Preferences->Fonts

Best Shapes
Details->
Resolution 96 dots per inch
Subpixel Smoothing
Hinting->Slight

I'm not sure I have the best settings

What does everyone else have?

I'll have to try the xorg changes you suggest sometime.


edit: btw, I have the windows true-type fonts installed

leigh123linux
31st December 2006, 02:46 AM
I have windows true type as well and had 96x96 set in the fonts section, but when I issued this command ( xdpyinfo | grep resolution ) it returned 86x84 .
After editing xorg.conf and restarting X the difference was amazing , Before I changed it I thought I needed new glasses.

sideways
31st December 2006, 03:03 AM
geez, when I do 'xdpyinfo | grep resolution ' it says 95x96

Now, I'm feeling my display is a tiny bit fuzzy, but I don't know if it's worth playing with the settings.

I don't know much about xdpyinfo though, so thanks for the pointers :)

(I'm gonna be real paranoid about that 95 x resolution)

leigh123linux
31st December 2006, 03:10 AM
In xorg.conf change or add this line to the monitor section


DisplaySize 338 270

restart X then do the same command again


xdpyinfo | grep resolution

This change cant stop X starting.

leigh123linux
31st December 2006, 03:50 AM
Just checking another install this is what I got when it reported in font setup 96x96




[leigh@localhost ~]$ xdpyinfo | grep dimensions
dimensions: 1024x768 pixels (302x232 millimeters)
[leigh@localhost ~]$ xdpyinfo | grep resolution
resolution: 86x84 dots per inch
[leigh@localhost ~]$

after changing settings to ( DisplaySize 270 203 )

It now gives me this , and much clearer fonts :D


[leigh@localhost ~]$ xdpyinfo | grep resolution
resolution: 96x96 dots per inch
[leigh@localhost ~]$ xdpyinfo | grep dimensions
dimensions: 1024x768 pixels (271x203 millimeters)
[leigh@localhost ~]$

sideways
31st December 2006, 04:08 AM
Hey, that's not bad!

I adjusted the DisplaySize as suggested and now xdpyinfo reports 96x96.

So I went back to (Gnome) System->Preferences->Fonts

and selected the LCD options (Subpixel Smoothing, Full Hinting) but I found I needed to select VRGB rather than RGB for the subpixel order.

Have to say, the display does look pretty sharp now.

You've solved a longstanding problem here :)

sideways
31st December 2006, 04:26 AM
actually, I had to go back to Best Shapes and Slight Hinting to get the best rendering, but still looks a tad sharper than before.

Iron_Mike
31st December 2006, 05:29 AM
Leigh,

Thanks for this! On my laptop the resolution initially showed 75x75 on a 1680x1050, 16:10 aspect laptop. After fudging around with the DisplaySize settings it now shows 96x96 resolution. It definitively looks better. This is on a 15.4 widescreen 1680x1050 native resolution and the settings turned out to be (DisplaySize 442 277). Feel free to include them in your settings above. Thanks Again.....

Forget to mention that I'm using the Deja Vu fonts also...

leigh123linux
31st December 2006, 10:14 AM
I am glad this has helped.

john
31st December 2006, 10:32 AM
Hi,
sorry for my bad English!

It works great for fedora 6,but will it works also for other distro's?
I'm currently on the way with a dualboot 'FC6 and OpenSuSe10.2'...can i used the same method for suse to?
...what do you think?

leigh123linux
31st December 2006, 10:36 AM
Hi,
sorry for my bad English!

It works great for fedora 6,but will it works also for other distro's?
I'm currently on the way with a dualboot 'FC6 and OpenSuSe10.2'...can i used the same under suse...what you think?

So far this has worked for Debian and Fedora , but I can not see any reason way it shouldn't work with any Distro. :)

john
31st December 2006, 10:40 AM
Thx...I'm gonna give it a try !

leigh123linux
31st December 2006, 10:54 PM
I have finished tweaking my fonts, I selected Tohoma for my default TrueType and I am happy with the results.

screenshot of 15" monitor set at 1024x768@75hz

sideways
31st December 2006, 11:15 PM
I'm using the default fonts (what do you mean by default True-Type font?) heres a screen shot (resolution is 1280x1024)
Screenshot.png

leigh123linux
31st December 2006, 11:33 PM
Just the default system fonts, websites normally choose there own

r0bh
4th January 2007, 02:50 PM
Hi,

I've been trying the instructions in this thread but whatever I do I can't seem to get the resolution to change - it is always 87*86.

Here's my xorg.conf:



# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection

Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
ModelName "Dell 1905FP (Analog)"
DisplaySize 338 270
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "nv"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1280x960" "1280x800" "1152x864" "1024x768"
"800x600" "640x480"
EndSubSection
EndSection


and this is the output of the xdpyinfo commands:



[rsh@yucca ~]$ xdpyinfo | grep dimensions
dimensions: 1280x1024 pixels (374x302 millimeters)
[rsh@yucca ~]$ xdpyinfo | grep resolution
resolution: 87x86 dots per inch


Any ideas?

r0bh
4th January 2007, 03:20 PM
Bit more poking around and I've actually fixed this myself :)

Mainly thanks to this thread http://www.fedoraforum.org/forum/showthread.php?t=139508&page=2&pp=15 which suggests the use of


Option "DDC" "false"
in xorg.conf.

And now I have


[rsh@yucca ~]$ xdpyinfo | grep resolution
resolution: 96x96 dots per inch
[rsh@yucca ~]$ xdpyinfo | grep dimensions
dimensions: 1280x1024 pixels (339x271 millimeters)

leigh123linux
4th January 2007, 07:47 PM
If it works use it , but it should have already been disabled

Disabled state


Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
ModelName "Dell 1905FP (Analog)"
DisplaySize 338 270
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection


Enabled state


Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
ModelName "Dell 1905FP (Analog)"
DisplaySize 338 270
### Comment all HorizSync and VertSync values to use DDC:
# HorizSync 30.0 - 81.0
# VertRefresh 56.0 - 76.0
Option "dpms"
EndSection