emacs-devel
[Top][All Lists]
Advanced

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

Re: `set-fontset-font' and ascii characters


From: Kenichi Handa
Subject: Re: `set-fontset-font' and ascii characters
Date: Mon, 5 May 2003 17:33:37 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Oliver Scholz <address@hidden> writes:
> I found a bug. Emacs crashes, if you evaluated the following code with
> my patch applied:

> (progn
>   (set-face-font 'default "fontset-default")
>   (set-fontset-font "fontset-default"
>                   'ascii
>                   '("helvetica" . "iso8859-1")))

> The critical fault seems to take place in `set_lface_from_font_name'
> in xfaces.c (called from `Finternal_set_lisp_face_attribute'):

>   if (fontset >= 0)
>     font_name = SDATA (fontset_ascii (fontset));

Oops.  Currently, a fontset should have a font name
(i.e. string, not cons of (FAMILY . REGISTRY)) for ascii.
So, if (FAMILY . REGISTRY) is specified, it mast be
transformed to "-FAMILY-*-REGISTRY".  If FAMILY doesn't
contain '-', "*-" must be prepended to FAMILY in advance.
If REGISTRY doesn't contain '-', "-*" must be appended to
REGISTRY in advance.

One more thing to note.  Currently all ascii characters
should have the same font in a fontset.  So, for instance,
(set-fontset-font FONTSET '(?a . ?z) FONT_NAME) must be
inhibited or treated as (set-fontset-font FONTSET 'ascii
FONT_NAME).

These are the dirty parts originating in a bad interaction
between face and fontset.  Clearing them out is in my todo
list for a long time, but I've never had time to work on it.

---
Ken'ichi HANDA
address@hidden




reply via email to

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