Re: [Fwd: Re: Request for review and advice on wqy-bitmap-fonts fontconfig settings]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi

some new progress was made for the fontconfig file. The new version is
attached.

two changes:

1. for replacing wqy-bitmap-song by Chinese vector fonts for displaying >16px or <10px sizes, I changed match="font" to match="pattern", and now it works. I used 4 match
 blocks to handle serif>16px, serif<10px, sans>16px and sans<10px cases.

2. I added a match block to solve the high-priority of wqy fonts under zh locales and
  monospace alias. An additional test <lang contains zh> was inserted
  to the test list, to minimize the impact to non zh users.

using this config file, the rendering of en-us and zh-cn/zh-tw are all looking fine (almost).
the screenshots of the en-us desktop is
 http://wenq.org/gallery/albums/userpics/10002/F8-wqy-newconfig_enUS.png
and that for zh-cn desktop is
 http://wenq.org/gallery/albums/userpics/10002/F8-wqy-newconfig_zhCN.png

the "almost" bits come from the fact that when users specify "WenQuanYi Bitmap Song" as family rather than the genetic alias, larger/smaller fonts were still replaced by uming/ukai (see the right-bottom corner of the two test pages). However, this
seems to be ok for me.

just want to mention, two non-wqy bugs can be found in the screenshots

1. on the zhCN screenshot, in the sans-serif test block, the text of "... lasy dog 0123456789" you can see the numbers were rendered by wqy bitmap fonts, rather than the smooth Dejavu. This also happened for all Chinese webpages, when a number follows a Chinese character. I was told that this is a bug in Pango, Behdad, do you have some insight on this?

2. the date-time applet used reversed language on both screenshots, I believe this is
  Gnome's bug.

please let me know what you think about this file.

thank you

Qianqian
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
  WenQuanYi Bitmap Song CJK Font Rendering Setup

  History
    created by Qianqian Fang,  2007/12/01

  Purpose:
    1. use the system preferred Latin vector fonts for non-CJK characters
    2. use wqy-bitmap-fonts for Chinese characters between 10px and 16px (all locales)
    3. use vector fonts (uming/ukai) for Chinese characters for all other sizes
-->


<!--
	Enable WenQuanYi Bitmap Song only
	by carlos liu
-->
    <selectfont>
        <acceptfont>
            <pattern>
                 <patelt name="family"><string>WenQuanYi Bitmap Song</string></patelt>
            </pattern>
        </acceptfont>
    </selectfont>

<!--
  Serif faces
 -->
	<alias>
		<family>serif</family>
                <prefer><family>WenQuanYi Bitmap Song</family></prefer>
	</alias>
<!--
  Sans-serif faces
 -->
        <alias>
                <family>sans-serif</family>         
                <prefer><family>WenQuanYi Bitmap Song</family></prefer>
        </alias>
<!--
  Monospace faces
 -->
        <alias>
                <family>monospace</family>         
                <prefer>
                        <family>DejaVu LGC Sans Mono</family>
                        <family>Bitstream Vera Sans Mono</family>
			<family>WenQuanYi Bitmap Song</family>
		</prefer>
        </alias>
        <match target="pattern">
           <test equal="any" compare="eq" name="family">
                   <string>WenQuanYi Bitmap Song</string>
           </test>
           <test equal="any" compare="eq" name="family">
                   <string>monospace</string>
           </test>
           <test compare="contains" name="lang">
                   <string>zh</string>
           </test>
           <edit name="family" mode="prepend" binding="strong">
                   <string>DejaVu LGC Sans Mono</string>
           </edit>
       </match>

<!--
  Use vector fonts at larger/smaller sizes for serif
 -->
       <match target="pattern">
           <test equal="any" compare="eq" name="family">
                   <string>WenQuanYi Bitmap Song</string>
           </test>
           <test equal="any" compare="eq" name="family">
                   <string>serif</string>
           </test>
           <test compare="more" name="pixelsize">
                   <double>16</double>
           </test>
           <edit name="family" mode="prepend" binding="same">
                   <string>AR PL ZenKai Uni</string>
           </edit>
      </match>
       <match target="pattern">
           <test equal="any" compare="eq" name="family">
                   <string>WenQuanYi Bitmap Song</string>
           </test>
           <test equal="any" compare="eq" name="family">
                   <string>serif</string>
           </test>
           <test compare="less" name="pixelsize">
                   <double>10</double>
           </test>
           <edit name="family" mode="prepend" binding="same">
                   <string>AR PL ZenKai Uni</string>
           </edit>
      </match>

<!--
  Use vector fonts at larger/smaller sizes for sans
 -->

       <match target="pattern">
           <test equal="any" compare="eq" name="family">
                    <string>WenQuanYi Bitmap Song</string>
           </test>
           <test equal="any" compare="eq" name="family">
                   <string>sans-serif</string>
           </test>
           <test compare="more" name="pixelsize">
                   <double>16</double>
           </test>
           <edit name="family" mode="prepend" binding="same">
                   <string>AR PL ShanHeiSun Uni</string>
           </edit>
      </match>
       <match target="pattern">
           <test equal="any" compare="eq" name="family">
                   <string>WenQuanYi Bitmap Song</string>
           </test>
           <test equal="any" compare="eq" name="family">
                   <string>sans-serif</string>
           </test>
           <test compare="less" name="pixelsize">
                   <double>10</double>
           </test>
           <edit name="family" mode="prepend" binding="same">
                   <string>AR PL ShanHeiSun Uni</string>
           </edit>
      </match>

</fontconfig>
_______________________________________________
Fedora-fonts-list mailing list
Fedora-fonts-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-fonts-list

[Index of Archives]     [Fedora Users]     [Font Configuration]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux