[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 17:28:33 +0200

> Date: Fri, 30 Jan 2015 13:56:21 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> (In the display engine, there's a thing called the "face ID" that is
> computed as part of displaying text, which takes the characters into
> consideration, which is why I suggested 'face' in the first place.
> I will try to see how to do the same in Lisp.)

Not really the same, but how about using

  (aref char-script-table (char-after POS))

to find where in the text you have characters from a different script?
If this is fast enough, it should give you a conservative estimation
of where to call font-at again.  (It's conservative because the same
font can, and usually does, cover more than a single script.)

One more issue that I think needs to be handled are characters for
which there's no font installed on the user's system.  We display them
as defined by glyphless-char-display-control.  Or maybe you should
allow the text to overflow in this case: after all, it's not really
legible, is it?

reply via email to

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