[Top][All Lists]

[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: Tue, 10 Jun 2003 11:16:18 +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)

I'm very sorry for this late response.

In article <address@hidden>, Oliver Scholz <address@hidden> writes:
> I changed my mind, while working on the customization
> stuff. I started to implement it according to your
> previous suggestions. But I realized that specifying a
> cons cell as FONTNAME argument to `set-fontset-font' does
> not seem to work with non-ASCII charsets either. I tested
> it with an Emacs without my modifications:

> (create-fontset-from-fontset-spec
> "-b&h-lucidatypewriter-medium-r-*-*-14-*-*-*-*-*-fontset-test")

> (set-face-font 'default "fontset-test")

> (set-fontset-font "fontset-test" 'latin-iso8859-1
> '("misc-fixed" . "iso8859-1"))

> Now when I type some umlauts like "äöü" Emacs still
> displays them in b&h-lucidatypewriter.

> But it works, when I specify a fontname:

> (set-fontset-font "fontset-test" 'latin-iso8859-1
> "-misc-fixed-*-iso8859-1")

> Am I missing something?

If a font name that doesn't conforms to full XLFD is
specified, the font name is used as is, otherwise, the
family field and registry field are extracted from the font
name.  In the latter case, we faces the problem of which
family to prefer, a face family (b&h-lucidatypewriter) or a
fontset family (misc-fixed).

Currently, for a character of ASCII and Latin-1, emacs
prefers a face family, and for the other chars, emacs
prefers a fontset family.  It's a very kludgy way, and
should be fixed somehow, but currently I don't have a time
to think about it and I don't remember now why the code is
like that.  :-(

Please see the code of choose_face_font and try_font_list.

In choose_face_font, if you change the call of try_font_list
as this:

  nfonts = try_font_list (f, attrs, XCAR (pattern), XCDR (pattern), &fonts,
                          SINGLE_BYTE_CHAR_P (c));

the fontset family should be prefered.  Could you please try it?

Ken'ichi HANDA

reply via email to

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