help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fontsets: (was Re: query-replace?)


From: B. T. Raven
Subject: Re: fontsets: (was Re: query-replace?)
Date: Tue, 10 Jan 2006 06:12:10 GMT

"Peter Dyballa" <address@hidden> wrote in message
news:address@hidden

Am 08.01.2006 um 22:18 schrieb B. T. Raven:

> Since this font covers such a large swath of Unicode I would rather
> stick
> with the Losedows interface for now. I still don't understand fontsets
> yet. Now the dialog box shows fonts, styles, point size (8-72) and
> script
> all in one place. If I went the the fontset route and I wanted only
> sizes
> 9-12 and only four different font styles, wouldn't I have to produced
> about 16 times as much lisp code as you show above to get the same
> Unicode
> coverage?

THe font variants (italic, bold, bold-italic) are automatically
chosen, so four sets for 9, 10, 11, and 12 would suffice.

Fontsets actually are necessary when you handle texts that have more
different characters than the small MS or ISO encodings provide. Then
GNU Emacs needs to create a table that maps code points (characters)
to members in fonts (glyphs) and this choice can look ugly. You help
GNU Emacs when you construct a fontset. IMO it would be enough to
create a fontset like this for 9 pt and three others for 10, 11, and
12 pt::

     (create-fontset-from-fontset-spec "-outline-Arial Unicode MS-
normal-r-*-*-9-*-*-*-*-*-fontset-09pt_arial_UC" t 'noerror)
(set-fontset-font "fontset-09pt_arial_UC"       'latin-iso8859-1
'("Arial Unicode MS" . "iso8859-1"))
(set-fontset-font "fontset-09pt_arial_UC"       'latin-iso8859-2
'("Arial Unicode MS" . "iso8859-2"))
(set-fontset-font "fontset-09pt_arial_UC"       'latin-iso8859-4
'("Arial Unicode MS" . "iso8859-4"))
(set-fontset-font "fontset-09pt_arial_UC"    'cyrillic-iso8859-5
'("Arial Unicode MS" . "iso8859-5"))
(set-fontset-font "fontset-09pt_arial_UC"      'arabic-iso8859-6
'("Arial Unicode MS" . "iso8859-6"))
(set-fontset-font "fontset-09pt_arial_UC"       'greek-iso8859-7
'("Arial Unicode MS" . "iso8859-7"))
(set-fontset-font "fontset-09pt_arial_UC"       'latin-iso8859-8
'("Arial Unicode MS" . "iso8859-8"))
(set-fontset-font "fontset-09pt_arial_UC"       'latin-iso8859-9
'("Arial Unicode MS" . "iso8859-9"))
(set-fontset-font "fontset-09pt_arial_UC"       'latin-iso8859-13
'("Arial Unicode MS" . "iso8859-13"))
(set-fontset-font "fontset-09pt_arial_UC" 'mule-unicode-0100-24ff
'("Arial Unicode MS" . "iso10646-1"))
(set-fontset-font "fontset-09pt_arial_UC" 'mule-unicode-2500-33ff
'("Arial Unicode MS" . "iso10646-1"))
(set-fontset-font "fontset-09pt_arial_UC" 'mule-unicode-e000-ffff
'("Arial Unicode MS" . "iso10646-1"))

The example most similar to this at the Gnu Windows FAQ shows a long
string in the  (create-fontset-from-fontset-spec "....") function. Is the
above to be evaluated as 15 forms or does another paren go on the end? Is
each fontset definition in a file somewhere or does all this go into the
.emacs? Anyway, I saved it to a file.

What about Lucida Console (666 glyphs, 714 mappings)? It can display
ISO 8859-3 in X11 completely  (Arial Unicode MS has 51,180 glyphs and
38,933 mappings -- and in X11 it has an ISO 8859-3 encoding!). It's
even monospaced. There is another monospaced font on the Web: Lucida
Sans Typewriter (1,376 glyphs, 1,425 mappings). It's part of the Java
SDKs (starting with Java 1.4 the Lucida fonts were reduced in
variants, so it's worth to retrieve JDK 1.3 first and update some of
these fonts with 1.4 and/or 1.5 fonts). The JDKs too have Lucida Sans
(2,929 glyphs, 2,410 mappings).

I think Windows has those encodings too. I don't know why I can't see the
glyphs in emacs. In Eli Z.'s codepage.el the Latin-3 encoding is
associated with cp857 and I have a cp_857.nls file in \windows\system
(win98). Also, I see all the characters in your table below. I can get
them into emacs, but by a roundabout method. Describe input method
latin-3-postfix shows only empty rectangles.

Probably you need some ISO 8859-3 encoding file. *I* have no idea
where in MS Losedows this would be needed, somewhere in the machinery
that creates partial, specifically named encodings from a Unicode
encoded font? If it does not work in a *partial* encoding: would
*complete* Unicode succeed?!

This is what I think the locale file cp_857.nls does. I had to add some of
these files to get emacs i18n working to the degree I have now.

;;; -*- mode: Text; coding: utf-8; -*-

First open in ISO 8859-3, then select to save in UTF-8 -- conversion
done!

But remember that some of us are lost in Dozeland. I edit with emacs,
almost everything else is done with other programs. I can get the table
below into emacs but only by copy-pasting into Open Office and then saving
as a utf-8 encoded text file. I am in Outlook Express here. Don't know how
to use Gnus, Rmail, most other things.


http://aspell.net/charsets/, http://www.slovo.info/unifonts.htm,
http://www.cs.tut.fi/%7Ejkorpela/chars.html, http://www.topology.org/
soft/alpha.html, http://www.i18nguy.com/, http://web.archive.org/web/
20030622083607/www.diffuse.org/chars.html

Thanks for these. The i18nguy has some very implessive stuff (and useful
links). Just this one:

http://www.i18nguy.com/unicode/codepages.html

is a treasure trove.


How do you declare ISO Latin-3 or ISO 8859-3? This is meant for
Southern European, Maltese, and Esperanto Glyphs, very exotic! Or do
you live on Malta? Here is my test file for this encoding, starting
with a hint for GNU Emacs:

No, in U.S. In Eli's codepage.el this block of chars (or glyphs) is headed
by ;; Turkish. This goes with DOS code page 857.


;;; -*- mode: Text; coding: iso-8859-3; -*-
;
; Time-stamp: <2005-07-15 14:20:24 pete>
;
;   Southern European, Maltese and Esperanto Glyphs (Latin 3)
;
;   oct   dec   hex    UCS2    UTF-8
;=====================================
   = 240 = 160 = A0 = U+00A0 =    C2 A0 : NO-BREAK SPACE
Ħ = 241 = 161 = A1 = U+0126 =    C4 A6 : LATIN CAPITAL LETTER H WITH
STROKE
˘ = 242 = 162 = A2 = U+02D8 =    CB 98 : BREVE
£ = 243 = 163 = A3 = U+00A3 =    C2 A3 : POUND SIGN
¤ = 244 = 164 = A4 = U+00A4 =    C2 A4 : CURRENCY SIGN
Ĥ = 246 = 166 = A6 = U+0124 =    C4 A4 : LATIN CAPITAL LETTER H WITH
CIRCUMFLEX
§ = 247 = 167 = A7 = U+00A7 =    C2 A7 : SECTION SIGN
.
.
.
etc.

Apparently your emacs is using Unicode as its internal representation. I
can't do that with 21.3. Thanks for all the food for thought.

Ed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]