[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: |
Wed, 28 Jan 2015 17:27:13 +0200 |
> From: Lars Ingebrigtsen <address@hidden>
> Date: Wed, 28 Jan 2015 14:27:17 +1100
>
> shr needs three functions to be kind-of fast to work:
>
> 1) A pixel equivalent of `current-column'
You already have it:
(car (nth 2 (posn-at-point)))
> 2) A pixel equivalent of `move-to-column' (which will be imprecise, of
> course, but that's OK)
You already have it (albeit not necessarily where you'd look ;-):
(vertical-motion (cons (/ PIXELS (frame-char-width)) 0))
> 3) A pixel equivalent of `string-width'
Didn't we just go through using font-get-glyphs for that?
Or just insert the string into the current buffer and use
posn-at-point to see how many pixels it took.
Do the above fix your problems?
- Re: Pixel-based display functions, (continued)
- Re: Pixel-based display functions, Alexis, 2015/01/31
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/31
- Re: Pixel-based display functions, Artur Malabarba, 2015/01/31
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/31
- Re: Pixel-based display functions, Stephen J. Turnbull, 2015/01/31
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/31
- Re: Pixel-based display functions,
Eli Zaretskii <=
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/28