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 09:57:41 +0900 Message-ID: References: <87ljrcb23h.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1236819476 5826 80.91.229.12 (12 Mar 2009 00:57:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2009 00:57:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 12 01:59:11 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 1LhZGN-0007ra-AL for ged-emacs-devel@m.gmane.org; Thu, 12 Mar 2009 01:59:07 +0100 Original-Received: from localhost ([127.0.0.1]:37278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhZF1-0000Aa-Fu for ged-emacs-devel@m.gmane.org; Wed, 11 Mar 2009 20:57:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhZEw-0000AQ-Un for emacs-devel@gnu.org; Wed, 11 Mar 2009 20:57:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhZEu-00009M-Ch for emacs-devel@gnu.org; Wed, 11 Mar 2009 20:57:38 -0400 Original-Received: from [199.232.76.173] (port=52637 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhZEu-000097-9B for emacs-devel@gnu.org; Wed, 11 Mar 2009 20:57:36 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:52063) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhZEq-0002b3-W4; Wed, 11 Mar 2009 20:57:33 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n2C0vVq0011902; Thu, 12 Mar 2009 09:57:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n2C0vVSH010178; Thu, 12 Mar 2009 09:57:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id n2C0vUnJ004827; Thu, 12 Mar 2009 09:57:30 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LhZEz-0005Zy-B5; Thu, 12 Mar 2009 09:57:41 +0900 In-reply-to: <87ljrcb23h.fsf@catnip.gol.com> (message from Miles Bader on Wed, 11 Mar 2009 22:50:26 +0900) 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:109574 Archived-At: In article <87ljrcb23h.fsf@catnip.gol.com>, Miles Bader writes: > 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 I wrote in the previous mail, the right way to get the fontset of the current frame is: (face-attribute 'default :fontset) > The intent is to use the font "Droid Sans Fallback" to render anything > that the default font can't (the default font is "Droid Sans Mono", so > they're matched in style etc); "Droid Sans Fallback" contains things > like CJK characters. If I don't do this, then emacs tends to pick > various random fonts for CJK characters (e.g., Sazanami for japanese). Then, you can simply modify the default fontset as this: (set-fontset-font "fontset-default" 'unicode "Droid Sans Fallback" nil 'prepend) The reason for `prepend' is not to loose the original useful setting for characters not in "Droid Sans Fallback". In article <87d4coazzf.fsf@catnip.gol.com>, Miles Bader writes: > Hmm, it seems that I can use `t' as the fontset-name to get the effect I > want; this doesn't seem to be mentioned in the docstring: > (set-fontset-font t 'unicode "Droid Sans Fallback") Here `t' is the same as "fontset-default". This facility is kept just for backward compatibility. --- Kenichi Handa handa@m17n.org