From: Kenichi Handa <handa@m17n.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: emacs-devel@gnu.org, miles@gnu.org
Subject: Re: fontset/font change
Date: Thu, 12 Mar 2009 10:16:10 +0900 [thread overview]
Message-ID: <E1LhZWs-0005dJ-RN@etlken> (raw)
In-Reply-To: <49B7C51E.6020507@gnu.org> (message from Jason Rumney on Wed, 11 Mar 2009 22:05:18 +0800)
In article <49B7C51E.6020507@gnu.org>, Jason Rumney <jasonr@gnu.org> writes:
> Miles Bader wrote:
> > I have been using the following bit of code in my .emacs:
> >
> > ;; ugh... force use of Droid Sans Fallback for all non-roman chars
> > (let ((fontset (frame-parameter nil 'font)))
> > (unless (equal fontset "tty")
> > (set-fontset-font fontset 'unicode "Droid Sans Fallback")))
> >
> > As of today, it no longer seems to work (because the fontset names seem
> > to be different now, and no longer match the font name).
> >
> As of now, something still seems to be broken (see bug#2637).
> On Windows, I get the message "Can't set a font for partial ASCII
> range." This seems to be coming from line 1511 of fontset.c, while
> processing one of these lines (maybe the latin-jisx0201 line) from
> term/w32-win.el; TARGET is the integer 33:
> ;; Enable Japanese fonts on Windows to be used by default.
> (set-fontset-font t (make-char 'katakana-jisx0201)
> '("*" . "JISX0208-SJIS"))
> (set-fontset-font t (make-char 'latin-jisx0201)
> '("*" . "JISX0208-SJIS"))
> (set-fontset-font t (make-char 'japanese-jisx0208)
> '("*" . "JISX0208-SJIS"))
> (set-fontset-font t (make-char 'japanese-jisx0208-1978)
> '("*" . "JISX0208-SJIS"))
In pre-unicode Emacs, make-char returned generic characters
in the above calls. But, as a concept of generic character
is deleted in Emacs 23, the above setting anyway doesn't
work now.
The right way for "Enable Japanese fonts on Windows to be
used by default." is:
(set-fontset-font "fontset-default" 'katakana-jisx0201
'("*" . "JISX0208-SJIS") nil 'prepend)
(set-fontset-font "fontset-default" #x203E
'("*" . "JISX0208-SJIS") nil 'prepend)
(set-fontset-font "fontset-default" 'japanese-jisx0208
'("*" . "JISX0208-SJIS") nil 'prepend)
(set-fontset-font "fontset-default" 'japanese-jisx0208-1978
'("*" . "JISX0208-SJIS") nil 'prepend)
Note that U+203E is the only non_ASCII character in
latin-jisx0201.
But, why do we have that kind of setting in term/w32-win.el
only for Japanese? What does the registry "JISX0208-SJIS"
exactly mean? Why doesn't the default setting work?
---
Kenichi Handa
handa@m17n.org
next prev parent reply other threads:[~2009-03-12 1:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 13:50 fontset/font change Miles Bader
2009-03-11 14:05 ` Jason Rumney
2009-03-11 14:36 ` Miles Bader
2009-03-12 1:16 ` Kenichi Handa [this message]
2009-03-12 13:19 ` Jason Rumney
2009-03-13 5:18 ` Kenichi Handa
2009-03-12 0:57 ` Kenichi Handa
2009-03-12 1:05 ` Miles Bader
2009-03-12 2:53 ` Kenichi Handa
2009-03-12 4:01 ` Miles Bader
2009-03-12 4:10 ` Chong Yidong
2009-03-12 6:40 ` Kenichi Handa
2009-03-12 13:39 ` Chong Yidong
2009-03-13 5:10 ` Kenichi Handa
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=E1LhZWs-0005dJ-RN@etlken \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
--cc=miles@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).