You are not logged in.
Pages: 1
I recently decided to install lots of new CJK fonts on my system. It is nice for documents you want to print out as you can select which font to use here and there especially for elaborate fonts or silly fonts.
But there is one problem now, some fonts I don't really want for everyday use are taking priority over my favourite fonts.
My system font is Arial, and my terminal font is monospace. Neither of these fonts have CJK characters encoded and they borrow from other fonts when they need to display CJK characters in say a file manager or terminal.
Before I only had a few CJK fonts, and it often only had 1 choice for a font to borrow for a certain character, so it always borrowed the font I wanted, but now since there other fonts, they are borrowing from other fonts that I don't really like for everyday use.
Is there a way to set a priorities list? I really don't want to remove all the new fonts I just got.
I read the wiki, but the page in the wiki seems to be for making a certain font work instead of another, like using Bitstream Vera Sans Mono instead of Helvetica in the example because Helvetica is ugly.
I don't have a problem with my fonts being chosen for me in websites etc, because if people set a font explicitly, they ussually have a reason to, but I want fonts that don't have CJK glyphs to borrow from my favourite CJK font rather than some random one.
Offline
Yes you can set a 'priorities list' for different font families. There are some examples on the wiki:
http://wiki.archlinux.org/index.php/%E4 … 6%96%87%29
The page is written in Chinese but you can take a look at the example config files and get a rough idea, if you do not speak Chinese.
Edit: typo.
Last edited by hk2717 (2008-12-04 03:55:48)
Offline
Thanks for you reply. I didn't think of the Chinese wiki.
Hmm, this doesn't seem to work the way I want it to. Maybe I'm doing something wrong. (I don't know Chinese very well, so I can't really read that wiki page)
When I have this in my fonts.conf:
<alias>
<family>monospace</family>
<prefer>
<family>Microsoft JhengHei</family>
<family>Microsoft YaHei</family>
</prefer>
</alias>
<alias>
<family>Arial</family>
<prefer>
<family>Microsoft JhengHei</family>
<family>Microsoft YaHei</family>
</prefer>
</alias>
Then Microsoft JhengHei gets used for everything instead of monospace. Even for Latin characters. (Of course I only want it for CJK characters) Since JhengHei isn't even monospaced, it kinda takes away the point of the monospace font (and my terminal looks really weird).
It also seems to have no effect on Arial, maybe I needed to use a lower case a or something.
I also tried this:
<alias>
<family>monospace</family>
<prefer>
<family>monospace</family>
<family>Microsoft JhengHei</family>
<family>Microsoft YaHei</family>
</prefer>
</alias>
But now monospace uses the font it used to use for CJK characters even though JhengHei is second priority. (I think it is using Sazanami Gothic.) Basically, it has no effect.
Also, this is the kind of thing I am trying to avoid:
I hate it when you have CJK text, but one character is in another font, or worse another typeface because that character isn't a part of the default font. The reason I want JhengHei and YaHei to be my preferred is because they seem to work well with many characters, JhengHei has correct traditional typefaces for most characters, and the two fonts look good and go well with each other most of the time.
That's why if someone sets a font on a website, I want to use that font (becuase if they set that font they probbably only use characters in that font). But if they don't set a font JhengHei would be good.
Last edited by sokuban (2008-12-04 16:16:06)
Offline
I think you need something like this:
<alias>
<family>monospace</family>
<prefer>
<family>Bitstream Vera Mono</family>
<family>Microsoft JhengHei</family>
<family>Microsoft YaHei</family>
</prefer>
</alias>
Also, I suggest using free fonts from WenQuanYi instead of copyrighted M$ fonts. you can install them with pacman -S wqy-bitmapfont wqy-zenhei.
Offline
This kinda works:
<alias>
<family>sans-serif</family>
<prefer>
<family>Arial</family>
<family>Microsoft JhengHei</family>
<family>Microsoft YaHei</family>
<family>Meiryo</family>
</prefer>
</alias>
The funny thing is that I put sans-serif as the family, but JhengHei, YaHei and Meiryo get borrowed by Arial. I guess its because Arial is in the sans-serif family or something.
I had to add the Meiryo line (Japanese font) because for some reason it wouldn't use JhengHei or YaHei for Japanese characters. It would be nice if it used JhengHei's Japanese characters because they aren't too bad, but JhengHei and Meiryo mix together alright so its okay like this.
However I can't get any setup working for the monospace fonts. I guess it is because the Bitstream Vera Mono font is set up to borrow from another CJK font and that overrides the JhengHei and YaHei.
I'd use free fonts, but...
I can't find any good free Traditional Chinese font (Wen Quan Yi has a simplified style, although it probbably has some traditional characters encoded in it I want a traditional style. JhengHei definately not perfect, but it is the best font I've seen so far when it comes to this). These are the kind of characters to look out for: 雨腦骨雪辿平直 (JhengHei passes the first 4)
I can't find a set of free fonts that cover the entire CJK area and go together well. (Except maybe bitstream cyberbit but I don't like that font.) Like I said in my earlier post, I hate it when you have one character in CJK text with a different font or typeface than the rest of the text. If I use Wen Quan Yi as my main font, I need to find other fonts that go well with it because I don't think it covers the entire CJK area. I'd call it a success if these characters can be displayed and it all looks like 1 font: "働れカ汉语䌓體한畓
Last edited by sokuban (2008-12-05 03:45:08)
Offline
I don't think there is any font that covered the whole CJK area. The only option in my opinion is to use several similar fonts. As for simplified and traditional Chinese, I am pretty sure that WenQuanYi fonts can display traditional Chinese perfectly. Whether it uses the simplified version or traditional version of a character depends on encoding of the text. It cannot automatically convert simplified Chinese characters into traditional ones or vice versa, as no other font can. This is not a font issue.
Few people out there have the needs to display CJK characters all together. Even fewer people have successful experiences. Good luck on your journey and feel free to share your experiences on the forum or in the wiki.
Offline
Yes I know this is somewhat of a rare problem. >_<
The thing is, unicode encodes characters, not glyphs. However there is a distinct difference in style between Traditional and Simplified Chinese. There are tons of characters in unicode that have slight differences in Simplified and Traditional Chinese, but they encoded as one character in unicode. The only way to display the traditional version is to use a traditional font.
For example:
雨: The dots (rainpellets?) should be all facing different directions. In Simplified Chinese they all ussually go diagonally from top left to bottom right.
骨: The part in the middle of the top should take two strokes to write not one. First is a vertical stroke in the middle then a horizontal stroke towarns the right. In Simplified Chinese it takes one stroke and is written from left to middle to down. Also part in the bottom should not have horizontal lines in the middle, they should both be diagonal, first from top left to bottom right and second from top right to bottom left. In Simplified Chinese there are just two horizontal lines.
Wen Quan Yi, being a Simplified Chinese font, displays the simplified style of both of these characters. In fact Wen Quan Yi even writes Traditional characters in a simplified style. Going by the 骨 example, 體 is a Traditional character, but Wen Quan Yi displays the left side with the simplified version of 骨 instead of the traditional version.
Offline
I can understand these style problems. The only solution seems to develop a font that covers the whole Chinese area, and follow the traditional style wherever possible, or even better, use traditional style for simplified Chinese characters. (Yes I hate simplified Chinese, even though I live in China mainland and educated to use it). I think at the moment the only workaround is to set a traditional font prior to a simplified one (with a similar style) in the config.
Edit: typo..
Last edited by hk2717 (2008-12-08 04:52:00)
Offline
Yea but all the fonts that cover lots of characters aren't so good. (Arial MS Unicode, Bitream Cyberbit) And they ussually don't have a lot of the rare characters.
Also I don't think that there are many fonts that use the traditional style for simplified characters. I really don't mind if simplified characters are in a simplified style, as long as the font itself doesn't look completely different. (In a simplified character compound with say 骨 or 雨 having that part in simplified style for example is alright) Becuase generally simplified characters aren't mixed with traditional text that much anyways.
I also don't hate simplified characters that much believe it or not. I actually think the concept is good, because writing in traditional characters takes more time, and traditional characters are harder to display on computers because of pixels, characters with lots of strokes often get squished. My rough handwriting resembles simplified chinese in many ways too. (eg. 語 -> 语, 車 -> 车) One of the main reasons I am adamant about traditional chinese now is because I want to get used to them. I believe that it is important to learn traditional first, because it is easier to learn simplified from traditional than the other way around, and learning traditional helps understand the language more. Also I am interested in ancient China mostly, and I'm not one of those people who are learning Chinese because they think it will be the most important language in the future. If I want to read classical chinese texts, learning traditional would be the first step. If I was a businessman trying to make money, I'd probbably only learn simplified. Once I learn Chinese I probbably wouldn't care as much though about fonts and stuff because I'd know all the stylistic differences.
I probbably should have asked this earlier, but I'm curious as to what fonts you use and what config you have. Would you mind showing me?
Offline
I use the default config, having nothing in my .font.conf. The only fonts I installed are wqy-bitmapfont and wqy-zenhei, besides bitstream vera. I can view Chinese (both simplified and traditional), Korean and Japanese without any problem. The only major problem is anti-alias, the text is not very sharp but I don't yet have time to dig into it.:/
Offline
I use the default config, having nothing in my .font.conf.
The only fonts I installed are wqy-bitmapfont and wqy-zenhei, besides bitstream vera. I can view Chinese (both simplified and traditional), Korean and Japanese without any problem. The only major problem is anti-alias, the text is not very sharp but I don't yet have time to dig into it.:/
If you want beautiful anti aliasing with the wqy-bitmapfont try this config:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- WenQuanYi Bitmap Font for CJK users -->
<fontconfig>
<!--
Enable WenQuanYi Bitmap Song only
by carlos liu
-->
<selectfont>
<acceptfont>
<pattern>
<patelt name="family"><string>WenQuanYi Bitmap Song</string></patelt>
</pattern>
</acceptfont>
</selectfont>
<!--
Use WenQuanYi Bitmap Song for specified font sizes
by Funda Wang
Updated by Qianqian Fang on Mar. 28,2007
Updated by Qianqian Fang on May 9,2007
-->
<match target="pattern">
<test equal="any" compare="eq" name="lang">
<string>en</string>
<string>en-us</string>
<string>zh-cn</string>
<string>zh-tw</string>
<string>zh-hk</string>
<string>zh-sg</string>
</test>
<test compare="more_eq" name="pixelsize">
<double>11</double>
</test>
<test compare="less_eq" name="pixelsize">
<double>16</double>
</test>
<test compare="not_eq" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend_first">
<string>WenQuanYi Bitmap Song</string>
</edit>
</match>
<match target="pattern">
<test equal="any" compare="eq" name="lang">
<string>en</string>
<string>en-us</string>
<string>zh-cn</string>
<string>zh-tw</string>
<string>zh-hk</string>
<string>zh-sg</string>
</test>
<test compare="more_eq" name="size">
<double>8</double>
</test>
<test compare="less_eq" name="size">
<double>12</double>
</test>
<test compare="not_eq" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend_first">
<string>WenQuanYi Bitmap Song</string>
</edit>
</match>
</fontconfig>
Offline
Thanks for sharing.
I just found that my poor font rendering in firefox is due to wqy-zenhei, of which the anti-alias rendering is rather poor. Unfortunately the config file you provide seems does not work for this issue.
Last edited by hk2717 (2008-12-11 14:32:10)
Offline
Thanks for sharing.
I just found that my poor font rendering in firefox is due to wqy-zenhei, of which the anti-alias rendering is rather poor. Unfortunately the config file you provide seems does not work for this issue.
Oh, I don't use zenhei. That config file is for the bitmap font.
Offline
The solution is rather simple:
<match target="pattern">
<test name="family" qual="any">
<string>WenQuanYi Zen Hei</string>
</test>
<test compare="more_eq" name="pixelsize" >
<double>12</double>
</test>
<test compare="less_eq" name="pixelsize" >
<double>16</double>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>WenQuanYi Bitmap Song</string>
</edit>
</match>
Offline
Pages: 1