Sugar's fonts

Yuan Chao yuanchao at
Sun Sep 30 06:26:30 EDT 2007

On 9/30/07, Albert Cahalan <acahalan at> wrote:

> Western fonts also do not have bold or italic built-in.
> It is common to have several similar fonts, called a
> font family, to solve this problem. The bold and italic
> versions will look good, but they will show up as
> different fonts to the user (normal users hate this)
> unless the program contains code to find all the
> fonts of a family and group them together.
Fonts like bitstream or helvetica have bold/italy in different ttf
files, but they only show as single entries, respectively. That's what
I mean "build-in". :) This is the best one I think, but this is not
for CJK fonts.

Single regional CJK fonts usually are as large as ~5MB. Cross regional
fonts can be 10~20MB or even more. It's not very practical to have
several fonts installed on a device with limited storage. So for most
of the case, we relies on font renderer to generate fake bold/italy
version of fonts.

> So I guess nobody ever makes a Chinese font in
> two versions, bold and normal?
Right, no.

> This can be done with true type fonts as long as the
> renderer can predict the name of one style from the
> name of the other style. This is the same problem as
> western fonts have with bold.
This can be easily done with fontconfig customized rules.

> Suppose I have these fonts:
> Foo Roman
> Foo Bold
> Foo BoldItalic
> Foo Italic
> ("Foo" is the family name, the other part is the face name)
> That would be in 4 font files. The app can show that to
> the user as one font choice. If the user asks for italic,
> the app will switch to using the Foo Italic font file.
> Suppose I have these:
> Bar Roman
> Bar Bold
> Here, the app will make a fake italic font from "Bar Roman"
> and a fake bold-italic font from "Bar Bold".
This is already done in freetype and fontconfig for CJK fonts with the
notable patch sets from Firefly.

> The same works for Chinese as long as the family names
> are predictable. Example:
> Baz Mingti
> Baz Kaiti
> Baz Heiti
> Baz Yuanti
> Baz Fangsongti
> That appears to be a 5-way choice.
We actually view them as different type faces and use them separately
and let the font renderer do the fake bold/italy. This is because it's
not necessarily the font vendors provide all these 5 choices. (mostly
far more) Not all users install the same choices. Art workers may
needs them all, but not for normal users.

I'd like to re-pack a CJK font and push it into XO repository once
Arne's work is done. That's my current plan.

Best regards,
Yuan Chao

More information about the Devel mailing list