Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
One more time with ugly fonts.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Sep 25, 2005 8:40 pm    Post subject: One more time with ugly fonts. Reply with quote

I'm getting tired of playing games with X.org. I cannot seem to turn on the autohinter. It was working and now it's not. I've tried recompiling freetype both manually (with and without the bytecode interpreter and unpatended autohinter) and using portage with and without the bindist flag. No changes. I have tried turning autohinting on and off in /etc/fonts/local.conf. No changes. I tried doing the same with ~/.fonts.conf. No changes. I did the same stuff earlier to try to turn it off to see if it would help my fonts and it didn't work then either. Recompiling the X server somehow made it switch off, but now it won't switch back on again. This is yet another example of random and inexplicable behavior that is common with trying to configure and maintain an X server. Yet many people will say that this is easier and more logical (!) than Windows. Apparently, the last Windows these people used was Windows 2.0.

In any case, I have followed the X.org and Fonts wiki entry about 20 times. Turning on medium hinting makes fonts uglier than without it, but in either case, the fonts are just plain ugly. Take a look at a current snapshot of a webpage in Konqueror and a Konsole session (without medium hinting):

http://www.unc.edu/~feiner/konqueror-ugly.png
http://www.unc.edu/~feiner/konsole1-ugly.png

I turn on medium hinting and Konqueror looks slightly better, but Konsole looks absolutely awful:

http://www.unc.edu/~feiner/konqueror2-ugly.png
http://www.unc.edu/~feiner/konsole2-ugly.png

I'm really at my wit's end. Does everybody else have ugly fonts? I've seen screenshots of people's Linux desktops without ugly fonts, so I assume it is possible. But I've tried pretty much everything and the best I can get is some compromise that isn't unbearable, but isn't great either.
Back to top
View user's profile Send private message
troinfo
n00b
n00b


Joined: 02 May 2003
Posts: 72
Location: New York

PostPosted: Sun Sep 25, 2005 9:18 pm    Post subject: Reply with quote

Try this:

Goto Control Panel -> Appearance & Themes -> Fonts

Put in these values:

General: Arial 12
Fixed width Courier New 10
Toolbar: Arial 12
Menu: Arial 12
Window title: 12
Taskbar: Arial 11
Deskktop: helvetica 12

Put an "X" in the checkbox for anti-aliasing of fonts

For your browser if your are using Firefox set mimimum font size to 10 or 12

and use helvetica for the ones you can and serif for the one you can use helvetica.

Hope this helps

troinfo
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Sep 25, 2005 9:29 pm    Post subject: Reply with quote

I have DPI set to 96 so Arial 12 is huge. But Arial is worse than Bitstream Vera Sans, which is now the only tolerable font.

Anti-aliasing is obviously enabled, as is sub-pixel rendering (though sub-pixel rendering seems to make no difference whatsoever).

Here's another screenshot showing how absolutely ugly some of the fonts are: www.unc.edu/~feiner/konqueror3-ugly.png

That's unnacceptable.
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Sun Sep 25, 2005 9:50 pm    Post subject: Reply with quote

WTF? Unhinted looks absolutely spot on.

I know this post isn't much use to you but to call that ugly is out of line! OS X uses unhinted fonts and they look swell.

Reason being is that they retain their vector shapes, as opposed to being distorted to snap to pixels.
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Sep 25, 2005 9:58 pm    Post subject: Reply with quote

southsider wrote:
WTF? Unhinted looks absolutely spot on.

I know this post isn't much use to you but to call that ugly is out of line! OS X uses unhinted fonts and they look swell.

Reason being is that they retain their vector shapes, as opposed to being distorted to snap to pixels.

Firstly, please don't honestly tell me that the most recent screenshot I posted has nice fonts in it. If you have a CRT, they might actually look okay, but on my LCD they are completely unacceptable and terribly distorted.

Secondly, okay, there's two things going on here. There's hinting, which is enabled in the KDE control center and varies from "none" to "full" (with "slight" and "medium" in between). I turned that to "none" because hinting is, like you said, ugly. However, there seems to be another type of hinting, I think, or some other feature whose name I don't know, that is also controlling how the fonts look. With it off (or on, I don't know which) I get the ugly fonts I have now with distorted glyphs and slightly poorer kerning. With it on, the glyphs aren't as distorted and the only problem is gray splotches on certain glyphs which is tolerable with the right DPI and font faces and sizes. I can't seem to switch this on or off, but rather, it likes to switch itself on or off randomly related to upgrading X or the font system. I have tried compiling freetype with and without the bindist use flag, but it seems to have no effect. I'm really at a loss for how to turn it on.
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Sun Sep 25, 2005 11:07 pm    Post subject: Reply with quote

I use an iiyama LCD panel with a gamma curve of ~1.8. Dunno if you might want to adjust your curve to see if it makes it look any nicer. I know if you use something darker they tend to look more blotchy.
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Sun Sep 25, 2005 11:08 pm    Post subject: Reply with quote

PS it genuinely looks fine to me I'm not just trying to wind you up :( Maybe try looking at the screenshot on a different monitor?

Do you want to highlight something that looks particularly "ugly"? Any specific characters or pairs of characters in your screenshots?
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Sep 25, 2005 11:27 pm    Post subject: Reply with quote

southsider wrote:
PS it genuinely looks fine to me I'm not just trying to wind you up :( Maybe try looking at the screenshot on a different monitor?

Do you want to highlight something that looks particularly "ugly"? Any specific characters or pairs of characters in your screenshots?

Alas, I don't have another monitor to look at it on right now.

Anyways, look at the "Al" in "Always" (in the monospace font of the konqueror3-ugly.png image), for example. Some of the stems are too wide while others are too thin. It's inconsistent. There are also jaggies on some of the slanted stems. Some of the curves are thinner than the others. The 'o' for example is pretty thin, but the curves on the 'a' glyphs are thicker. Also, the fonts in general look a little bit too grainy.

I know it can look a little better because before I started twiddling with my xorg install, they did look nice. Now they don't.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Sep 26, 2005 6:01 am    Post subject: Reply with quote

I use Gnome rather than KDE, but these tips should work...

Try switching the font rendering to "monochrome" (i.e. absolutely raw), to see how horrendous it looks, and then switch back to sub-pixel rendering. That in itself might cure the problem with sub-pixel rendering apparently never turning itself on - you should see a difference with rainbow-ish colours along some of the font edges, if you look carefully.

Switch to "medium" or "slight" hinting - "full" hinting adds a bit too much distortion.

Small fonts will never look as smooth as large fonts - what looks bad at <= 10pt may look fine at >= 12pt. Can you switch to bitmap fonts after they go below a certain size?

A lot depends on the quality of the fonts you use. You should see an improvement if you copy *.ttf from c:\windows\fonts in your Windows partition, into /usr/share/fonts/TTF, then restart X - or at least "emerge corefonts". There are lots of free font packs available on the Internet. Run "emerge -s fonts" to see others available.

emerge fontconfig, and see if it changes any of your configuration files in /etc/fonts/

Use a font viewing program (e.g. nautilus in Gnome), and delete the fonts that look terrible.
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Mon Sep 26, 2005 10:57 am    Post subject: Reply with quote

I tried resetting sub-pixel rendering, but it didn't make a damn difference. There are all these knobs available with the fonts and none of them, save setting hinting to something other than "none", seem to do anything at all. Something must be blocking them from doing anything, but I can't seem to find what it is.

Also, what you guys aren't getting is that the fonts did look okay until I had my little fiasco with building my own X server and then reinstalling the one in portage. Somehow, that turned off the niceness (not that the fonts were perfect either).
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Sep 26, 2005 11:05 am    Post subject: Reply with quote

Try creating a new user temporarily, and logging into KDE as that user. Perhaps it's some file in your own local ~/ KDE setup that's messed up.
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Mon Sep 26, 2005 11:42 am    Post subject: Reply with quote

I created a new user. No changes. Subpixel rendering seems to not want to work at all. I noticed it's no longer working on the KDM login screen like it was before. So it's messed up somewhere higher up the chain of configuration files.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Sep 26, 2005 11:51 am    Post subject: Reply with quote

Have you tried to re-emerge fontconfig?
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Mon Sep 26, 2005 12:19 pm    Post subject: Reply with quote

Okay, just reemerged fontconfig, even upgraded it to the latest version (now ~x86). No change whatsoever.

I'm beginning to think this just isn't fixable.
Back to top
View user's profile Send private message
Karim
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 218

PostPosted: Mon Sep 26, 2005 5:01 pm    Post subject: Reply with quote

I switched from crt to a Sony lcd recently, and I am disapointed at the font rendering. The kerning is awful sometimes.
Arial and Verdana looks to be the best bet.
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Tue Sep 27, 2005 12:08 am    Post subject: Reply with quote

Karim wrote:
I switched from crt to a Sony lcd recently, and I am disapointed at the font rendering. The kerning is awful sometimes.
Arial and Verdana looks to be the best bet.

Fact is, Linux fonts suck, especially with LCD. With CRT, you can make them tolerable.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Sep 27, 2005 1:27 am    Post subject: Reply with quote

widremann wrote:
Fact is, Linux fonts suck, especially with LCD. With CRT, you can make them tolerable.

Allow me to completely disagree with you. I've had beautiful fonts in Gnome, with an LCD, for a couple of years. Just read the wiki and experiment with the XML options in your ~/.fonts.conf, and find a font which you finally like, out of the thousands available. For example, "Arial" is just a style of font, and you will find dozens of Arial fonts which are all hinted slightly differently.

Sans-serif fonts will always look better than serif ones (e.g. Times Roman) at the lower sizes, because elegant curves can only be mapped approximately onto a limited number of square pixels. LCD monitors have the advantage of sub-pixel rendering ("Cleartype") to fill in the gaps, whereas (probably low-quality) CRT monitors can bleed the pixels together to create a softening effect.

Note that the XML options allow you to vary the effects by font size. Personal tastes and monitors vary. The type of the monitor cable (analogue vs digital) can have a very noticeable effect on the sharpness of the image.
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Tue Sep 27, 2005 1:37 am    Post subject: Reply with quote

PaulBredbury wrote:
widremann wrote:
Fact is, Linux fonts suck, especially with LCD. With CRT, you can make them tolerable.

Allow me to completely disagree with you. I've had beautiful fonts in Gnome, with an LCD, for a couple of years. Just read the wiki and experiment with the XML options in your ~/.fonts.conf, and find a font which you finally like, out of the thousands available. For example, "Arial" is just a style of font, and you will find dozens of Arial fonts which are all hinted slightly differently.

Sans-serif fonts will always look better than serif ones (e.g. Times Roman) at the lower sizes, because elegant curves can only be mapped approximately onto a limited number of square pixels. LCD monitors have the advantage of sub-pixel rendering ("Cleartype") to fill in the gaps, whereas (probably low-quality) CRT monitors can bleed the pixels together to create a softening effect.

Note that the XML options allow you to vary the effects by font size. Personal tastes and monitors vary. The type of the monitor cable (analogue vs digital) can have a very noticeable effect on the sharpness of the image.

I've read through the wiki dozens of times. I've changed the order that my fonts are loaded in xorg.conf, I've turned on and off every font feature that I have found either through the wiki or through Google. I've tried dozens of fonts at different sizes, with different screen DPIs and different levels of hinting. All of them are varying levels of much worse than Windows. I finally got something that was tolerable about a month or so ago, but now, just like is usual with X, the fonts started looking ugly again when I reemerged X and nothing in any of the configuration files seems to want to change that. I'm pretty sure sub-pixel rendering isn't on, but I can't seem to turn it on, no matter how many config files I edit telling it to be on.

I give up.
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Thu Sep 29, 2005 10:18 pm    Post subject: Reply with quote

OK here's the lowdown:

If you look at Tahoma in Windows, for example, 8pt @ 96dpi, you will notice it looks nothing like Tahoma at 16pt. This is hinting in effect making the font look sharper to snap it to pixels. But you already knew that.

Now the algorithms for doing that are apparently patented AFAIK, so your font system probably doesn't hint the fonts the same way. Try looking at Tahoma size 8pt and compare it.

Personally, once I got used to unhinted fonts and went back to Windows for a look, I really just wanted to turn it off there too.

Sounds like you are just too used to Windows fonts! :P
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Fri Sep 30, 2005 12:05 am    Post subject: Reply with quote

southsider wrote:
OK here's the lowdown:

If you look at Tahoma in Windows, for example, 8pt @ 96dpi, you will notice it looks nothing like Tahoma at 16pt. This is hinting in effect making the font look sharper to snap it to pixels. But you already knew that.

Now the algorithms for doing that are apparently patented AFAIK, so your font system probably doesn't hint the fonts the same way. Try looking at Tahoma size 8pt and compare it.

Personally, once I got used to unhinted fonts and went back to Windows for a look, I really just wanted to turn it off there too.

Sounds like you are just too used to Windows fonts! :P

On LCD, Windows is better.

In any case, the real problem right now is that I did have the fonts looking semi-nice, then I built and installed a snapshort X.org server and then, after determining I didn't really think it made a difference, I reemerged the Gentoo X server. But the merge failed. So I installed some Redhat RPMS and it was fine. Then I uninstalled those and reemerged the Gentoo X server. This time the merge worked, but when I started X, my fonts were uglier and grainier. It's like subpixel hinting won't come on anymore or something. That's the problem I'm trying to solve. My Konsole font (Luxi Mono) for example, looks absolutely awful, with misshapen glyphs and gray smudges and general ugliness, whereas before, it actually looked nice. Not as nice as when I had Fedora (Fedora has really nice fonts, better than Windows in my opinion, but I have not been able to replicate them on Gentoo).
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Fri Sep 30, 2005 6:53 pm    Post subject: Reply with quote

OK, post your /etc/fonts/fonts.conf, /etc/fonts/local.conf

And get rid of your ~/.fonts.conf.

And for the record, if you look in fonts.conf you will see that under the "alias" elements you can see the top answers are the "Bitstream Vera" family. On RedHat they are "Luxi" instead. This file maps "Sans", "Serif" and "Monospace" to real fonts. Bear in mind you should edit "local.conf" with these overrides if you want to keep your changes saved across config merges.

Alex
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Fri Sep 30, 2005 7:02 pm    Post subject: Reply with quote

Example local.conf file with Luxi defaults:

(mine forces RGB (subpixel) anti-aliasing and disables hinting systemwide here, the settings in Gnome/KDE don't do anything)

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>
   <match target="font">
      <edit name="rgba" mode="assign"><const>rgb</const></edit>
      <edit name="antialias" mode="assign"><bool>true</bool></edit>
      <edit name="autohint" mode="assign"><bool>false</bool></edit>
      <edit name="hinting" mode="assign"><bool>false</bool></edit>
   </match>
<!--
  Provide required aliases for standard names
-->
   <alias>
      <family>serif</family>
      <prefer>
         <family>Luxi Serif</family>
         <family>Bitstream Vera Serif</family>
         <family>Times New Roman</family>
         <family>Nimbus Roman No9 L</family>
         <family>Times</family>
         <family>Kochi Mincho</family>
         <family>AR PL SungtiL GB</family>
         <family>AR PL Mingti2L Big5</family>
         <family>Baekmuk Batang</family>         
      </prefer>
   </alias>
   <alias>
      <family>sans-serif</family>
      <prefer>
         <family>Luxi Sans</family>
         <family>Bitstream Vera Sans</family>
         <family>Verdana</family>
         <family>Nimbus Sans L</family>
         <family>Arial</family>
         <family>Helvetica</family>
         <family>Kochi Gothic</family>
         <family>AR PL KaitiM GB</family>
         <family>AR PL KaitiM Big5</family>
         <family>Baekmuk Dotum</family>
         <family>SimSun</family>
      </prefer>
   </alias>
   <alias>
      <family>monospace</family>
      <prefer>
         <family>Luxi Mono</family>
         <family>Bitstream Vera Sans Mono</family>
         <family>Andale Mono</family>
         <family>Courier New</family>
         <family>Nimbus Mono L</family>
         <family>Kochi Gothic</family>
         <family>AR PL KaitiM GB</family>
         <family>Baekmuk Dotum</family>
      </prefer>
   </alias>
</fontconfig>


Enjoy!
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Fri Sep 30, 2005 7:16 pm    Post subject: Reply with quote

And some pics.

Hinted Luxi with RGB anti-aliasing:
http://homepage.ntlworld.com/janice.jones3/pics/hinted%20luxi.png

Unhinted Luxi with RGB anti-aliasing:
http://homepage.ntlworld.com/janice.jones3/pics/unhinted%20luxi.png

I use the second, because the hinted fonts look distorted and blotchy.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Sep 30, 2005 7:28 pm    Post subject: Reply with quote

Thanks for those pics. But - aren't "hinted" and "unhinted" the wrong way around?
Back to top
View user's profile Send private message
southsider
Guru
Guru


Joined: 05 Jul 2004
Posts: 358

PostPosted: Fri Sep 30, 2005 7:31 pm    Post subject: Reply with quote

Nope.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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