osdir.com
mailing list archive

Subject: Re: syntax for disabling using embedded bitmaps for specific font size ranges - msg#00029

List: xfree86.fonts

Date: Prev Next Index Thread: Prev Next Index
On Thu, Dec 05, 2002 at 05:38:24PM -0800, Keith Packard wrote:
> instead. You can add size tests inside the match element if you like to
> narrow the range to specific sizes.

As an example, here is what I use for a traditional Chinese font:

<match target="font">
<test name="family" compare="eq">
<string>MingLiU</string>
</test>
<or>
<test name="family" compare="eq">
<string>PMingLiU</string>
</test>
</or>
<test name="size" compare="more_eq">
<double>8</double>
</test>
<test name="size" compare="less_eq">
<double>12</double>
</test>
<test target="pattern" name="slant" compare="eq">
<const>roman</const>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>

--
Roger So Debian Developer
Sun Wah Linux Limited i18n/L10n Project Leader
Tel: +852 2250 0230 roger.so@xxxxxxxxxxxx
Fax: +852 2259 9112 http://www.sw-linux.com/


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: syntax for disabling using embedded bitmaps for specific font size ranges

Around 17 o'clock on Dec 5, "Ken Deeter (Kentarou Shinohara)" wrote: > I'm trying to figure out how to disable anti-aliasing and use > embedded bitmaps for japanese fonts and for font sizes 8-14. Once you disable anti-aliasing, you'll automatically get the embedded bitmaps. I also find that mixing aa and non-aa glyphs from the same font at different sizes is somewhat distracting (but, ymmv). Here's how I disable anti-aliasing on chinese fonts: <match target="font"> <test name="lang" target="pattern" compare="contains"> <string>zh</string> </test> <test name="lang" target="font" compare="contains"> <string>zh</string> </test> <edit name="hinting" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> This says that any font or pattern specified for chinese has hinting and antialiasing disabled. To hit a specific family, you can use: <!-- Disable anti-aliasing for simsun so that the embedded bitmaps can be used --> <match target="font"> <test name="family" compare="eq"> <string>simsun</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> instead. You can add size tests inside the match element if you like to narrow the range to specific sizes. Keith Packard XFree86 Core Team HP Cambridge Research Lab

Next Message by Date: click to view message preview

Re: syntax for disabling using embedded bitmaps for specific font size ranges

Hi, Thanks for the quick reply. I've gotten it to work for "MS UI Gothic" but I can't seem to make it match non-ascii font names. For example, "MS Gothic" also has a japanese font name and that is what shows up in the font dialog. When I run fc-list, it shows both "MS Gothic" and the Japanese version of the font name. I tried <match target="font"> <test name="family" compare="contains"> <string>Gothic</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> to no avail. I also tried <match target="font"> <test name="family" compare="contains"> <string>ãããã</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> where the "Goshikku" in japanese is in UTF-8, which failed too (though i'm running in a EUC-JP locale) Am I not matching correctly? or is there some other way to match the font? Thanks, Ken Keith Packard wrote: Around 17 o'clock on Dec 5, "Ken Deeter (Kentarou Shinohara)" wrote: I'm trying to figure out how to disable anti-aliasing and use embedded bitmaps for japanese fonts and for font sizes 8-14. Once you disable anti-aliasing, you'll automatically get the embedded bitmaps. I also find that mixing aa and non-aa glyphs from the same font at different sizes is somewhat distracting (but, ymmv). Here's how I disable anti-aliasing on chinese fonts: <match target="font"> <test name="lang" target="pattern" compare="contains"> <string>zh</string> </test> <test name="lang" target="font" compare="contains"> <string>zh</string> </test> <edit name="hinting" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> This says that any font or pattern specified for chinese has hinting and antialiasing disabled. To hit a specific family, you can use: <!-- Disable anti-aliasing for simsun so that the embedded bitmaps can be used --> <match target="font"> <test name="family" compare="eq"> <string>simsun</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> instead. You can add size tests inside the match element if you like to narrow the range to specific sizes. Keith Packard XFree86 Core Team HP Cambridge Research Lab _______________________________________________ Fonts mailing list Fonts@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/fonts

Previous Message by Thread: click to view message preview

Re: syntax for disabling using embedded bitmaps for specific font size ranges

Around 17 o'clock on Dec 5, "Ken Deeter (Kentarou Shinohara)" wrote: > I'm trying to figure out how to disable anti-aliasing and use > embedded bitmaps for japanese fonts and for font sizes 8-14. Once you disable anti-aliasing, you'll automatically get the embedded bitmaps. I also find that mixing aa and non-aa glyphs from the same font at different sizes is somewhat distracting (but, ymmv). Here's how I disable anti-aliasing on chinese fonts: <match target="font"> <test name="lang" target="pattern" compare="contains"> <string>zh</string> </test> <test name="lang" target="font" compare="contains"> <string>zh</string> </test> <edit name="hinting" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> This says that any font or pattern specified for chinese has hinting and antialiasing disabled. To hit a specific family, you can use: <!-- Disable anti-aliasing for simsun so that the embedded bitmaps can be used --> <match target="font"> <test name="family" compare="eq"> <string>simsun</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> instead. You can add size tests inside the match element if you like to narrow the range to specific sizes. Keith Packard XFree86 Core Team HP Cambridge Research Lab

Next Message by Thread: click to view message preview

Re: syntax for disabling using embedded bitmaps for specific font size ranges

Hi, Thanks for the quick reply. I've gotten it to work for "MS UI Gothic" but I can't seem to make it match non-ascii font names. For example, "MS Gothic" also has a japanese font name and that is what shows up in the font dialog. When I run fc-list, it shows both "MS Gothic" and the Japanese version of the font name. I tried <match target="font"> <test name="family" compare="contains"> <string>Gothic</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> to no avail. I also tried <match target="font"> <test name="family" compare="contains"> <string>ãããã</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> where the "Goshikku" in japanese is in UTF-8, which failed too (though i'm running in a EUC-JP locale) Am I not matching correctly? or is there some other way to match the font? Thanks, Ken Keith Packard wrote: Around 17 o'clock on Dec 5, "Ken Deeter (Kentarou Shinohara)" wrote: I'm trying to figure out how to disable anti-aliasing and use embedded bitmaps for japanese fonts and for font sizes 8-14. Once you disable anti-aliasing, you'll automatically get the embedded bitmaps. I also find that mixing aa and non-aa glyphs from the same font at different sizes is somewhat distracting (but, ymmv). Here's how I disable anti-aliasing on chinese fonts: <match target="font"> <test name="lang" target="pattern" compare="contains"> <string>zh</string> </test> <test name="lang" target="font" compare="contains"> <string>zh</string> </test> <edit name="hinting" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> This says that any font or pattern specified for chinese has hinting and antialiasing disabled. To hit a specific family, you can use: <!-- Disable anti-aliasing for simsun so that the embedded bitmaps can be used --> <match target="font"> <test name="family" compare="eq"> <string>simsun</string> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> </match> instead. You can add size tests inside the match element if you like to narrow the range to specific sizes. Keith Packard XFree86 Core Team HP Cambridge Research Lab _______________________________________________ Fonts mailing list Fonts@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/fonts
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by