FontConfig

Differences between revisions 10 and 11
Revision 10 as of 2006-02-14 17:49:17
Size: 7314
Editor: 12
Comment: Added idea about implementation to scope section
Revision 11 as of 2006-02-14 18:16:04
Size: 8188
Editor: 12
Comment: Added Rationale and Use cases
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
Usually CJK users make their own font configurations into ~/.fonts.conf in order for them to see best looking quality of ttf fonts, it's due to lack of supporting by fontconfig and up to breezy we don't have any method to simplify this process for CJK users.
 
Line 24: Line 25:
 *  * Chulsoo installed ttf-alee package without ubuntu-desktop package and found fonts look fuzzy and not mached with his English font while web browsing, so asked Linux forum about font configuration, finally got best looking font configurations. But it was not simple way to set it up because he didn't know meaning of xml tags and values.
 * Joe wants to learn Chinese and he is happy with ubuntu-desktop because it already have chinese fonts, but he is not satisfied with displaying quality and his Chinese classmate talks to him it should not be. Problem here he doesn't know how to improve quality of looking.

Summary

This sub specification aims at improving Font configuration for CJK support in Ubuntu.

Rationale

Usually CJK users make their own font configurations into ~/.fonts.conf in order for them to see best looking quality of ttf fonts, it's due to lack of supporting by fontconfig and up to breezy we don't have any method to simplify this process for CJK users.

Use cases

  • Chulsoo installed ttf-alee package without ubuntu-desktop package and found fonts look fuzzy and not mached with his English font while web browsing, so asked Linux forum about font configuration, finally got best looking font configurations. But it was not simple way to set it up because he didn't know meaning of xml tags and values.
  • Joe wants to learn Chinese and he is happy with ubuntu-desktop because it already have chinese fonts, but he is not satisfied with displaying quality and his Chinese classmate talks to him it should not be. Problem here he doesn't know how to improve quality of looking.

Scope

  • CJK fonts need to beautify by adding and/or changing font.conf, gather ideas how to implement.
    • by fontconfig :
      • pros : permanent solution, only one package impact
      • cons : hard to maintain for modifications, impact for all languages
    • by language-pack-xx (or language-pack-xx-base or language-support-xx) :
      • pros : easy to apply modifications to one language package
      • cons : need to install multiple language-packs if someone wants to install multi-language fonts?
    • by ttf font package :
      • pros : easy to maintain configuration since it's author knows very best configuration
      • cons : ubuntu-desktop (and kubuntu-desktop) depends on all ttf fonts available so may impact all languages
    • or by something else :
      • users can use ubuntu/kubuntu desktop without desktop package, means they can install ttf font packages with their need and make their own configurations, this is usually what CJK users doing and it's sometimes difficult for novice users. In this case, configurations with ttf font packages or new method is required to simplify to set ~/.fonts.conf (or into conf.d)up.
      • pros :
      • cons :
  • how to make numbering configurations in conf.d?
  • which ttf packages need to beautify?

Design

1. Provide fonts.conf for CJK users to see beautifized fonts without efforts for their own settings.

  • You can also use fontforge to open and explore the ttf files and determine whether or not they carry embedded bitmaps, and at what sizes.

    • There is also another way to enable embedded bitmap globally without the need to match certain range of font size over a particular font name. It is to patch the fontconfig and libXft package directly, here are the patches:
    • With these patches, a new fontconfig parameter called embeddedbitmap can be turned on, which will manage the process globally and only target the font with embedded bitmaps. This is better than the antialias parameter because antialias will turn off anti-aliasing even at those font sizes that are without embedded bitmaps. And that's the reason we need to limit it to certain range as we have been doing now.

    • I haven't been following the upstream discussions so I am not sure why these two patches were rejected. Maybe we can try to push it through the LaunchPad again.

      • ["BetterCJKSupportSpecification"] shows this
        • - update fontconfig with 2.3.92+cvs20051129 : Enable embeddedbitmap as default So I take it that Ubuntu is doing the patching on its own; can anyone confirm this?

          - Ok, forget what I said, the whole issue will be addressed in fontconfig 2.4 & libXft 1.8.

      • fontconfig 2.3.92 with [http://lists.freedesktop.org/archives/fontconfig/2005-November/001683.html these features]

      • fontconfig 2.4 will released by mid-January according to [http://lists.freedesktop.org/archives/fontconfig/2005-December/001809.html Towards a 2.4 release]

        • 2.4 release keeps delayed, can't hope it will be in Dapper due to stablity reason.
        • Thanks for the finding. After checking out the source of [http://fontconfig.org/release/fontconfig-2.3.93.tar.gz fontconfig 2.3.93], there is indeed a new propety called embeddedbitmap, found in the XML config file "fonts.conf.in". Assuming fontconfig 2.4 is going to be released in January, we can wait to experiment this new property for enabling embedded bitmap after it comes out.

          Note: When slant (italic) style is used, embeddedbitmap mode must be turned off - since bitmap glyph cannot be italicized - they must be reverted back to vector (non-bitmap) glyph. The comment and statement in "fonts.conf.in" has already addressed this situation so I suppose we don't need to worry about it anymore.

    • More discussions can be found in this [http://moto.debian.org.tw/viewtopic.php?p=42973&sid=4d707f6f4ec23567f9938d087c0e30ca#42973 Chinese Debian forum].

  • Chinese
    1. ttf-arphic-uming
    2. ttf-newsung (setting should be equivalent to uming)
  • Japanese
    1. ttf-kochi-gothic
    2. ttf-kochi-mincho
    3. ipafont
    4. ipamonafont

      Note: ipafont and ipamonafont package can be found in ubuntu-ja [http://archive.ubuntulinux.jp/ubuntu-ja/breezy/ breezy-extra].

      Also see the possible [http://ukai.org/b/log/debian/legal licensing issue].

  • Korean
    1. ttf-baekmuk ( Fonts in this package are used by fontconfig. By a survey, 5% of voters like this - due to lower quality for displaying than the others. )
    2. ttf-unfonts ( 63% of voters prefer this. Has several font-sets, even bold font-sets. )
    3. ttf-alee ( 30% of voters, includes bitmap font and good for screen display. )
    • To get best displaying
       <match target="font">
           <test name="family"><string>EunGuseul</string></test>
               <edit mode="assign" name="autohint"><bool>true</bool></edit>
       </match>
       <match target="font">
           <test name="family"><string>EunGuseul</string></test>
           <test name="pixelsize" compare="more"><int>11</int></test>
           <test name="pixelsize" compare="less"><int>16</int></test>
               <edit mode="assign" name="autohint"><bool>false</bool></edit>
               <edit mode="assign" name="antialias"><bool>false</bool></edit>
       </match>
    • To match with Bitsream Vera fonts
       <match target="pattern">
           <test name="family"><string>EunGuseul</string></test>
               <edit mode="append" binding="strong" Name="family">
                  <string>Bitstream Vera Sans</string>
              </edit>
       </match>
       <match target="pattern">
           <test name="family"><string>EunGuseul Mono</string></test>
               <edit mode="append" binding="strong" name="family">
                  <string>Bitstream Vera Sans Mono</string>
               </edit>
       </match> 

2. Setting up a .conf file to /etc/fonts/conf.d when a ttf-font package installed, is it preferred way to solve this?

Implementation

Code

Data preservation and migration

Packages affected

Outstanding issues

BoF agenda and discussion

BetterCJKSupportSpecification/FontConfig (last edited 2008-08-06 16:14:54 by localhost)