all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: help-gnu-emacs@gnu.org, Tom Roche <Tom_Roche@pobox.com>
Subject: Re: proper setting of default font (and string-handling in elisp?)
Date: Wed, 26 Aug 2009 15:45:47 +0200	[thread overview]
Message-ID: <AA0905C9-F2FB-4AC5-9DEB-DF370A09A0C0@Web.DE> (raw)
In-Reply-To: <20090826125914.5A87A1405BAA6@cedar.isis.unc.edu>


Am 26.08.2009 um 14:59 schrieb Tom Roche:

> * font syntax: how to translate the font spec format that works for
>   set-frame-font (e.g. "Courier 10 Pitch-9") to that used for
>   initial-frame-alist and default-frame-alist (e.g.
>   "fontset-10pt_lucidatypewriter")?


I've created font sets to span (almost) the whole Unicode BMP (Basic  
Multilingual Plane):

     (create-fontset-from-fontset-spec "-b&h-lucidatypewriter-medium- 
r-*-*-10-*-*-*-*-*-fontset-10pt_lucidatypewriter" t 'noerror)
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-1  '("lucidatypewriter" . "iso8859-1"))
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-2  '("lucidatypewriter" . "iso8859-2"))
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-3  '("lucidatypewriter" . "iso8859-3"))
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-4  '("lucidatypewriter" . "iso8859-4"))
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-9  '("lucidatypewriter" . "iso8859-9"))
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-14 '("lucidatypewriter" . "iso8859-14"))
	(set-fontset-font "fontset-10pt_lucidatypewriter"       'latin- 
iso8859-15 '("lucidatypewriter" . "iso8859-15"))
	(set-fontset-font "fontset-10pt_lucidatypewriter" 'mule- 
unicode-0100-24ff '("lucidatypewriter" . "iso10646-1"))
	(set-fontset-font "fontset-10pt_lucidatypewriter" 'mule- 
unicode-2500-33ff '("lucidatypewriter" . "iso10646-1"))
	(set-fontset-font "fontset-10pt_lucidatypewriter" 'mule-unicode-e000- 
ffff '("lucidatypewriter" . "iso10646-1"))
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0590) (decode-char 'ucs #x05ff)) '("bpg glaho arial" .  
"iso10646-1"))	; Hebrew
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0600) (decode-char 'ucs #x06ff)) '("bpg glaho arial" .  
"iso10646-1"))	; Arabic
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x10a0) (decode-char 'ucs #x10ff)) '("bpg glaho" .  
"iso10646-1"))	; Georgian
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x2800) (decode-char 'ucs #x28ff)) '("code2000" .  
"iso10646-1"))	; Braille
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0980) (decode-char 'ucs #x09ff)) '("bangla" . "iso10646-1"))	;  
Bengali
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0a00) (decode-char 'ucs #x0a7f)) '("code2000" .  
"iso10646-1"))	; Gurmukhi
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0a80) (decode-char 'ucs #x0aff)) '("code2000" .  
"iso10646-1"))	; Gujarati
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0b00) (decode-char 'ucs #x0b7f)) '("code2000" .  
"iso10646-1"))	; Oriya
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0b80) (decode-char 'ucs #x0bff)) '("code2000" .  
"iso10646-1"))	; Tamil
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0c00) (decode-char 'ucs #x0c7f)) '("code2000" .  
"iso10646-1"))	; Telugu
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0c80) (decode-char 'ucs #x0cff)) '("code2000" .  
"iso10646-1"))	; Kannada
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0d00) (decode-char 'ucs #x0d7f)) '("code2000" .  
"iso10646-1"))	; Malayalam
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0d80) (decode-char 'ucs #x0dff)) '("akshar unicode" .  
"iso10646-1"))	; Sinhala
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0e00) (decode-char 'ucs #x0e7f)) '("code2000" .  
"iso10646-1"))	; Thai
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0e80) (decode-char 'ucs #x0eff)) '("code2000" .  
"iso10646-1"))	; Lao
	(set-fontset-font "fontset-10pt_lucidatypewriter" (cons (decode-char  
'ucs #x0f00) (decode-char 'ucs #x0fff)) '("xtashi" . "iso10646-1"))	;  
Tibetan
(when (= 23 ETyp)	; ETyp is approximately emacs-major-version
       (set-fontset-font "fontset-10pt_lucidatypewriter" (cons  
(decode-char 'ucs #x1d400) (decode-char 'ucs #x1d7ff)) '("code2001" .  
"iso10646-1"))	; Mathe
       (set-fontset-font "fontset-10pt_lucidatypewriter" '(#x1D400 .  
#x1D7FF) (font-spec :family "Unicode Symbols") nil)
)

This font set name can also be used as an initial parameter on the  
command line or as an X resource.


	(font . tlr-default-font)

should work. By quoting the variable you make the variable's name  
(and not its contents) available.

--
Greetings

   Pete

Time is an illusion. Lunchtime, doubly so.







  reply	other threads:[~2009-08-26 13:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 12:59 proper setting of default font (and string-handling in elisp?) Tom Roche
2009-08-26 13:45 ` Peter Dyballa [this message]
     [not found] <mailman.5382.1251252804.2239.help-gnu-emacs@gnu.org>
2009-08-26  5:13 ` Xah Lee
2009-08-26  5:22   ` Xah Lee
  -- strict thread matches above, loose matches on Subject: below --
2009-08-26  2:11 Tom Roche
2009-08-26  7:44 ` Peter Dyballa

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=AA0905C9-F2FB-4AC5-9DEB-DF370A09A0C0@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=Tom_Roche@pobox.com \
    --cc=help-gnu-emacs@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 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.