emacs-devel
[Top][All Lists]
Advanced

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

Re: Pixel-based display functions


From: Stefan Monnier
Subject: Re: Pixel-based display functions
Date: Sun, 01 Feb 2015 01:28:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Or maybe I don't understand which functions you want to expose, so
> please elaborate.

I just don't want Elisp code to compute pixel sizes based on
glyph info.  It's what the C code already does.  So whenever Elisp code
tries to do that, it's a mistake (not so much because we should do it
in C, but because we end up having to reproduce in new code what
existing code already does, which is exactly what's going on with this
whole discussion about guessing which chunks of text will use the same
font and how we should handle chars which aren't covered by the font
etc...).

IIUC in the case at hand, the function which Lars needs is slightly
different from what we already expose.  Instead of
pixel-size-of-chunk-of-text, we want to have position-of-pixel-in-text
(i.e. you pass a chunk of text, along with a pixel position, and it
returns the position of that pixel in the text).  I.e. something more
like vertical-motion (which receives a pixel horizontal coordinate and
figures out where that is in the text).


        Stefan



reply via email to

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