emacs-devel
[Top][All Lists]
Advanced

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

Re: Pixel-based display functions


From: Eli Zaretskii
Subject: Re: Pixel-based display functions
Date: Fri, 30 Jan 2015 08:52:27 +0200

> From: Lars Ingebrigtsen <address@hidden>
> Date: Fri, 30 Jan 2015 17:37:00 +1100
> 
> `font-get-glyphs' on a large region is quite fast, but since the font
> may vary, I'm calling it on a char-by-char basis, and that's s-l-o-w.

That's your problem: you should call it on a run of characters that
have the same face.  Use next-single-char-property-change to find
where such runs begin and end.

> `font-get-glyphs' returns an awful lot of data, and virtually all of it
> isn't used for doing this sort of filling, so I have a suspicion that
> I'm going to end up writing a new C-level function that just returns
> glyph widths fast.

That'd be a waste of effort, IMO.  Just do the above, and I think the
speed will be acceptable.



reply via email to

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