From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kai Ma Newsgroups: gmane.emacs.bugs Subject: bug#71454: 30.0.50; Performance issues with font selection Date: Mon, 10 Jun 2024 14:34:42 +0200 Message-ID: References: <864ja19fhy.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_9CBA96E5-C9CE-4A82-9857-D001026F06EB" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28623"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71454@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 14:37:05 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sGeGl-0007C2-Dt for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 14:37:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGeGX-0004PD-Rf; Mon, 10 Jun 2024 08:36:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGeGU-0004OY-B1 for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 08:36:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGeGU-0000OE-3U for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 08:36:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGeGk-0004JG-Fq for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 08:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kai Ma Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Jun 2024 12:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71454 X-GNU-PR-Package: emacs Original-Received: via spool by 71454-submit@debbugs.gnu.org id=B71454.171802298116462 (code B ref 71454); Mon, 10 Jun 2024 12:37:02 +0000 Original-Received: (at 71454) by debbugs.gnu.org; 10 Jun 2024 12:36:21 +0000 Original-Received: from localhost ([127.0.0.1]:59470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGeG4-0004HQ-VD for submit@debbugs.gnu.org; Mon, 10 Jun 2024 08:36:21 -0400 Original-Received: from mail-ej1-f67.google.com ([209.85.218.67]:59607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGeG2-0004Gz-2u for 71454@debbugs.gnu.org; Mon, 10 Jun 2024 08:36:19 -0400 Original-Received: by mail-ej1-f67.google.com with SMTP id a640c23a62f3a-a6f04afcce1so209466366b.2 for <71454@debbugs.gnu.org>; Mon, 10 Jun 2024 05:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718022894; x=1718627694; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=uY8c+kJcX6rJ61XWoqQid7WcPW2tWsVjC8ed30CfbYA=; b=cT7BHrCImX9qmxcpLd/kPabVEanDMcKyzzPPoFTDD/laY6bcSDItm2HKpjGr96ri/y SKt8hHMU7VUmmqVrayct/0+fkNSbEvCKivNPC2BF2KzVXEgcNdz1cfiT0AY/LPTsrBB6 UY9S9g29Os2gLvtUxEqIECg/00Jum7qUsEga2c5wOwoY7DtgYUSX3+iEb52XtOJ36zC7 qXUM198Cc9heDOCNtObWKIYWr1pJpTk1g9ks1eTFfPsh05QllDskD5w4al/g5phYdOnp exzwVYWeqaKUOXx7PVkV3dTroMScYvqpuLmcBunXFFC1UFAOr2IUR+aTv6Ra5Zv4GE+s /A6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718022894; x=1718627694; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uY8c+kJcX6rJ61XWoqQid7WcPW2tWsVjC8ed30CfbYA=; b=ulJvGJN/oX+Y+B/MH4yyFjsCtDHnayS5mBOd30mt8W9e6/fQOBiFsR1cGx570usv5a m+jWvsOhbuXn8m4I7k/tZLkH3RLLSKP5FJt70+W+V9a9WTY1p7REJUzgDu+axhimwvM3 nmHIQdQBEhhS0AJpYCZAFnnrFLXprRVcqI2umq7BesnPFLI7K6WIUnhxMUZrLZTLtMdV 5GEbUqzw1dt+s5bQTx+EGrM43ElEjuIDsNkhdvhPY1flgCkOjVfSgnObbU1ri5nReqCm /sbtkEaX9udS/SADtNsO7UCxNh5EABCn6wVeSRBfFJZFS7kLtGMsMpD4I5f0lyTLBfKd TYVA== X-Gm-Message-State: AOJu0YxswT7Ntp7B0gqMQ4v0oeJng43h3tvUkFK3Sst6LZJiSSbCJeEU V0jWVkyQWHDKerBNJP4r7l8fDa8k+ap1SwNf3PrsEQRdfj2tD2QL X-Google-Smtp-Source: AGHT+IEUVzWC8O1nDbH6YoEnN1dgRHenOirmR3HHfLwEYXZ/8V/DOhb/MaRVL7mdP/4S7DJq3q8jmg== X-Received: by 2002:a17:906:c7d8:b0:a6f:2d9a:c956 with SMTP id a640c23a62f3a-a6f2d9acbf2mr66683466b.3.1718022893810; Mon, 10 Jun 2024 05:34:53 -0700 (PDT) Original-Received: from smtpclient.apple ([2a02:2454:c02f:2500:548a:4575:d560:48ed]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f2f80d5dfsm21347866b.115.2024.06.10.05.34.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2024 05:34:53 -0700 (PDT) In-Reply-To: <864ja19fhy.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.500.171.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287028 Archived-At: --Apple-Mail=_9CBA96E5-C9CE-4A82-9857-D001026F06EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 10, 2024, at 13:58, Eli Zaretskii wrote: >=20 >> From: Kai Ma >> Date: Sun, 9 Jun 2024 20:56:47 +0200 >>=20 >> I have currently (length (font-family-list)) =3D 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. >=20 > FTR, I have 553 font families, and I see no significant delay when > pasting the characters you show. >=20 >> 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. >=20 > 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, =E3=80=A1=E3=80=A2=E3=80=A3=E3=80=A4=E3=80=A5=E3=80=A6=E3=80=A8= =E3=80=A9=E3=80=B8=E3=80=B9=E3=80=BA belongs to cjk-misc script, and I = have to specify a font for it to avoid delays. --Apple-Mail=_9CBA96E5-C9CE-4A82-9857-D001026F06EB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jun 10, 2024, at 13:58, Eli Zaretskii = <eliz@gnu.org> wrote:

From: Kai Ma <justksqsf@gmail.com>
Date: Sun, 9 = Jun 2024 20:56:47 +0200

I have currently (length = (font-family-list)) =3D 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, =E3=80=A1=E3=80=A2=E3=80=A3=E3=80=A4= =E3=80=A5=E3=80=A6=E3=80=A8=E3=80=A9=E3=80=B8=E3=80=B9=E3=80=BA belongs = to cjk-misc script, and I have to specify a font for it to avoid = delays.

= --Apple-Mail=_9CBA96E5-C9CE-4A82-9857-D001026F06EB--