Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SVG Fonts

Status
Not open for further replies.

martinm

IS-IT--Management
Mar 30, 2001
113
GB
Not sure if this is the right forum, but seems to be the closest! I have some Javascript produced SVG that works fine.

However, I need to create some text in Red - the text is usually white on a black b/g, or black on a white b/g depending on the config. I can create the red text, but it seems to be drawn as a 'graphic' rather than text if you follow! As such is is slightly chunkier, badly anti-aliased etc. and I'm getting complaints....

Hopefully I'm doing something basically wrong that is easily fixed. Code below (note commented lines were added to try and fix the problem)

myClab = mySvgDocument.getElementById(icao + "clab");
.
.
.
myClab.setAttribute("stroke", "red");
// myClab.setAttribute("font-size", "8pt");
// myClab.setAttribute("font-style", "lighter");
// myClab.setAttribute("font-family", "arial");


The attached pic is from IE8/SVGViewer

svgfont.jpg


Ta.
 
OK - I think the problem is I need to use fill not stroke, but it doesn't work.

myClab.setAttribute("fill", "red");


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top