Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Correct font sizes in X
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
TripKnot
Apprentice
Apprentice


Joined: 29 May 2002
Posts: 213

PostPosted: Fri Jun 28, 2002 8:10 pm    Post subject: Correct font sizes in X Reply with quote

Adding the line to the "Monitor" section of /etc/X11/XF86config:

DisplaySize x y

where x and y are the size in mm of your diplay, will corect the font sizes in X. Basically it forces X to use a different DPI for calculating font sizes than the default 75x75. The effects don't take effect until the Xserver is restarted and from within the KDE control center, antialiasing is disabled (it can be reenabled directly after. The state needs to be switched briefly to make the changes take effect).

This has a remarkable effect on my laptop which has a fixed res of 1400x1050 and attempting diff res's causes the system to freeze. The default res and fonts were too small and caused significant eye strain, but now, with the dpi set to 124x122, they are super clear.

This works regardless if you use the XFS or not. YMMV depending on display size and the res you normally run at but smaller displays running at high res(like laptop LCDs) can benefit greatly.

If you don't like the new look then simply removing the DisplaySize line mentioned above resorts to the previous setup.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16117
Location: Colorado

PostPosted: Fri Jun 28, 2002 8:14 pm    Post subject: Reply with quote

Just to clarify, would that be:
Code:
DisplaySize 100 50

- or -
Code:
DisplaySize 100x50

- or -
Code:
DisplaySize 100 x 50


Just in case it matters. I'll have to measure my display area now :D
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
kemical
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2002
Posts: 139
Location: raleigh, NC

PostPosted: Wed Oct 02, 2002 10:27 am    Post subject: Reply with quote

what should i put if i use 1280x1024 res, and doyou think this would have a good effect on getting those kylix 3 fonts to be readable :)
_________________
.. ...kemical. ... .. ..
Back to top
View user's profile Send private message
sankeld
n00b
n00b


Joined: 03 Oct 2002
Posts: 9

PostPosted: Thu Oct 03, 2002 8:25 am    Post subject: 21" Monitor Reply with quote

Just the MM sizes for a 21" monitor

DisplaySize 370 270

It'd probably be nice if other's posted some more standard sizes.
Back to top
View user's profile Send private message
lars_msh
n00b
n00b


Joined: 25 Aug 2002
Posts: 50
Location: Airstrip One

PostPosted: Thu Oct 03, 2002 7:52 pm    Post subject: Reply with quote

Thanks, I found this thoroughly useful.

My not very careful measurement of my Iiyama Vision Master Pro 17 (17" screen if you didn't guess) comes to 320 x 235mm.
Back to top
View user's profile Send private message
phong
Bodhisattva
Bodhisattva


Joined: 16 Jul 2002
Posts: 778
Location: Michigan - 15 & Ryan

PostPosted: Thu Oct 03, 2002 8:40 pm    Post subject: Reply with quote

You probably want to make sure that the ratio of width to height is 4:3, even if you measure it and it doesn't quite work out that way. Otherwise it'll probably think you have a monitor with a non-normal aspect ratio and set different DPIs for the two directions (which can cause trouble). Of course, you don't want to set a 4:3 aspect ratio if you have a 16:9 monitor or something.

Edit: I was sitting here wondering why pictures of pyramids were popping into my head, and I think I figured out why. If, like me, you don't have a ruler handy, or you don't feel like trying to measure a curved surface, you can use this formula:
Width = 4*X/5
Height = 3*X/5
Where X is the viewable area of your monitor measured diagonally (which can be found in your monitor's specs on the mfgs. web site or it's manual). On my 19" Sony, for example, it's 18.0". So my monitor is 14.4x10.8. Of course, don't forget to convert your units.
_________________
"An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer
Back to top
View user's profile Send private message
boa13
n00b
n00b


Joined: 08 Aug 2002
Posts: 32
Location: Versailles, France

PostPosted: Thu Oct 03, 2002 10:32 pm    Post subject: 15" and 13"... same size! Reply with quote

Here is the size for both a very old COMPAQ Presario 1525 screen (15" officially, I guess) and my laptop's screen. I was quite astonished that they had the same size! Of course, the values are slightly tuned so that the aspect ratio is precisely 4/3.

DisplaySize 260 195

Yep, that's 12.8" for ya! My laptop's screen is officially a 13" screen, so that's okay, but so much for the 15" of Compaq!

Here's a small Python blurb to check the value of your diagonal:
Code:
$ python
>>> d = lambda x,y: ((x**2+y**2)**0.5)/25.4
>>> d(260,195)
12.795275590551181
>>> d(320,235)
15.630714591421508
>>> d(370,270)
18.033043292281555


As you can see, we're quite far from the values which your monitors are supposed to have!

lars_msh: I suggest you use 320 240 (nice 4/3 value), this is what I use on mine. Also, note that there are not much more than 1200x900 physical "pixels" (let's say, groups of phosphor dots) on that screen (1260x940 if I remember correctly). I used to use a 1200x900@100Hz hand-made resolution, but have since switched to more standard values.
_________________
killed by a fire ant, while helpless
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