From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: fontset/font change Date: Thu, 12 Mar 2009 10:16:10 +0900 Message-ID: References: <87ljrcb23h.fsf@catnip.gol.com> <49B7C51E.6020507@gnu.org> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1236820585 8475 80.91.229.12 (12 Mar 2009 01:16:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2009 01:16:25 +0000 (UTC) Cc: emacs-devel@gnu.org, miles@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 12 02:17:40 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LhZYK-0004oP-DA for ged-emacs-devel@m.gmane.org; Thu, 12 Mar 2009 02:17:40 +0100 Original-Received: from localhost ([127.0.0.1]:46008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhZWy-0005RK-0s for ged-emacs-devel@m.gmane.org; Wed, 11 Mar 2009 21:16:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhZWs-0005Qs-JZ for emacs-devel@gnu.org; Wed, 11 Mar 2009 21:16:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhZWq-0005Qd-5K for emacs-devel@gnu.org; Wed, 11 Mar 2009 21:16:09 -0400 Original-Received: from [199.232.76.173] (port=37355 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhZWq-0005Qa-0I for emacs-devel@gnu.org; Wed, 11 Mar 2009 21:16:08 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:58239) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhZWm-00042Z-55; Wed, 11 Mar 2009 21:16:04 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n2C1G0sL024048; Thu, 12 Mar 2009 10:16:01 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n2C1G0L9023678; Thu, 12 Mar 2009 10:16:00 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n2C1G0BX008512; Thu, 12 Mar 2009 10:16:00 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LhZWs-0005dJ-RN; Thu, 12 Mar 2009 10:16:10 +0900 In-reply-to: <49B7C51E.6020507@gnu.org> (message from Jason Rumney on Wed, 11 Mar 2009 22:05:18 +0800) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109576 Archived-At: In article <49B7C51E.6020507@gnu.org>, Jason Rumney 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