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

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

bug#21028: Slow font rendering in emacs


From: Eli Zaretskii
Subject: bug#21028: Slow font rendering in emacs
Date: Wed, 15 Mar 2017 17:40:17 +0200

> From: John Mastro <address@hidden>
> Date: Tue, 14 Mar 2017 13:49:59 -0700
> Cc: Eli Zaretskii <address@hidden>, Ralf Jung <address@hidden>
> 
> >   2) set up a very detailed fontset with explicit ranges of codepoints
> >      allotted to each font that supports the respective characters
> >      well and whose looks on display you like
> 
> Is it possible to get the codepoint ranges supported by a given font
> programmatically within Emacs?

Yes (although this capability doesn't seem to be exposed to Lisp as of
now).  But it's expensive when done for many fonts, because it
requires opening each such font.

> It sounds like that might help a user tell Emacs "use this font for
> everything it supports" without specifying an overly-broad target
> (like `unicode') or finding and spelling out the ranges of
> codepoints manually.

Yes, this could be a base of a useful feature.

> In other words, I'm imagining something like this:
> 
> (dolist (target (targets-supported-by-font "DejaVu Sans Mono"))
>   (set-fontset-font "fontset-default" target
>                     (font-spec :name "DejaVu Sans Mono" :registry 
> "iso10646-1")
>                     nil 'prepend))
> 
> Where `targets-supported-by-font' is the hypothetical function I'm
> imagining.

This is not suitable for running at Emacs startup time, IMO, as it
will probably slow down the startup too much.

> Apologies if this doesn't actually make sense :)

No apologies needed.  This is a complex issue, and I'm not an expert
either.





reply via email to

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