wi2fish wrote: > Hi all, > > for graphics objects I can always say "10%" if I want it to be 10% of > the screen width or height. Can I do that for text, too? > > Setting textLenght="60%" and lengthAdjust="spacingAndGlyphs" would > only stretch the text horizontally, not vertically. And it even appear > not to work in ASV (6). > > Setting font-size="80%" doesn't work either, because it is relative to > standard text size, not to screen size. > > Willem > > <?xml version="1.0" encoding="UTF-8"?> > <svg xmlns="http://www.w3.org/2000/svg" > xmlns:xlink="http://www.w3.org/1999/xlink"> > > <rect x="10%" y="10%" width="80%" height="80%" stroke="black" > fill="lightblue"/> > <text x="11%" y="50%" > font-size="80%" > textLength="78%" lengthAdjust="spacingAndGlyphs"> > Hello world > </text> > </svg>
Hi Willem if you use viewBox="0 0 100 100" you can rewrite your svg to: <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100"> <rect x="10" y="10" width="80" height="80" stroke="black" fill="lightblue"/> <text x="50" y="80" font-size="80" text-anchor="middle" textLength="78" lengthAdjust="spacingAndGlyphs"> Hello World </text> </svg> this way it works at least in Batik. hth Holger ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

