all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: winterTTr <winterttr@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How does fontset work in emacs?
Date: Fri, 4 Jan 2013 22:31:40 +0100	[thread overview]
Message-ID: <CDA45DE2-989E-4DA9-9DD0-081F0BC15576@Web.DE> (raw)
In-Reply-To: <CA+etEW3ZkZ3fhbpiBwNQam7z=L76oRbTL_ZkRnkyCCSmax-F8w@mail.gmail.com>


Am 31.12.2012 um 03:14 schrieb winterTTr:

>   1. How to change the emacs default fontset to my own one, is it possible?

I wouldn't try that but create my own fontset – if necessary (because a good fonts service delivers what GNU Emacs requests). I created fontsets like this (and much more complicated):

    (create-fontset-from-fontset-spec "-b&h-lucida console-medium-r-*-*-9-*-*-*-*-*-fontset-09pt_lucida_console" t 'noerror)
	(set-fontset-font "fontset-09pt_lucida_console"       'latin-iso8859-1  '("lucida console" . "iso8859-1"))
	(set-fontset-font "fontset-09pt_lucida_console"       'latin-iso8859-2  '("lucida console" . "iso8859-2"))
	(set-fontset-font "fontset-09pt_lucida_console"       'latin-iso8859-3  '("lucida console" . "iso8859-3"))
	(set-fontset-font "fontset-09pt_lucida_console"       'latin-iso8859-4  '("lucida console" . "iso8859-4"))
	(set-fontset-font "fontset-09pt_lucida_console"    'cyrillic-iso8859-5  '("lucida console" . "iso8859-5"))
	(set-fontset-font "fontset-09pt_lucida_console"       'latin-iso8859-9  '("lucida console" . "iso8859-9"))
	(set-fontset-font "fontset-09pt_lucida_console"       'latin-iso8859-15 '("lucida console" . "iso8859-15"))
	(set-fontset-font "fontset-09pt_lucida_console" 'mule-unicode-0100-24ff '("lucida console" . "iso10646-1"))
	(set-fontset-font "fontset-09pt_lucida_console" 'mule-unicode-2500-33ff '("lucida console" . "iso10646-1"))
	(set-fontset-font "fontset-09pt_lucida_console" 'mule-unicode-e000-ffff '("lucida console" . "iso10646-1"))

(I now rely on font service.) When you've done that you can then use initial-frame-alist and default-frame-alist to "bind" the fontset to the frames. (I do it now like that: (font . "Lucida Sans Typewriter-8").)

>   2. Is multi fontset works at the same time or only one fontset work? Why
>   my test code need to changedefault instead of mine?

At least it worked in GNU Emacsen 22 and 23 with more than one fontset. You just have to choose one and make it active in that frame. S-down-mouse-1 (mouse-appearance-menu) will offer you a menu from which you can choose any of your defined fontsets.

>   3. The set-fontset-font second parameter is target, how can I know which
>   script name is suitable for the char under current cursor. I can use
>   describe-char to display the char information, but I don't find which
>   word in this description is the correct one for that target param.

I think the names, as based on the Character Blocks names in Unicode, are defined in the variable script-representative-chars.

>   4. Some points worthy of notice for font configuration in emacs?

Better use the well configured fonts service of your system!

--
Greetings

  Pete
                      ~  o
                       ~_\\_/\
                      ~  O   O




      reply	other threads:[~2013-01-04 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-31  2:14 How does fontset work in emacs? winterTTr
2013-01-04 21:31 ` Peter Dyballa [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CDA45DE2-989E-4DA9-9DD0-081F0BC15576@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=winterttr@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.