W3C home > Mailing lists > Public > www-svg@w3.org > November 2002

Re: General Text Metrics Requirement

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Wed, 20 Nov 2002 23:59:05 +0100
Message-ID: <3DDC13B9.7070106@pinkjuice.com>
To: "'www-svg@w3.org'" <www-svg@w3.org>
CC: "Kanaskie, Kurt A (Kurt)" <kkanaskie@lucent.com>

Kanaskie, Kurt A (Kurt) wrote:

 > Thanks Allen for the suggestions on fixed width font, that should
 > suffice for my application.
 > The suggestion to use a buffered image reminds me of my X11
 > programming days, where the solution is to query the Graphics
 > Context for things like stringLength(). I started down that path
 > with XSLT, DOM, etc., but it seemed like a long hike with lots of
 > side trails.

There might be machines without any monospace fonts, so you could embed 
one, as in
I don't do line-wrapping there, but I can know exactly how many 
characters fit on one line, and put ... at the end if it's longer. 
Line-wrapping could be done quite easily, if monospace is OK (you also 
don't miss hinting which SVG Font doesn't have).

Another way, allowing for variable width fonts, might be to use


<glyph [...] horiz-adv-x="410"

eg for each character, get the horiz-adv-x of the glyph, etc.


Received on Wednesday, 20 November 2002 17:59:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:54 UTC