[Top][All Lists]

[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 11:10:06 +0200

> From: Lars Ingebrigtsen <address@hidden>
> Cc: address@hidden
> Date: Fri, 30 Jan 2015 18:27:23 +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.
> The face doesn't say what font is going to be used.  If I put 日本語
> here, the entire preceding line has the same face, but two different
> fonts.

Then check the 'charset' text property as well.

> If you have a handy function that can segment lines according to font
> (even though it can't say what the font is (yet)), that would be useful.
> If I could (on the first line there) just call `font-at' twice, I think
> that would allow me to write an algorithm that should be fast enough.

I think face and charset are what you want.

reply via email to

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