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

Text Background

From: Joe Mihalich <jmihalich@questerra.com>
Date: Fri, 15 Mar 2002 14:58:07 -0800
Message-ID: <216721AF00B3E7459DCA564C77D4FF100D3DAC@qtcaex01.questerra.com>
To: <www-svg@w3.org>


	Hi,

	Does anyone know to accurately have a <text> object
	Have a colored background fill?

	I do not see any attributes that allow you to specify
	that you want a fill behind the text (a solid colored
	rectangle that completely surrounds the text).

	Right now, I have to calculate what I think the rect should
	Be in an active-x control based on the font metrics of
	The font selected. I then draw a <rect> with the coordinates
	Of the rect I calculated, and then I draw the <text> object
after that 	and Specify the "textLength" to the rectangle's width,
and the
	And the lengthAdjust to "spacingAndGlyphs".

	It seems kind of "hacky" to me, but it works.

	Is there a better/easier way?

	Thanks
	Joe
Received on Friday, 15 March 2002 17:58:37 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:21 GMT