I've been using a filter for my text halos and it's been great. As IE9 doesn't support filters, I need an alternative. Holger's method doesn't seem to work in IE9. Are there any other workarounds for this?
--- In [email protected], Holger Will <hol...@...> wrote: > > hi > > here is another method, using tref: > > <?xml version="1.0"?> > <svg xmlns="http://www.w3.org/2000/svg" > xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500"> > <defs> > <text id="mel">Mellomveien</text> > </defs> > <rect x="46" y="51" width="241" height="188" > style="fill:rgb(242,172,190);stroke:rgb(0,0,0);stroke-width:1"/> > <text x="160px" y="181px" > style="fill:rgb(0,0,0);font-family:Arial;font-size:11;"> > <tspan style="stroke:#ffffff;stroke-width:2"><tref > xlink:href="#mel"/></tspan> > <tspan x="160px" ><tref xlink:href="#mel"/></tspan> > </text> > </svg> > > have fun > holger > > scalablev wrote: > > > > > Thanks Kirby and Doug! > > > > This is something I can use. > > > > > > > > --- In [email protected], "Doug Schepers" <d...@s...> > > wrote: > > > Nice work, Kirby. > > > > > > If they don't want the outline to be blurry, they can just do this: > > > > > > <filter id='halo' filterUnits='objectBoundingBox' > > > x='-15%' y='-15%' width='130%' height='130%'> > > > <feColorMatrix in='SourceAlpha' result='white' type='matrix' > > > values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/> > > > <feMorphology in='white' radius='1,1' operator='dilate' > > > result='outline'/> > > > <feComposite in='SourceGraphic' in2='outline'/> > > > </filter> > > > > > > In general, though, filters are not well support across viewers, > > and are > > > rather expensive to do. If they has a large number of text nodes, > > it might > > > cause a problem. Still, this may well be just what they need. > > > > > > Regards- > > > Doug > > > > > > skatethere wrote: > > > | > > > | > > > | --- In [email protected], "scalablev" <o...@n...> > > wrote: > > > | > > > > | > Hi! > > > | > > > > | > I want to display text with a small white line around it, > > > | like this: > > > | > http://kart.nois.no/test/svgtext/text.gif. > > > | > > > > | > Stroking the text seems to obscure the text itself. I'm not > > getting > > > | > exactly what I want with a filter either: > > > | > http://kart.nois.no/test/svgtext/text.svg > > > | > > > > | > Any suggestions? > > > | > > > | Have you tried using filters, like this: > > > | > > > | <?xml version="1.0"?> > > > | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" > > > | "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> > > > | <svg width="100%" height="100%" viewBox="0 0 200 120" > > > | xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> > > > | <filter id="halo" filterUnits="objectBoundingBox"> > > > | <feColorMatrix in="SourceAlpha" result="white" type="matrix" > > > | values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/> > > > | <feMorphology result="offset" in="white" radius="2,1" > > > | operator="dilate"/> > > > | <feGaussianBlur in="offset" stdDeviation=".7" result="blur"/> > > > | <feComposite in="SourceGraphic" in2="blur" result="comp" > > > | operator="over"/> > > > | </filter> > > > | </defs> > > > | <rect x="0" y="0" width="200" height="120" fill="red"/> <text > > > | x="0" y="20" font-size="14" fill="black" > > > | filter="url(#halo)">Mellomveien</text> > > > | </svg> > > > | > > > | --kirby > > > > > ------------------------------------ ----- 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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> 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/

