[HowTo] Turn On/Off Font Antaliasing

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#21 Post by Sit Heel Speak »

puppyite wrote:I’ve tried turning antialiasing off in Puppy and fonts look unacceptably jagged on all my CRT’s.

I note that in Ubuntu 8.04 Live in System, Preferences, Appearance, Fonts tab if I select Best Shapes it seems to help. When I say help I mean that this setting looks better than any of the other possible settings. I understand that Puppy and Ubuntu are apples and oranges by comparison but would it be possible to duplicate this setting in Puppy 4.2.1 and if so how would I accomplish this?
My bci-hinting PET for 4.21 works well. If regular (not retro) kernel, you want the puppy-k2.6.25.16-v1-xorg-421 PET. If retro, puppy-k2.6.21.7-v1-xorg-421-retro.

I was confused, above, because I was not yet aware (I learned, after tipped-off by this thread, and studied the issue) that the core cairo font-renderer and its dependencies are compiled differently in different Pup(pie)s. iguleder's simple method works better or my 2-megabytes-(expanded)-dotpet-package method works better, depending on how these were compiled.

Before you apply my PET package, please rename /root/.fonts.conf (if present) and then, after the PET is installed, look at my fonting awhile and then rename it back, and then tell us if adding iguleder's .fonts.conf to my own PET gives better results or not. I am still not clear on under what circumstances cairo+libXft+libfreetype looks at /root/.fonts.conf and when it looks at /etc/fonts/fonts.conf. I have observed that principle is not always followed in practice, i.e. the situation is not always correct-according-to-design, as iguleder describes the simple, clearcut way-it's-supposed-to-be above. Thanks.

puppyite

#22 Post by puppyite »

Sit Heel Speak,
I had hoped that someone might have a simpler fix, in hindsight I see that such is likely not possible. I wonder if it would be possible for me to take a rain check on installing your pet file without giving offense? I hope so.

I wonder if I might ask you if you have ever tried your solution with a CRT monitor and if so could you please tell me how much improvement you saw? I realize my question is about like asking if you like the same amount of salt on your food as I do but there it is. Doubtless the best way for me to know how much improvement if any there might be is if I saw it with my own eyes on my monitor but without installing the pet that's not possible. Thank you.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#23 Post by disciple »

Personally I consider SHS' method essential regardless of whether I have a CRT or LCD. It only makes well hinted fonts work well though - most Linux fonts look rubbish, and I presume the latest generation of Microsoft fonts (Calibri etc) do too, as they look rubbish on Windows if you manage to turn cleartype off... (these do almost look OK with Cleartype but no antialiasing).
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

puppyite

#24 Post by puppyite »

I don’t own an LCD and the only MS OS I have is WIN98SE where everything is aliased and there is no Cleartype. Maybe I’m ruined but I’m comfortable looking at Win98SE on a CRT, I’d like Puppy to look the same way. Sadly though when I turn off antialiasing in Puppy all fonts no matter what app I’m using look horribly jagged.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#25 Post by disciple »

Use SHS's method and Arial then :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#26 Post by Iguleder »

Win 98 has no font hinting at all, you just got used to it :)
By the way, Calibari, Segoe UI, all the Vista-era MS fonts are "ClearType fonts", they look horrible and complete unreadable without any antialiasing. Your best choice is Tahoma, it's a readable, nice font, that also looks great with hinting on.

Regarding the "all the Linux fonts look like crap" statement, that's not true. When a font is missing, the default system font or some random font is used, sometimes it's Courier or any other junky MS font. To solve the crappy fonts problem, all you have to do is install the basic X fonts, then MS fonts and apply hinting.

EDIT: try this solution to get nice fonts on Puppy - use the "off" code, with antialiasing ONLY set to "true".

Code: Select all

<match target="font">
 <edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
 <edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintnone</const>
</edit>
</match>

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#27 Post by Sit Heel Speak »

puppyite wrote:Sit Heel Speak,...I wonder if I might ask you if you have ever tried your solution with a CRT monitor and if so could you please tell me how much improvement you saw?
I use a 16" Dell CRT at 1280 x 1024 as my day-to-day main monitor. Here's a screenshot of this thread in 4.21 with my tweaks,

This is with iguleder's .fonts.conf not installed. Just my local.conf and fonts.conf installed in /etc/fonts, and bci-hinted libfreetype added, through my PET, and then the three easy after-install steps performed.

Edit --> Preferences --> Appearance --> Fonts is set to use DejaVu Sans as the default proportional font, and do not allow webpages to use their own fonts.

Turning to Win98SE on the IBM Thinkpad T21 immediately to my left, the fonts look a little silly to me.

However, iguleder's simple method works much better than my PET on Puppy 4.12 and on upup-466.

As I say, cairo is compiled differently in those, it already has very good hinting built-in, and addition of bci-hinted libfreetype ends up with the overall rendering-system applying hinting-and-antialiasing twice, which comes out looking terrible.

But on 4.21, on a reasonably decent CRT, I think you'll be happier with my PET.

puppyite

#28 Post by puppyite »

Iguleder wrote:Win 98 has no font hinting at all, you just got used to it :)
And the OS has no antialiasing. Yes, I am indeed ruined.
By the way, Calibari, Segoe UI, all the Vista-era MS fonts are "ClearType fonts", they look horrible and complete unreadable without any antialiasing. Your best choice is Tahoma, it's a readable, nice font, that also looks great with hinting on.

EDIT: try this solution to get nice fonts on Puppy - use the "off" code, with antialiasing ONLY set to "true".
In this composite screenshot: http://i29.tinypic.com/j11vlj.png the upper window is default Puppy and the bottom is antialiasing true (per your suggestion) in: .fonts.conf.

Note the difference in the document text of the two examples.

Note the difference in the fonts of the menu bar in the two examples.

I would like to have the document text rendering of the lower window and the menu bar rendering from the upper window. Likely I am asking for the impossible.

Edit: If you are unable to see a difference between the two menu bars then look at how Help lines up with the left edge of the Page Width button. The the miss-alignment is small but it does prove that there is a difference in rendering.
Last edited by puppyite on Mon 31 Aug 2009, 17:17, edited 2 times in total.

puppyite

#29 Post by puppyite »

SHS,
Thanks for the screenshot. After cleaning and donning my reading glasses I closely studied your screenshot. I found no difference between the text in the menu bar of your browser and that of mine. Web page fonts looked identical too.

I do not set Seamonkey to prevent web pages from using their own fonts. I wrote about that in a another thread: http://www.murga-linux.com/puppy/viewtopic.php?p=333087#333087 All my other Seamonkey Font settings are default.

Incidentally, you'd have more room for the address bar (or more buttons) if you turn off toolbar text in Seamonkey. If you turned it on for the screen shot or you just prefer it then ignore this.

What is: upup-466 (typo?) Just curious.

This may be a case of too much or too little salt:: "Turning to Win98SE on the IBM Thinkpad T21 immediately to my left, the fonts look a little silly to me." I'm not certain how to interpret "silly" as it relates to legibility, alaising, antialsing and or CRT vs LCD. Oh my, can I just send you my eyeballs and I'll have a look at all your PC's for myself?

I'm still procrastinating about installing your pet.. I have two identical PC built by me one of which still has a mostly virginal 4.2.1 install so in future I may decide to geek up and try it.

PS: Lest anyone think I'm some kind of super typist forget it, I composed my last two replies offline.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#30 Post by disciple »

Win 98 has no font hinting at all, you just got used to it
No, Win98 has bci hinting but no antialiasing. That's why the font rendering is good. IIRC you can get antialiasing if you install tweakui... but I don't know why you would do such a thing.
By the way, Calibari, Segoe UI, all the Vista-era MS fonts are "ClearType fonts", they look horrible and complete unreadable without any antialiasing.
They also look horrible and completely unreadable with normal (full pixel) antialiasing - you need sub-pixel rendering (Cleartype is Microsoft's trademark for sub-pixel antialiasing, although I think in their Cleartype tuner some of the options use full-pixel antialiasing). And of course you still need bci hinting as well.
Regarding the "all the Linux fonts look like crap" statement, that's not true.
Maybe not all, but certainly a lot of them. I think it is because they are designed for full-pixel antialiasing and are not well hinted, so they look bad when I have bci hinting enabled and no antialiasing. I am not talking about missing fonts.
EDIT: try this solution to get nice fonts on Puppy - use the "off" code, with antialiasing ONLY set to "true".
You can use that if you want, but my eyes can't stand it for more than half an hour or something.

Sit Heel Speak - I thought you used to disable antialiasing for small fonts like in that screenshot?
I disable it and always use well hinted fonts like Arial and Times New Roman. I find antialiasing offends my eyes unless the fonts are big enough to be thicker than two or three pixels...

I haven't tried your pet, but I'm using 4.1.1, which I thought is pretty much identical to 4.1.2, and I find the fonts awful until I install a bci hinted freetype... I have quite an old one - I wonder if that is the difference, or if there actually is something different between 4.1.1 and 4.1.2?
Attachments
fonts.png
My nice crisp (like Win98) fonts :)
(11.94 KiB) Downloaded 2172 times
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

puppyite

#31 Post by puppyite »

After experimentation here's what I've settled on for .fonts.conf:

Code: Select all

<match target="font">
 <edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
 <edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintnone</const>
</edit>
</match>
I can't see any difference between hintfull or hintnone but it does no harm either way. Antialise "true" is what makes a difference for me. I chose this not because it had anything to offer over the default antialising in Puppy but because of the profound effect it has on kearning in Abiword. Without this improvement I found it very difficult to compose in Abiword and as a result I had to keep turning on the Formatting Marks otherwise I couldn't tell where spaces should or should not be in my documents.

Thank you Iguleder, now I can use Abiword!

PS: I might try disciple's method but he didn't give enough information on exactly how he achives his result.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#32 Post by disciple »

IIRC "my" method is the same as SHS's method, except I wait for fonts to get bigger before turning on antialiasing, and I don't bother with all the weird dejavu fonts etc - I just use Arial for pretty much everything.

fonts.conf

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<!-- Modified version for Puppy Linux versions up through February 2008 by P.N. Courier a.k.a. -->
<!-- "SitHeelSpeak" or "Sit Heel Speak" on the Puppy Linux forums -->
<!-- SHS version 0.05 beta -->
<!-- Maintainer Keith Packard says not to edit this file, but I did. -->
<!-- Make a backup copy, in case this gets overwritten! -->
<!-- ...and, back up your original first! -->

<fontconfig>

<!-- Set dpi to match actual display reality as shown by Seamonkey/Mozilla -->
<!-- on my display this is 91, yours may vary -->
<match target="pattern">
   <edit name="dpi" mode="assign">
   <double>91</double></edit>
</match>


<!-- (maintainer Keith Packard says...)
   DO NOT EDIT THIS FILE.
   IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
   LOCAL CHANGES BELONG IN 'local.conf'.

   The intent of this standard configuration file is to be adequate for
   most environments.  If you have a reasonably normal environment and
   have found problems with this configuration, they are probably
   things that others will also want fixed.  Please submit any
   problems to the fontconfig bugzilla system located at fontconfig.org

   Note that the normal 'make install' procedure for fontconfig is to
   replace any existing fonts.conf file with the new version.  Place
   any local customizations in local.conf which this file references.

   Keith Packard
-->

<!-- Font subdirectories list for all Puppy Linuxes 1 and 2 up though 2.10 -->
<!-- Depending on whether it's Puppy 1 or 2, one or more of these subdirs may -->
<!-- not exist.  Doesn't matter, no harm will result. -->
<!-- Should work in Puppy 2.10 since /usr/X11R6 is a symlink to /usr/X11R7. -->
<!-- If not, add corresponding X11R7 subdirs -->
<dir>~/.fonts</dir>
<dir>/usr/share/fonts/default/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts/TTF</dir>
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/X11R6/lib/X11/fonts/misc</dir>

<!-- Font cache directory list -->

	<cachedir>/var/cache/fontconfig</cachedir>
	<cachedir>~/.fontconfig</cachedir>

<!-- Alternate-spellings section begins here. -->
<!-- Accept deprecated 'mono' alias, replacing it with 'monospace' -->
<match target="pattern">
   <test qual="any" name="family">
      <string>mono</string>
   </test>
   <edit name="family" mode="assign">
      <string>monospace</string>
   </edit>
</match>

<!-- Accept alternate 'sans serif' spelling, replacing it with 'sans-serif' -->
<match target="pattern">
   <test qual="any" name="family">
      <string>sans serif</string>
   </test>
   <edit name="family" mode="assign">
      <string>sans-serif</string>
   </edit>
</match>

<!-- Accept deprecated 'sans' alias, replacing it with 'sans-serif' -->
<match target="pattern">
   <test qual="any" name="family">
      <string>sans</string>
   </test>
   <edit name="family" mode="assign">
      <string>sans-serif</string>
   </edit>
</match>
<!-- Alternate-spellings section ends here. -->

<!-- The aliases list begins here. -->
<!-- Mark common families with their generic names as aliases -->
<!-- so we'll get something reasonable if only generic face, not family, is specified -->

<!-- Serif faces -->
<alias>
   <family>Times New Roman</family>
   <family>DejaVu Serif</family>
   <family>Gentium</family>
   <family>Bitstream Vera Serif</family>
   <family>URW Bookman L</family>
   <family>Nimbus Roman No9 L</family>
   <family>Century Schoolbook L</family>
   <family>New Century Schoolbook</family>
   <family>Georgia</family>
   <family>Times</family>
   <family>Luxi Serif</family>
   <family>Kochi Mincho</family>
   <family>AR PL SungtiL GB</family>
   <family>AR PL Mingti2L Big5</family>
   <family>Baekmuk Batang</family>         
   <default><family>serif</family></default>
</alias>

<!-- Sans-serif faces -->
<alias>
   <family>Arial</family>
   <family>DejaVu Sans</family>
   <family>Humnst777 BT</family>
   <family>Tahoma</family>
   <family>Verdana</family>
   <family>Lucida Sans Unicode</family>
   <family>URW Gothic L</family>
   <family>Trebuchet MS</family>
   <family>Helvetica</family>
   <family>Microsoft Sans Serif</family>
   <family>Nimbus Sans L</family>
   <family>Luxi Sans</family>
   <family>Bitstream Vera Sans</family>
   <family>Kochi Gothic</family>
   <family>AR PL KaitiM GB</family>
   <family>AR PL KaitiM Big5</family>
   <family>AR PL ZenKai Uni</family>
   <family>AR PL ZenKai Uni MBE</family>
   <family>Kai PC .TTF</family>
   <family>Baekmuk Dotum</family>
   <family>SimSun</family>
   <default><family>sans-serif</family></default>
</alias>

<!-- Monospace faces -->
<alias>
   <family>Courier New</family>
   <family>Andale Mono</family>
   <family>DejaVu Sans Mono</family>
   <family>Bitstream Vera Sans Mono</family>
   <family>Courier</family>
   <family>Luxi Mono</family>
   <family>Nimbus Mono L</family>
   <family>NSimSun</family>
   <family>Kochi Gothic</family>
   <family>AR PL KaitiM GB</family>
   <family>Baekmuk Dotum</family>
   <default><family>monospace</family></default>
</alias>

<!-- If a font is not in the above lists, consider it sans-serif -->
<match target="pattern">
   <test qual="all" name="family" compare="not_eq">
      <string>sans-serif</string>
   </test>
   <test qual="all" name="family" compare="not_eq">
      <string>serif</string>
   </test>
   <test qual="all" name="family" compare="not_eq">
      <string>monospace</string>
   </test>
   <edit name="family" mode="append_last">
      <string>sans-serif</string>
   </edit>
</match>

<!-- The aliases list ends here. -->

<!-- Asian font fixups begin here. -->   
<!--
  Some Asian fonts misadvertise themselves as monospaced when
  in fact they are dual-spaced (half and full).  This makes
  FreeType very confused as it forces all widths to match.
  Undo this magic by disabling the width forcing code -->
<match target="font">
   <test name="family"><string>GulimChe</string></test>
   <edit name="globaladvance"><bool>false</bool></edit>
</match>
   
<match target="font">
   <test name="family"><string>DotumChe</string></test>
   <edit name="globaladvance"><bool>false</bool></edit>
</match>

<match target="font">
   <test name="family"><string>BatangChe</string></test>
   <edit name="globaladvance"><bool>false</bool></edit>
</match>

<match target="font">
   <test name="family"><string>GungsuhChe</string></test>
   <edit name="globaladvance"><bool>false</bool></edit>
</match>
<!-- Asian font fixups end here. -->   

<!-- Bitstream Vera font fixups begin here. -->
<!--
   The Bitstream Vera fonts have GASP entries suggesting that hinting be
   disabled below 8 ppem, but FreeType ignores those, preferring to use
   the data found in the instructed hints.  The initial Vera release
   didn't include the right instructions in the 'prep' table. Fix this
   by disabling hinting manually at smaller sizes (< 8ppem)
 -->
   
<match target="font">
   <test name="family">
      <string>Bitstream Vera Sans</string>
   </test>
   <test name="pixelsize" compare="less">
      <double>7.5</double>
   </test>
   <edit name="hinting">
      <bool>false</bool>
   </edit>
</match>
   
<match target="font">
   <test name="family">
      <string>Bitstream Vera Serif</string>
   </test>
   <test name="pixelsize" compare="less">
      <double>7.5</double>
   </test>
   <edit name="hinting">
      <bool>false</bool>
   </edit>
</match>
   
<match target="font">
   <test name="family">
      <string>Bitstream Vera Sans Mono</string>
   </test>
   <test name="pixelsize" compare="less">
      <double>7.5</double>
   </test>
   <edit name="hinting">
      <bool>false</bool>
   </edit>
</match>
<!-- Bitstream Vera font fixups end here. -->
   
<!-- Load per-user customization file (not present in Puppy Linux) -->
<include ignore_missing="yes">~/.fonts.conf</include>

<!-- Load local system customization file -->
<include ignore_missing="yes">local.conf</include>

<!-- Keith Packard says here, -->
<!-- "Alias well known font names to available TrueType fonts" -->
<!-- ...but, I've commented these out because I LIKE fixed-width fonts... -->
<!-- ...at small sizes, that is.  I disallow them at larger sizes, in local.conf. -->
<!-- ...and, I have no problem with Arial. -->
   <alias>
      <family>DejaVu Sans</family>
      <accept><family>Arial</family></accept>
   </alias>
<!--    <alias>
      <family>Times</family>
      <accept><family>Times New Roman</family></accept>
   </alias>
   <alias>
      <family>Helvetica</family>
      <accept><family>Verdana</family></accept>
   </alias>

   <alias>
      <family>Arial</family>
      <accept><family>Verdana</family></accept>
   </alias>

   <alias>
      <family>Courier</family>
      <accept><family>Courier New</family></accept>
   </alias>
-->

   <alias>
      <family>Times</family>
      <accept><family>Times New Roman</family></accept>
   </alias>

<!--
 Keith Packard says, "Check user preference to avoid bitmap fonts and replace
 bitmap face names with equivalent scalable fonts"
 -->

<!-- no, I've commented this out; I do not know whether TrueType Helvetica -->
<!-- and Times are good or not -->
<!--   <match target="pattern">
           <test name="prefer_outline">
                   <bool>true</bool>
           </test>
           <test name="family">
                   <string>Helvetica</string>
           </test>
           <edit name="family" mode="prepend" binding="same">
                   <string>Arial</string>
           </edit>
   </match>
   
   <match target="pattern">
           <test name="prefer_outline">
                   <bool>true</bool>
           </test>
           <test name="family">
                   <string>Times</string>
           </test>
           <edit name="family" mode="prepend" binding="same">
                   <string>Times New Roman</string>
           </edit>
   </match>
-->

<!-- Preference list begins here. -->
<!-- This is the order in which fonts will be chosen when just -->
<!-- "serif," "sans-serif," or "monospace" is specified on the web page. -->
<!-- I believe it should match the "alias" lists, above, but am not sure. -->

<alias>
   <family>serif</family>
      <prefer>
         <family>Times New Roman</family>
         <family>DejaVu Serif</family>
         <family>Gentium</family>
         <family>Bitstream Vera Serif</family>
         <family>URW Bookman L</family>
         <family>Nimbus Roman No9 L</family>
         <family>Century Schoolbook L</family>
         <family>New Century Schoolbook</family>
         <family>Georgia</family>
         <family>Times</family>
         <family>Luxi Serif</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>Arial</family>
         <family>DejaVu Sans</family>
         <family>Humnst777 BT</family>
         <family>Tahoma</family>
         <family>Verdana</family>
         <family>Lucida Sans Unicode</family>
         <family>URW Gothic L</family>
         <family>Trebuchet MS</family>
         <family>Helvetica</family>
         <family>Microsoft Sans Serif</family>
         <family>Nimbus Sans L</family>
         <family>Luxi Sans</family>
         <family>Bitstream Vera Sans</family>
         <family>Kochi Gothic</family>
         <family>AR PL KaitiM GB</family>
         <family>AR PL KaitiM Big5</family>
         <family>AR PL ZenKai Uni</family>
         <family>AR PL ZenKai Uni MBE</family>
         <family>Kai PC .TTF</family>
         <family>Baekmuk Dotum</family>
         <family>SimSun</family>
      </prefer>
   </alias>

<alias>
   <family>monospace</family>
      <prefer>
         <family>Courier New</family>
         <family>Andale Mono</family>
         <family>DejaVu Sans Mono</family>
         <family>Bitstream Vera Sans Mono</family>
         <family>Courier</family>
           <family>Luxi Mono</family>
         <family>Nimbus Mono L</family>
         <family>NSimSun</family>
         <family>Kochi Gothic</family>
         <family>AR PL KaitiM GB</family>
         <family>Baekmuk Dotum</family>
      </prefer>
</alias>
<!-- Preference list ends here. -->

<!-- Artificial oblique (italic) for fonts without an italic or oblique version -->
<match target="font">
   <!-- check to see if the font is roman -->
   <test name="slant">
      <const>roman</const>
   </test>
   <!-- check to see if the pattern requested non-roman -->
   <test target="pattern" name="slant" compare="not_eq">
      <const>roman</const>
   </test>
   <!-- multiply the matrix to slant the font -->
   <edit name="matrix" mode="assign">
      <times>
         <name>matrix</name>
         <matrix><double>1</double><double>0.2</double>
            <double>0</double><double>1</double>
         </matrix>
      </times>
   </edit>
   <!-- pretend the font is oblique now -->
   <edit name="slant" mode="assign">
      <const>oblique</const>
   </edit>
</match>

<config>

<!--
  These are the default Unicode chars that are expected to be blank
  in fonts.  All other blank chars are assumed to be broken and
  won't appear in the resulting charsets
 -->
      <blank>
         <int>0x0020</int>   <!-- SPACE -->
         <int>0x00a0</int>   <!-- NO-BREAK SPACE -->
         <int>0x00ad</int>   <!-- SOFT HYPHEN -->
         <int>0x115f</int>   <!-- HANGUL CHOSEONG FILLER -->
         <int>0x1160</int>   <!-- HANGUL JUNGSEONG FILLER -->
         <int>0x1680</int>   <!-- OGHAM SPACE MARK -->
         <int>0x2000</int>   <!-- EN QUAD -->
         <int>0x2001</int>   <!-- EM QUAD -->
         <int>0x2002</int>   <!-- EN SPACE -->
         <int>0x2003</int>   <!-- EM SPACE -->
         <int>0x2004</int>   <!-- THREE-PER-EM SPACE -->
         <int>0x2005</int>   <!-- FOUR-PER-EM SPACE -->
         <int>0x2006</int>   <!-- SIX-PER-EM SPACE -->
         <int>0x2007</int>   <!-- FIGURE SPACE -->
         <int>0x2008</int>   <!-- PUNCTUATION SPACE -->
         <int>0x2009</int>   <!-- THIN SPACE -->
         <int>0x200a</int>   <!-- HAIR SPACE -->
         <int>0x200b</int>   <!-- ZERO WIDTH SPACE -->
         <int>0x200c</int>   <!-- ZERO WIDTH NON-JOINER -->
         <int>0x200d</int>   <!-- ZERO WIDTH JOINER -->
         <int>0x200e</int>   <!-- LEFT-TO-RIGHT MARK -->
         <int>0x200f</int>   <!-- RIGHT-TO-LEFT MARK -->
         <int>0x2028</int>   <!-- LINE SEPARATOR -->
         <int>0x2029</int>   <!-- PARAGRAPH SEPARATOR -->
         <int>0x202a</int>   <!-- LEFT-TO-RIGHT EMBEDDING -->
         <int>0x202b</int>   <!-- RIGHT-TO-LEFT EMBEDDING -->
         <int>0x202c</int>   <!-- POP DIRECTIONAL FORMATTING -->
         <int>0x202d</int>   <!-- LEFT-TO-RIGHT OVERRIDE -->
         <int>0x202e</int>   <!-- RIGHT-TO-LEFT OVERRIDE -->
         <int>0x202f</int>   <!-- NARROW NO-BREAK SPACE -->
         <int>0x205f</int>   <!-- MEDIUM MATHEMATICAL SPACE -->
         <int>0x2060</int>   <!-- WORD JOINER -->
         <int>0x2061</int>   <!-- FUNCTION APPLICATION -->
         <int>0x2062</int>   <!-- INVISIBLE TIMES -->
         <int>0x2063</int>   <!-- INVISIBLE SEPARATOR -->
         <int>0x206A</int>   <!-- INHIBIT SYMMETRIC SWAPPING -->
         <int>0x206B</int>   <!-- ACTIVATE SYMMETRIC SWAPPING -->
         <int>0x206C</int>   <!-- INHIBIT ARABIC FORM SHAPING -->
         <int>0x206D</int>   <!-- ACTIVATE ARABIC FORM SHAPING -->
         <int>0x206E</int>   <!-- NATIONAL DIGIT SHAPES -->
         <int>0x206F</int>   <!-- NOMINAL DIGIT SHAPES -->
         <int>0x3000</int>   <!-- IDEOGRAPHIC SPACE -->
         <int>0x3164</int>   <!-- HANGUL FILLER -->
         <int>0xfeff</int>   <!-- ZERO WIDTH NO-BREAK SPACE -->
         <int>0xffa0</int>   <!-- HALFWIDTH HANGUL FILLER -->
         <int>0xfff9</int>   <!-- INTERLINEAR ANNOTATION ANCHOR -->
         <int>0xfffa</int>   <!-- INTERLINEAR ANNOTATION SEPARATOR -->
         <int>0xfffb</int>   <!-- INTERLINEAR ANNOTATION TERMINATOR -->
      </blank>

<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
      <rescan>
         <int>30</int>
      </rescan>
   </config>

</fontconfig> 
local.conf

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<match target="font">
   <test qual="all" name="rgba">
   <const>unknown</const>
   </test>
   <edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>

<match target="font">
   <test name="pixelsize" compare="more"><double>10.5</double></test>
   <edit mode="assign" name="hinting" ><bool>true</bool></edit>
   <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
</match> 

 <match target="font" >
   <edit name="antialias"><bool>false</bool></edit>
   <edit name="rgba" mode="assign"><const>rgb</const></edit> 
 </match>

<match target="font">
   <test name="pixelsize" compare="more"><double>26</double></test>
   <edit name="antialias"><bool>true</bool></edit>
</match> 

<dir>/usr/local/share/fonts</dir>
</fontconfig>
I also changed the gtk font in ~/.gtkrc-2.0 to Arial or Helvetica, and changed the jwm font in /etc/xdg/templates/_root_.jwmrc (run fixmenus), and probably the default fonts my browsers use. Can't remember if in Puppy 4.x I still had to change that other setting to get Firefox and Thunderbird to use a proper font in their menus.
Also, I changed the menu font in Openoffice, and turned off antialiasing in its settings... I posted how to do the former a couple of years back :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

puppyite

#33 Post by puppyite »

disciple wrote:Also, I changed the menu font in Openoffice, and turned off antialiasing in its settings…
I’m using Abiword so on joy there because kearning is fubar (for document text) with antialiasing turned off in: .fonts.conf :( Thanks for the reply. :)

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#34 Post by DaveS »

puppyite wrote:After experimentation here's what I've settled on for .fonts.conf:

Code: Select all

<match target="font">
 <edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
 <edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintnone</const>
</edit>
</match>
.
I set up .fonts.conf as above, and the results aer astonishing! Everything is displaying smoother and a little smaller. Firefox is especially clear.
Thanks for such a simple fix. The daft thing is, I am running JWM, which I understood was set up by default!
Spup Frugal HD and USB
Root forever!

puppyite

#35 Post by puppyite »

DaveS,
You're welcome, I'm happy to help. Some thanks should go to Iguleder though because without his OP I wouldn't have a clue how to do this.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#36 Post by Sit Heel Speak »

Sorry not to get back to you all in a timely fashion; I've discovered the Linux Kernel Driver Database (LKDDb) Project and, since I'm an experienced database programmer, am quite excited about it, and have decided to devote a week or two of intense concentration to the quest to bring LKDDb's goodness into the Puppy universe. So, no time to answer questions here in the detail they deserve. I will only just briefly comment:

1. My current local.conf antialiases only at size 13 pixels and larger.

2. There is definitely a difference between with and without my PET on my own 16" CRT. Perhaps a screenshot does not adequately convey it, perhaps the detailed settings in the mtPaint screen capture code are degrading the image.

3. Menu items and webpage rendering are two separate issues--gtk renderer versus the renderer the browser was compiled to use. AbiWord rendering is still another issue. PDF rendering is yet another issue. I will look into these after through with my current projects.

4. Where bci hinting (or equivalent) is compiled into cairo (or its build-chain), iguleder's simple method is the correct one to use. Where not, my PET. I foresee that as the patents expire, cairo will by default, in bits and pieces, begin to get bci or equivalent hinting compiled-in by default (obviously, this is starting to happen already, otherwise iguleder's method would not work) and everyone will meanwhile start programming to the simple convention which was stated by iguleder above. And then, when everyone has finished converting their code over to the convention and is programming a hinting facility into cairo --the new, right way-- iguleder's method will render mine unnecessary and obsolete.

5. But for now, on Puppy 4.21, my PET still gives better results. At least, on my CRT.

6. upup-466 is a woof-built Puppy (woof alpha-(9?)) which draws its source from the Ubuntu repositories. My surmise is that Ubuntu has cairo (or some key dependency) already compiled with bci-or-equivalent hinting in it, therefore addition of a PET such as mine is gilding the lily, i.e. performs hinting and antialiasing on fonting which has already had these operations performed, and so the result looks awful. I surmise that Puppy 4.12, unlike newer Puppies to 4.21, was built using Ubuntu's cairo (and/or dependencies) which is why it behaves well with iguleder's method but not mine. Newer Puppies will behave more or less well with iguleder's method, and less or more well with mine, depending on to what extent cairo has better-or-worse-quality hinting compiled in. The more skillful and up-to-date-on-his-programming-conventions the cairo-programmer was, the better iguleder's method and the worse my method will work.

And now, periscope down, back to autoconfiguration-of-kernel-compile-time-switches land...
Last edited by Sit Heel Speak on Wed 02 Sep 2009, 06:26, edited 1 time in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#37 Post by disciple »

No. The screenshot I posted I took the day I posted it, running my 4.1.1 setup which uses an antique freetype package and the configuration files I posted in my last post.
I’m using Abiword so on joy there because kearning is fubar (for document text) with antialiasing turned off in: .fonts.conf Sad Thanks for the reply.
I don't have any kerning issues with Abiword, probably because I'm using Windows fonts like Arial and they are being rendered exactly the same as they would be in Win98. I do have another problem with fonts in Abiword - they are invisible some of the time. But I believe that is an Abiword bug. The only reason I mentioned Openoffice is because it has its own settings, separate from the system-wide freetype settings. This I believe is annoying - programs should obey the system settings by default. Not that anyone else seems to believe it.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#38 Post by DaveS »

Actually Disciple, I use Open Office all the time, and their anti-alias system aint that great :(
I too wish they could just use system defaults. Turning it off makes matters worse. On/Off/System Default would be a better menu option.
Spup Frugal HD and USB
Root forever!

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#39 Post by disciple »

Turning it off makes matters worse.
Only if you don't fix the rest of the problem.
Attachments
test.png
(8.24 KiB) Downloaded 1332 times
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#40 Post by DaveS »

disciple wrote:
Turning it off makes matters worse.
Only if you don't fix the rest of the problem.
Quite!
Spup Frugal HD and USB
Root forever!

Post Reply