Svg font workaround for Firefox -
i have following svg
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewbox="0 0 18 22"> <defs > <font horiz-adv-x="830" ><font-face font-family="one" units-per-em="1000" panose-1="2 0 5 3 0 0 0 0 0 0" ascent="707" descent="-48" alphabetic="0" /> <glyph unicode="e" glyph-name="e" horiz-adv-x="1038" d="m164 206t153 206t135 213t127 233v301q127 332 145 350t197 368h618q642 368 650 393q662 435 696 461t781 487q838 487 879 448t921 349q921 289 880 250t781 210q748 210 721 225t684 253t672 270q660 291 682 304q702 315 714 295q735 260 781 260q817 260 843 286t869 349q869 385 843 411t781 437q757 437 740 430t714 409t701 388t694 368q678 318 628 318h306v233q306 220 299 213t280 206t262 213t254 233v318h207q179 318 179 290v233q179 220 172 213z" /> </font> </defs> <text font-family="one" x="100" y="100">e</text> </svg>
obviously firefox has postponed svg font support indefinitely should serve differently firefox, looking svg hack allow me give ff path, , other browsers font.
the font-family attribute in svg allows list of fallback fonts, in css, use:
<text font-family="one, 'courier new', monospace" x="100" y="100">e</text>
in svg-font compatible browsers font, in others fall next 1 on list.
Comments
Post a Comment