LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Making non-antialiased fonts looks nice. (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/making-non-antialiased-fonts-looks-nice-257705/)

sys7em 01-28-2005 03:58 AM

Franklin ..thanks again man ...that really helped ... :)
Now mo OOo fonts look just great :) ..also I've managed to fix my firefox problem ... I had to upgrade all x11 packages to current (My distro is Slack 10) .... then sudden alll fonts went ugly again ...after that I had to do the same thing again (freetype 2 installation ....bla bla ) ...and voala ... No more ugly fonts for me ... thanks to you :)

This HOWTO is really helpful ...

See ya

Franklin 01-28-2005 05:45 AM

Quote:

I had to upgrade all x11 packages to current (My distro is Slack 10) .... then sudden alll fonts went ugly again ...after that I had to do the same thing again
Thanks for bringing that up. I had meant to make mention of that.

Depending on what Distro you use, the freetype libs will be either packaged seperately (as with Dropline-Gnome) or as part of a package (as with slackware stable or current, which packages it in the X11 packages IIRC). I you upgrade freetype, or the package that contains freetype, you will need to reinstall your enabled-freetype.

The good news is that in some (most?) cases you wont need to recompile freetype, just run make_install again from the source directory - provided you had the foresight to save it ;). Another choice is to not upgrade. This is of course much easier to do if freetype is packaged seperately as it is with Dropline.

Luckily, freetype is a rather quick compile.

jferrando 01-29-2005 08:33 PM

Config in Debian / Texting
 
I have successfully configured freetype+bytecode_interpreter it in Mandrake, but in Debian/Sarge I cannot get the bytecode interpreter working, though I see the TTF windows fonts.
It is stange, because OpenOffice displays the fonts perfect, but gnome apps cannot get these shart edges. Any idea?

jferrando 01-30-2005 01:52 PM

Solved in Debian !!!! (spend 10+ hours)
This is the good /etc/fonts/local.conf file. I somehow disabled the comment on the "freetype autohinter module" section, and got very ugly fonts!

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<include ignore_missing="yes">/var/lib/defoma/fontconfig.d/fonts.conf</include>
<!-- Uncomment below to enable bitmapped fonts -->
<!--
<dir>/usr/X11R6/lib/X11/fonts</dir>
-->
<match target="font">
<test qual="all" name="rgba">
<const>unknown</const>
</test>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
<!-- Uncomment below to enable the freetype autohinter module. If you uncomment it, you will not get freetype bytecode iinterpreted fonts -->
<!--
<match target="font">
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
-->
</fontconfig>

Franklin 01-30-2005 05:25 PM

Cool.

I have Debian Sid at work and had problems when I tried as well, but I have so little time to do anything outside of Windows (at work) that I never had a chance to figure out what was wrong. I know that depending where you download from (US or Non-US) Debian's freetype is either enabled or disabled. I wonder if my file is commented as well. I'll have to check it out tomorrow. I installed from a US site and freetype was disabled by default.

Steve

jimveta 02-02-2005 07:59 AM

First, thanks very much for your efforts and this how to! Do you have an idea of how much frustration this solves for MANY users?? :)

You know, this and the other very few sites mentioned that discuss this issue:
-> http://mysite.verizon.net/vze8992v
-> http://convexhull.com/mandrake_fonts.html
-> http://avi.alkalay.net/linux/docs/font-howto/Font.html (which is quite comprehensive IMHO; except that I personally disagree with the size at which they say AA should be enabled. They say 10pt, for me it's 14 pt)

really really should be a sticky or have a dedicated section in the Wiki :D

I say this because just about every other site/page concerned with fonts, such as the famous FDU howto, all takes the opposite approach--the anti-aliased way. The truetype bytecode interpreter was designed in the first place NOT to be used with anti-aliasing.

In other words, it is the only way so far to produce unaliased renderings from outline/scalable fonts without anti-aliasing. I say "unaliased" because the path or shape of the font onscreen is exactly like how the font--specifically the embedded bytecode program--meant it to be. Simply disabling anti-aliasing for fonts under a certain size, like most of the advice given elsewhere, always produces aliased renderings for the standard *nix configuration without all this extra work.

<RANT>If the following two pics don't make folks hate the eye straining, headache inducing, space wasting AA like I do, then the only reason I can think of is that they must be using pretty large fonts so this whole issue won't matter much, if any, to them anyways.

It's a little ironic that Apple holds the TT bytecode patent because it doesn't seem to be used with OSX (if it is, then it's wasted with anti-aliasing). In fact I've read the blog of a freetype programmer commenting on how bad anti-aliased fonts look on a low res (1024x768) Apple laptop (well, that's another downside to anti-aliasing: it looks even worse with lower resolution as the smoothing/blurring/gradient artifacts become more obvious--you can easily see for yourself at 1024x768 or less)</RANT>
(..sorry about that, had to get it off my chest.. )

KDE control center pics from http://avi.alkalay.net/linux/docs/font-howto/Font.html

anti-aliasing, the "popular" Bitstream Vera:
http://avi.alkalay.net/linux/docs/fo...to/vera8aa.png

anti-anti-aliasing, MS style:
http://avi.alkalay.net/linux/docs/font-howto/kde.png

====================================================

P.S. The other thing I should mention is that the other way to get sharp small fonts is to use bitmap fonts. Type 1 fonts for example, allow for a bitmap part and a outline part (specified in postscript). the bitmap part is meant for screen display and the outline part is meant for printing. Real Adobe fonts like their Helvetica, Times and Courier, and certain MS fonts I believe (like Gothic) have embedded bitmaps.

However if I understand correctly, by default fontconfig will use the outline part for screen display. This is not the case though in Suse (at the professional version). You can get nice sharp--though limited--fonts simply by switching to "Adobe" everything. If not but your /etc/fonts/fonts.conf or /etc/fonts/local.conf already has the necessary code to switch to bitmap for certain fonts, and is simply awaiting the "prefer_bitmap" variable, change in your $HOME/.fonts.conf or /etc/fonts/fonts.conf or /etc/fonts/local.conf :
Code:

  <match target="pattern">
        <edit name="prefer_bitmap">
                <bool>true</bool>
        </edit>
  </match>


Franklin 02-02-2005 08:46 AM

Jimvetta,

After reading your post it occurrs to me that I may need to create a REAL howto page as opposed to this forum thread linking to my screenshot page.

I really had no idea whether or not there was a large enough group of linux users who would prefer this type of font rendering to the antialiased look.

It seems that there is enough interest for me to do so.
It also seems that my method seems to work well enough for a majority of users/distros to make it more of a help than a hinderance.

Steve

Franklin 02-02-2005 08:50 AM

Quote:

Real Adobe fonts like their Helvetica, Times and Courier, and certain MS fonts I believe (like Gothic) have embedded bitmaps.
I have meant to play with this as I have PageMaker on my windows partition and thus have access to some high quality type1 fonts.

Very involved this font business - makes your head hurt at times.

jinacio 02-07-2005 05:10 AM

Quote:

Originally posted by Franklin
Jimvetta,

After reading your post it occurrs to me that I may need to create a REAL howto page as opposed to this forum thread linking to my screenshot page.

I really had no idea whether or not there was a large enough group of linux users who would prefer this type of font rendering to the antialiased look.

It seems that there is enough interest for me to do so.
It also seems that my method seems to work well enough for a majority of users/distros to make it more of a help than a hinderance.

Steve


I hope you have the time to do a nice one :)

... i'm getting very tired of the fonts in mozilla (specially the big & thick 'bold' ones :o)


Cheers,
Joao Inacio

sys7em 02-09-2005 07:39 AM

Hey Franklin,

How's it goin' with the HOWTO thing ... I hope you write a nice one ...because I'm looking for such HOWTO for a long time .... And at last I have nice fonts in my browsers ...anyway ...I would really like to see this HOWTO done ... and also if I can help about something ...contact me via e-mail or icq ....


cheers mate :)

KimVette 02-09-2005 08:33 AM

fwiw you can solve font size/DPI issues by configuring your DisplaySize correctly. Either look up the specs for your monitor or simply measure the X and Y size in mm, and put it in your XF86Config file like so:

Code:

Section "Monitor"
  Option      "CalcAlgorithm" "CheckDesktopGeometry"
  DisplaySize  410 308
  HorizSync    31-112
  Identifier  "Monitor[0]"
  ModelName    "1920X1440@75HZ"
  Option      "DPMS"
  VendorName  "--> VESA"
  VertRefresh  50-75
  UseModes    "Modes[0]"
EndSection

Not only will this make typefaces/fonts display in a reasonable scale on the screen, but WYSIWYG will really be WYSIWYG in layout and word processing programs. :)

Tuvok 02-09-2005 03:38 PM

This was quite very useful. Thanks.

Screenshot

jinacio 02-11-2005 11:17 AM

Still no luck :'(

- I've compiled and installed freetype (checked the files in /usr/lib)
- Set dpi to 96 in gnome (also DisplaySize in xorg.conf)
- Tried different fonts / font sizes (8/9 , i'm using 1024x768)
- modified fonts config.

fonts look really ugly with no aa, and they look a bit better with hintint...

am i missing something important here?

any help is apreciated.

btw: i'm using ubuntu (hoary)

Cheers,
Joao Inacio

Franklin 02-11-2005 12:36 PM

Regretfully, jinacio, I am unable to tell you what you may have done wrong or if indeed you did do anything wrong at all.

I don't use Ubuntu, but IIRC this is a Debian-based distro based on Gnome. I have tried Debian briefly and found that I had difficulty getting it to behave regarding this procedure. I did not spend enough time with it to figure out why and quickly returned to slackware. Perhaps your difficulties with Ubuntu are related to the issues I had with Debian. Someone got it to work though, so there is hope.

Distro specific issues asside, the main reasons for freetype2 recompiling NOT working are:

1. You did not uncomment the line in the config file related to the bytecode interpreter prior to compiling.

2. Your compile failed and you did not realize it and you actually did not install anything.

3. The --prefix=/usr was used when it should not have been or vice-versa and your old libs were not overwritten.

4. The simlinks are still pointing to the old libs.

5. Any number of other issues ;)

This is and will continue to be an issue in linux. Different distros put things in different places. This makes a single process working across all platforms as much finger-crossing as anything. I can only say for certain what worked for me. My best advice to you is to keep trying - you'll learn alot in the process. And, if you DO get it to work, post how you did it - that is what the linux community is all about.

I was as specific as I could be in my initial directions. There is nothing else I can really add. Re-read my directions and double check what you did. The size/resolution stuff is really window dressing. If the fonts are ugly still, you are having a problem with freetype2. That is where I would concentrate my efforts.

Another thing about Debian and possibly Debian based distros such as Ubutu -

I have heard that if you use an apt repository that is NON-US when you install, then you will get a freetype deb package installed that is allready compiled with the bytecode interpreter enabled. This is my understanding. I am sure someone will correct me if I am wrong. ;)

Good luck.

jinacio 02-11-2005 01:38 PM

Thanks

i got freetype compiled after a couple tries (heh, forgot the prefix at first :/), checked the links and they point to the new one one...

still, i will keep trying and experimenting (don't have much time with my linux box ATM :( ) and if i have any (more?) positive results i'll post here.

who knows, maybe i missed something simple...


Cheers,
Joao Inacio


All times are GMT -5. The time now is 02:33 AM.