LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fonts - is there a size transition point? (https://www.linuxquestions.org/questions/linux-software-2/fonts-is-there-a-size-transition-point-693245/)

GTrax 12-27-2008 07:20 AM

Fonts - is there a size transition point?
 
Fonts in general can be a complicated business, so most times I tend to take the line of least resistance. I still have a font size issue.

My desktop is KDE, so I use Control Center -> Appearance and Themes -> Fonts to select the font and size.
My screen is 1600 x 1200. The true DPI (dots per inch)is 110.
The menu choices to adopt are 96 or 120. We just stay with the default 96.
The days when one had a option to get out a ruler, measure a presented line, and enter the answer seem to be long gone.

I notice that no matter which font I choose, adjusting the point size causes small incremental adjustments until we get to size 10. Increasing just one more point to 11 brings about a sudden large jump in size. From there, the increments become more well behaved again.

For me, 10 is too small, and 11 is suddenly very big. Is there anywhere a reasonably easy to understand explanation on how to set up fonts?:confused:

(What happens to fonts depending on which distro, which desktop, which app, etc. is maybe a separate area we can keep aside for the moment):study:

pixellany 12-27-2008 08:21 AM

Quote:

Is there anywhere a reasonably easy to understand explanation on how to set up fonts?
Not that I have found.....;)

I think computer fonts are one of the cases where a group of engineers go together and said: "Let's see how complicated we can make this."

The first thing to look at is **which** font you are changing---eg the one for a Window title bar, for content, etc. Next, look at the font settings for specific applications--some of which will override the global settings.

jlinkels 12-27-2008 08:56 AM

Good that someone else notices this as well. Although font management in KDE had made vast improvements over the past few years, especially where it comes to mixing with Gnome applications, it is not perfect.

As I am browsing this website (linuxquestions.org) in Opera, the font size and rendering is near perfect. But other web sites show either unreadable small or ugly large fonts. And in Mozilla it is completely different again. At the same time I have some applications where the fonts are simply too large and ugly. Sometimes when I start Windows2000 in a VM I look with jealousy at the pretty, small and uniform fonts. About the only thing Windows got right.

The size jump that you notice going from 10 pt to 11 pt is not typical, I see it going from 9 pt to 10 pt as well with some fonts. Sometimes the thickness of the characters seem to jump from vey thin to reasonable, sometimes the font shrinks, but the kerning stays the same, yes, there is some improvement to be made.

jlinkels

i92guboj 12-27-2008 09:28 AM

I don't have a solution, I only wanted to comment one thing.

Quote:

Originally Posted by jlinkels (Post 3388475)
As I am browsing this website (linuxquestions.org) in Opera, the font size and rendering is near perfect. But other web sites show either unreadable small or ugly large fonts. And in Mozilla it is completely different again.

Note that this has nothing to do with the font rendering of your desktop or your applications. This is done by the web rendering engine and there are other factors involved. Some web developers like to hardcode things in their css or html, some others know how to properly use relative sizes. Additionally the engine can use external renderers sometimes, there are too much factors involved. Yes, I think that people like to overcomplicate the things.

There should be a centralized way (and only one) to render ALL the fonts, without intermediaries. All the additional supports and capabilities should be plugged into there, so all the applications can be standardized.

I don't have a complain about the look of the fonts. But getting a uniform font scaling that works linux-wide is impossible nowadays.

GTrax 12-27-2008 11:01 AM

I would feel a bit guilty about having a full outright font rant polemic, because I could not begin to match the heroic efforts of those folk who gave us what we have now.

Even so - I do not think that having nice fonts should be conceded to be only the preserve of Windows.

We have to start with the video bandwidth that can be extracted from the graphics cards. When I compare how fast a font changing edge happens on a Linux KDE desktop to a similar font edge on Windows, it does seem the KDE is filtered somewhat. (using Nvidia and also nv). There is also significant white level noise on all nv driver output, not present with the proprietary drivers.

Next is Xorg. The list of fonts (with paths) seen in /etc/X11/xorg.conf is highly variable, and points to fonts used by Xorg (even though they might not all be present), and (sometimes) points also to places used by distros.
I am not even sure how (or if) they are ever used!

Then, there are fonts kept in places used only by distros, not all the same, and finally by applications. For example, in Firefox. You can tweak the fonts used in the main window, and even force the browser to use your fonts instead of the site choice. Beyond this, you can become skilled at meddling with the well-buried userchrome.css, to have readable menus and toolbars, apparently completely contrary to any desktop setting. Konqueror as a file browser goes its own way, even when in its home territory (KDE).

Probably we will not get this right until consistency is agreed (forced maybe?). It could be time to start "deprecating" some font setups.

jlinkels 12-27-2008 12:05 PM

Quote:

Originally Posted by GTrax (Post 3388557)
I would feel a bit guilty about having a full outright font rant polemic, because I could not begin to match the heroic efforts of those folk who gave us what we have now.

I fully agree with that.

Quote:

Originally Posted by GTrax (Post 3388557)
We have to start with the video bandwidth that can be extracted from the graphics cards. When I compare how fast a font changing edge happens on a Linux KDE desktop to a similar font edge on Windows, it does seem the KDE is filtered somewhat. (using Nvidia and also nv). There is also significant white level noise on all nv driver output, not present with the proprietary drivers.

Talking about video cards... I forgot to add that fonts change depending on video card and video driver. Using the vesa, nv or nvidia driver makes a whole lot of difference, even when using the same computer and the same KDE. That shouldn't be. I wonder why that is, pictures, icons and window attributes do not generally change. That is not logical of course.

I am not sure whether today's video cards put any restrictions on video bandwidth as far as it concerns fonts. I thought hardware development was far beyond that. Many of my desktop computers use legacy chips like 440MX, and I never saw those effects. But I installed the proprietary drivers. If the open-source drivers show noise, that might be a driver implementation problem.

jlinkels

tredegar 12-27-2008 12:15 PM

I am very happy with the fonts as rendered by KDE 3.5.10
They are much easier on the eyes than the Win fonts I see at work. I have anti-aliasing and sub-pixel hinting turned on, my graphics driver is NVIDIA.

I haven't noticed the font "size transition point" GTrax noticed.

GTrax 12-28-2008 05:52 AM

Quote:

Originally Posted by tredegar (Post 3388624)
I haven't noticed the font "size transition point" GTrax noticed.

This is good! tredegar uses KDE (via Kubuntu). Me, being a unrehabilitated distro-tart, I have enough installs on my "play with" partitions to explore a bit. I have carefully checked the font transition effect on several distros. I still have to compare KDE vs Gnome about this, but the one I am looking at now (Mepis Lenny 7.9.92 beta) shows this effect markedly. It also happens on PCLinuxOS "MiniMe" and PCLinuxOS 2007. I will be checking on 64Studio (Debian Etch Gnome), and Ubuntu Studio 8.05 to see if it is a KDE vs Gnome thing.

If the Kubuntu version has found the measure of it, the next step is to add a Kubuntu 8.05 to my playlist (OK, OK - I will evict at least one so long as Gentoo gets to stay!) :)

If we cannot tease this one out, at least I will maybe end up knowing a bit more about how to get the desktop to where I like it.

GTrax 12-28-2008 06:39 AM

I have some real data now :)

It is a relatively crude check, measuring the width of the stock phrase across the screen with a ruler as we change the font size.

In my case the system is using 96 DPI (dots per inch) setting on a monitor that delivers as 110 DPI when displaying 1600 x 1200.
Using KDE on Mepis (Lenny), I tried Control Center -> Appearance & Themes -> Fonts -> Adjust All Fonts. This is what we get..

Code:

The Quick Brown Fox Jumps Over The Lazy Dog

Font        (mm)    D(mm)        %Change
7        46                -
8        54        8        17.4
9        60        6        11.1
10        66        6        10.0
11        76        10        15.1
12        78        2        2.6
13        85        7        8.97
14        95        10        11.7

We could get down to pixels if we have to, and I should mention that the font in use was "Nimbus Sans L", but I think there is something going on in there few of us yet understand.

GTrax 12-29-2008 05:02 AM

Fonts - Size transition point SOLVED
 
Well - at the very least, apparently explained.

Fonts can come in very high quality bitmaps, each hand crafted for every point size, but inflexible. They are fast, because the bitmap is already available.

Other sorts known as "Outline" are scalable, with names like "Truetype" and "Type1", and "OpenType" all need rendering engine algorithms to generate the final bitmaps. The rules for driving the algorithms are kept in the font file itself. Amid quadratic and cubic math, the brave can tweak these numbers using readily available font tweak programs. More modifications to improve appearance include hinting, anti-aliasing, kerning, and scaling rules.

The key observation is that we end up with all the various font sizes at bitmap level. How big these appear on a screen then depends on the screen resolution DPI (dots per inch) for the display. Hence we select bigger point sizes (and fatter icons!) when we use higher resolution screens. Here also is where applications and desktops all start to disagree.

Unfortunately, the piece of code that attempts to adjust the X11 font specification contains a crude switch to force the font DPI. The effect is most dramatic if the screen DPI happens to be near to the boundaries.
Quote:

Unfortunately there is an entertaining bit of code in the dix/dixfonts.c, procedure GetClientResolutions:

/*
* XXX - we'll want this as long as bitmap instances are prevalent
* so that we can match them from scalable fonts
*/
if (res.x_resolution < 88)
res.x_resolution = 75;
else
res.x_resolution = 100;

It effect is to force the font DPI to either 75 or 100 depending on the screen resolution, if it has been specified as 0.
Too bad for those who have screens with a different DPI.
The full (excellent) article is here --> Linux fonts (mostly X11)

In digging this out, I have also links that include some good stuff about how to start rationalizing font usage in Linux. Google would find it for anybody, but I post them here hoping they will stay valid for long enough to be useful.
The starting out stuff --> A font primer for Linux
To reveal the fonts you have installed, and let you loose in configuration frenzy, there is -->fontconfig
From 2002, but still valid -->Font HOWTO
To mess with them yourself -->FontForge
I freely admit that messing with X11 code is beyond what I should wisely contemplate.


All times are GMT -5. The time now is 07:19 PM.