From: "Kevin Yu" <yujie052@gmail.com>
To: "Kenichi Handa" <handa@m17n.org>
Cc: emacs-devel@gnu.org, jasonr@gnu.org
Subject: Re: Ntemacs chooses wrong font.
Date: Wed, 11 Jun 2008 20:09:43 +0800 [thread overview]
Message-ID: <42b562540806110509k597da392xa83823c47958e007@mail.gmail.com> (raw)
In-Reply-To: <E1K6Oqr-0004xw-BO@etlken.m17n.org>
[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]
On Wed, Jun 11, 2008 at 7:50 PM, Kenichi Handa <handa@m17n.org> wrote:
> In article <42b562540806110351p699e4ad8l19b5841724eef431@mail.gmail.com>,
> "Kevin Yu" <yujie052@gmail.com> writes:
>
> > > > Emacs displays the font family name as:"\320\302\313\316\314\345"
> > >
> > > This is a bug, but it should at least be consistent, as there is no
> > > encoding in either direction.
>
> 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.
>
>
> > Here's my font related configuration
>
> > (set-language-environment "chinese-gb18030")
> > (set-frame-font "Monaco-10")
> > (set-fontset-font (frame-parameter nil 'font)
> > 'han '("Microsoft Yahei"."unicode-bmp"))
> > (set-fontset-font (frame-parameter nil 'font)
> > 'symbol '("Microsoft Yahei"."unicode-bmp"))
> > (set-fontset-font (frame-parameter nil 'font)
> > 'cjk-misc '("Microsoft Yahei"."unicode-bmp"))
> > (set-fontset-font (frame-parameter nil 'font)
> > 'bopomofo '("Microsoft Yahei"."unicode-bmp"))
>
> 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.
Why does the backend say the frame font support the Chinese charset?
Is it a bug of Windows font backend or a bug of "Monaco" font?
I have tried to use "Courier New", but emacs can't choose the right font for
Chinese either.
>
>
> > if I open a existed file with Chinese characters, everything goes well.
>
> 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.
>
> Perhaps, we should not try the frame font for a certain
> group of charcters (e.g. han, indic, ??).
>
> ---
> Kenichi Handa
> handa@ni.aist.go.jp
>
[-- Attachment #2: Type: text/html, Size: 3443 bytes --]
next prev parent reply other threads:[~2008-06-11 12:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 12:52 Ntemacs chooses wrong font Kevin Yu
2008-06-06 21:23 ` Jason Rumney
2008-06-07 2:41 ` Kevin Yu
2008-06-11 2:32 ` Kevin Yu
2008-06-11 8:36 ` Jason Rumney
2008-06-11 10:51 ` Kevin Yu
2008-06-11 11:27 ` Jason Rumney
2008-06-11 12:05 ` Kevin Yu
2008-06-11 12:40 ` Jason Rumney
2008-06-11 11:50 ` Kenichi Handa
2008-06-11 12:09 ` Kevin Yu [this message]
2008-06-11 12:29 ` Kenichi Handa
2008-06-11 12:34 ` Jason Rumney
2008-06-11 13:11 ` Kenichi Handa
2008-06-11 13:48 ` Juanma Barranquero
2008-06-16 21:37 ` Jason Rumney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42b562540806110509k597da392xa83823c47958e007@mail.gmail.com \
--to=yujie052@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=handa@m17n.org \
--cc=jasonr@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).