[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ntemacs chooses wrong font.
From: |
Kenichi Handa |
Subject: |
Re: Ntemacs chooses wrong font. |
Date: |
Wed, 11 Jun 2008 22:11:34 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, Jason Rumney <address@hidden> writes:
> Kenichi Handa wrote:
> > I currently explicitly generate a unibyte string for font
> > names just to avoid the font name encoding problem until the
> > font-backend codes gets stable.
> Does that mean that the encoding will eventually be done in generic
> code, so I should avoid fixing this in w32font.c?
No. The encoding and decoding must be done in each font
backend because only the backend knows how to do that.
> > Emacs at first checks if a charater is supported by the
> > frame font (here "Monaco-10") to avoid unnecessary looking
> > up of fontset table . If supported, the frame font is used.
> > And, in your case, the font backend on Windows says that the
> > frame font supports it. That is the problem.
> The problem appears to be that the system API used in one of the
> encode_char functions on Windows (I don't know whether it is uniscribe
> or gdi) seems to return a space glyph for unsupported characters in some
> fonts, instead of 0 (which is ".notdef" according to the truetype spec).
It seems that this is a serious problem, but it's
unbelievable that Windows doesn't have a proper API to check
whether a font supports a specific character or not.
> Perhaps C-u C-x = should also report which font backend a font belongs
> to, to make tracking these sorts of bugs down easier.
Ok, I'll add that soon.
> > It seems that you saved the file with some of legacy
> > encoding (e.g. euc-cn, big5). On reading such a file, Emacs
> > adds a charset text-property (e.g. chinese-gb2312, big5),
> > and if a character has such a property, Emacs doesn't try
> > the frame font, but does a normal fontset looking up
> > (because `charset' information may change the priority of
> > fonts). So, your fontset setting above takes effect.
> >
> Ah, that explains a lot.
> > Perhaps, we should not try the frame font for a certain
> > group of charcters (e.g. han, indic, ??).
> >
> Where is the has_char function used? On Windows, this should work to
> filter out unsuitable fonts, as it checks the character against the
> font's supported scripts.
The has_char method is called in fontset_find_font (in
fontset.c) to decide that the selected font is usable for
a specific character.
---
Kenichi Handa
address@hidden
- Re: Ntemacs chooses wrong font., (continued)
- Re: Ntemacs chooses wrong font., Kevin Yu, 2008/06/10
- Re: Ntemacs chooses wrong font., Jason Rumney, 2008/06/11
- Re: Ntemacs chooses wrong font., Kevin Yu, 2008/06/11
- Re: Ntemacs chooses wrong font., Jason Rumney, 2008/06/11
- Re: Ntemacs chooses wrong font., Kevin Yu, 2008/06/11
- Re: Ntemacs chooses wrong font., Jason Rumney, 2008/06/11
- Re: Ntemacs chooses wrong font., Kenichi Handa, 2008/06/11
- Re: Ntemacs chooses wrong font., Kevin Yu, 2008/06/11
- Re: Ntemacs chooses wrong font., Kenichi Handa, 2008/06/11
- Re: Ntemacs chooses wrong font., Jason Rumney, 2008/06/11
- Re: Ntemacs chooses wrong font.,
Kenichi Handa <=
- Re: Ntemacs chooses wrong font., Juanma Barranquero, 2008/06/11
Re: Ntemacs chooses wrong font., Jason Rumney, 2008/06/16