[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: thai font problem
From: |
Kenichi Handa |
Subject: |
Re: thai font problem |
Date: |
Mon, 1 Sep 2003 20:19:33 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Werner LEMBERG <address@hidden> writes:
>> Could you try this?
>>
>> (set-fontset-font "fontset-default" 'thai-tis620 '("*" . "TIS620"))
>> (clear-face-cache t)
> This works, thanks. Will a similar fix be applied to the CVS?
Here we have a fundamental problem of the current font
selection mechanism.
If a font family is specified (by face or by fontset), Emacs
prefers a font of the specifed family even if the font size
is worse than the other font of different family. And a
family specification of fontset has higher priority than
that of face.
Before my change, the default fontset specifies the family
"*" for most non-ASCII characters. So, Emacs finds the best
matching font while ignoring face family for non-ASCII
characters (because any family matches "*").
This setting was good until a while ago because we didn't
have that many family variations for non-ASCII characters.
But, such a setting is just to cheat the font-selection
routine. And, in these days, for instance, we have many
families of Japanese fonts. In this environment, people
want to control font-selection by face family even for
Japanese.
So I changed the default fontset not to specify a family for
non-ASCII characters.
Now what happend to you is this.
As your default font is -etl-fixed-..., the default face has
family "etl-fixed". And you surely have a Thai font of that
family. So, that font is selected even if the size is worse
than that 24-dot Thai font of family "misc-fixed".
For a workaround, I installed the above change.
But, I think it's basically not the right thing to set "*"
family in the default fontset. To solve the Thai font
problem, we need fine-tuning mechanism in font selection.
For instance, if the size of a selected font is very
different from the requested size, try to select another
font by ignoring a family. But, how to decide that the font
size is "very different"? Don't we have to suppress such a
mechanism for ASCII font? I'm not sure.
Unfortunetely, I don't have a time to design a better font
selection mechanism for the moment.
---
Ken'ichi HANDA
address@hidden