From: Kenichi Handa <handa@m17n.org>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: fontset/font change
Date: Thu, 12 Mar 2009 09:57:41 +0900 [thread overview]
Message-ID: <E1LhZEz-0005Zy-B5@etlken> (raw)
In-Reply-To: <87ljrcb23h.fsf@catnip.gol.com> (message from Miles Bader on Wed, 11 Mar 2009 22:50:26 +0900)
In article <87ljrcb23h.fsf@catnip.gol.com>, Miles Bader <miles@gnu.org> 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
<miles@gnu.org> 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
next prev parent reply other threads:[~2009-03-12 0:57 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
2009-03-12 13:19 ` Jason Rumney
2009-03-13 5:18 ` Kenichi Handa
2009-03-12 0:57 ` Kenichi Handa [this message]
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=E1LhZEz-0005Zy-B5@etlken \
--to=handa@m17n.org \
--cc=emacs-devel@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).