emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: set-fontset-font is slow if the fontset is specified by a long name


From: YAMAMOTO Mitsuharu
Subject: Re: set-fontset-font is slow if the fontset is specified by a long name
Date: Mon, 25 Oct 2004 20:11:35 +0900
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 25 Oct 2004 16:25:16 +0900 (JST), Kenichi Handa <address@hidden> 
>>>>> said:

>> How about consulting Vfontset_table literally before doing regexp
>> matches?

> Such a change may make what matches with NAME different from the
> current code (though only in vary rare case such as you have a
> fontset "-adove-courier-*-*-*-*-*-*-*-*-*-*-fontset-default").

So a fontset is always specified indirectly, via pattern or alias,
then.

>> The scenario I'm considering is something like the following:

>> (let ((fontset (create-fontset-from-ascii-font "7x14")))
>>   (while ...
>>     (set-fontset-font fontset ...)
>>     ...)
>>   (set-frame-font fontset))

> Isn't the latest code fast enough?

Yes, it's way faster now.  Thanks.

Before your change, I've used short names to avoid the slow execution
of set-fontset-font:

   (if (not (string-match "^fontset-" fontset))
       (setq fontset
             (concat "fontset-" (aref (x-decompose-font-name fontset)
                                      xlfd-regexp-encoding-subnum))))

I thought this might specify another fontset that has the same alias
entry, and the long format could identify the fontset directly.

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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