GNU bug report logs - #71454
30.0.50; Performance issues with font selection

Previous Next

Package: emacs;

Reported by: Kai Ma <justksqsf <at> gmail.com>

Date: Sun, 9 Jun 2024 19:41:02 UTC

Severity: wishlist

Found in version 30.0.50

Full log


Message #37 received at 71454 <at> debbugs.gnu.org (full text, mbox):

From: Kai Ma <justksqsf <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71454 <at> debbugs.gnu.org
Subject: Re: bug#71454: 30.0.50; Performance issues with font selection
Date: Mon, 10 Jun 2024 14:34:42 +0200
[Message part 1 (text/plain, inline)]

> On Jun 10, 2024, at 13:58, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Kai Ma <justksqsf <at> gmail.com>
>> Date: Sun, 9 Jun 2024 20:56:47 +0200
>> 
>> I have currently (length (font-family-list)) = 582 font families
>> installed. And whenever I input some ununsual characters, Emacs will
>> freeze for seconds until I am able to do anything else.  Worse, the
>> freeze delay for each character will add up.  And whenver the face
>> changes (including hl-line-mode), or I switched to another buffer for
>> some time, there will be a delay again.
> 
> FTR, I have 553 font families, and I see no significant delay when
> pasting the characters you show.
> 
>> I'm pretty sure this is due to font selection, because Emacs won't
>> freeze if I configure manually the fallback fonts for each 'exotic'
>> script I encounter.
> 
> If this is the case, please tell the details: which fonts you need to
> configure manually to eliminate the delay.


I currently use the following config:

(set-fontset-font t 'han "PingFang TC")
(set-fontset-font t 'kana "PingFang TC")
(set-fontset-font t 'kanbun "PingFang TC")
(set-fontset-font t 'hangul "PingFang TC")
(set-fontset-font t 'cjk-misc "PingFang TC")
(set-fontset-font t 'unicode "PingFang TC" nil 'append)
(set-fontset-font t 'unicode (font-spec :family "Apple Color Emoji") nil 'prepend)
(dolist (thfont '("TH-Feon" "TH-Sy-P0" "TH-Sy-P2" "TH-Sy-P16" "TH-Tshyn-P0"))
  (set-fontset-font t 'unicode thfont nil 'append))

PingFang TC and Apple Color Emoji are built into macOS, and TH-* fonts are from the Internet to cover a majority of the Unicode code points.

For example, 〡〢〣〤〥〦〨〩〸〹〺 belongs to cjk-misc script, and I have to specify a font for it to avoid delays.

[Message part 2 (text/html, inline)]

This bug report was last modified 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.