[Top][All Lists]

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

Feature request: dimensions of propertized string

From: David Reitter
Subject: Feature request: dimensions of propertized string
Date: Sun, 10 Feb 2008 13:16:54 +0000

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,

Any suggestions?

reply via email to

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