Subject: Re: bug#32159: 26.1; inhibit-compacting-font-caches does not fix all fonts lagging issue

From: Moses <[email-masked]>
Date: Tue, 17 Jul 2018 10:13:05 +0800

On Mon, Jul 16, 2018 at 10:22 PM Eli Zaretskii <[email-masked]> wrote:
> Fontset customization is not just for "hanging", it's for any
> situation where Emacs chooses a font that you don't like for some
> reason, and you want it to choose another one.  It also helps to speed
> up the search for fonts.  For example, the following setup speeds up
> the initial display of HELLO by a factor of 5, from about 20 sec to
> just 4:
>
>   (set-fontset-font "fontset-default" 'gujarati '("Shruti" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'devanagari '("Mangal" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'kannada '("Tunga" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'malayalam '("Kartika" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'oriya '("Kalinga" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'sinhala '("Iskoola Pota" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'tamil '("Latha" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'telugu '("Gautami" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'tibetan '("Microsoft Himalaya" . "iso10646-1"))
>   (set-fontset-font "fontset-default" 'burmese nil)
>
> The fonts mentioned above are those available OOTB on a Windows
> machine I have here; yours may be different.  I collected them using
> "C-u C-x =" for characters whose presence makes display of HELLO
> significantly slower.  If you don't have a font available for some
> script and/or don't want that script's characters displayed, you can
> replace the last argument of 'set-fontset-font' with nil, like I did
> for 'burmese'.  (You can also use ranges of codepoints instead of
> script symbols; see the doc string of 'set-fontset-font'.)
>
> The script of a character is also shown by "C-u C-x =".

How to get the correct second argument (script name?) and also the
"iso10646-1" (encoding name?)? I do not find it in C-u C-x = and the
manual is not very clear about that. Anyway, why Emacs can not
generate a "suggestion" of set-fontset-font in the first place and
tell user to add it into .emacs? That would be very helpful.