Subject: bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode characters

From: Eli Zaretskii <[email-masked]>
Date: Mon, 01 Jun 2020 18:15:32 +0300

> From: Pip Cet <[email-masked]>
> Date: Mon, 1 Jun 2020 11:44:10 +0000
> Cc: Eli Zaretskii <[email-masked]>, "Basil L. Contovounesios" <[email-masked]>, Robert Pluim <[email-masked]>, 
> 	[email-masked], James Cloos <[email-masked]>
> 
> On Mon, Jun 1, 2020 at 11:20 AM Will Bush <[email-masked]> wrote:
> > git clone https://github.com/adobe-fonts/adobe-blank.git
> > cd adobe-blank
> > sudo cp AdobeBlank.ttf /usr/share/fonts/
> > fc-cache
> > time emacs -Q --eval '(message "︵")' -kill
> >
> > And it took 4 minutes in the virtual machine!
> > Please try it and see if you can repro!
> 
> It's taking a while here (pretty standard GNU/Linux x86_64 system),
> but something on the order of 20 seconds, not 4 minutes.
> 
> in ftcrfont.c:
> 
>   pat = ftfont_entity_pattern (entity, pixel_size);
>   FcConfigSubstitute (NULL, pat, FcMatchPattern);
>   FcDefaultSubstitute (pat);
>   match = FcFontMatch (NULL, pat, &result); <===========
>   ftfont_fix_match (pat, match);
> 
> This is where it spends so much time. "perf record emacs -Q" suggests
> it's a function called FcCharSetSubtractCount. (You might try running
> that on your setup, too).

Thanks.

>From what I see in the net search, this is a very large font, created
for some very special circumstances.  Not sure we should spend time on
this issue.  Maybe submit a bug report to Fontconfig folks.