emacs-devel
[Top][All Lists]
Advanced

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

Re: Feature request: dimensions of propertized string


From: David O'Toole
Subject: Re: Feature request: dimensions of propertized string
Date: Sun, 10 Feb 2008 08:33:36 -0500

I also like the idea of a function that will tell you how long a
string is supposed to be. I'm working on my spreadsheet display mode,
and this would really help for those times when a spreadsheet cell
contains both images and text.

On Feb 10, 2008 8:16 AM, David Reitter <address@hidden> wrote:
> Can I make a request for a feature here?
>
> I'd like a function hat, given a propertized string and a frame, tells
> me what the dimensions (in particular pixel width) of that string are
> if it was rendered in that frame.
>
> I've needed this several times when trying to figure out where best to
> wrap text when proportional fonts are used.
>
> A few days ago I asked for a "font-variable-width-p" function in
> gnu.emacs.help and didn't get a reply, and I think such a function can
> be constructed easily once I know the dimensions of a propertized
> string.
>
>
>
> ===
>
> I'm trying to figure out whether a given face (the default face in a
> frame, to be precise) uses a variable width font, but I can't find an
> appropriate function in Emacs.
> One could compare the pixel widths of 'w' and 'i', but I can't find a
> function that would give me the pixel width of a (propertized) string,
> either.
>
> Any suggestions?
>
>
>




reply via email to

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