SVG font family selection - browser

We are using Myriad Pro in an SVG file which is output from Adobe Illustrator. If we use Myriad Pro and set it to Italic in the Illustrator file, the SVG output sets the font-family name of a text element to 'MyriadPro-IT', the filename of the font file, instead of <text font-family='Myriad Pro' font-style='italic'>Hello World</text>.
Any ideas of either having browsers understand that the font-family is a file name on the local system (or... sub font? Not familiar with the terminology here).
Thanks!

Related

SVG exported from Inkscape are rendered with different font

I have opened a pdf with Inkscape and exported it in Plain SVG. However, when I open it in any browser the text is rendered with a different font.
This happens because the font-family property in the SVG file might be set to a font that is not installed on the system. In my case it was DejaVuSans.
You should open the SVG file in a text editor and replace all font-family:DejaVuSans with for example font-family:Arial.

How to edit the text of a SVG file?

I want to translate the labels of a wikimedia Commons SVG file. After opening a SVG file in a Geany text editor, i do search and replace option for put the translations. In this case, i cant find relaxant text? But there is text Id only as below. How can i find the text?
Examples for SVG files:-
1) code with text from the this file
<text x="-34.614517" y="314.04907" transform="matrix(0.90850818,-0.41786707,0.41786707,0.90850818,0,0)"><tspan style="font-size:108px;fill:#ff0000;font-family:Courier">FIRED!</tspan></text>
2) code without text from the mentioned SVG file link:
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:justify;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="523.21991"
y="135.43217"
id="text3578"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3582" /></text>
As Robert Longson mentions there is no text.
All elements are drawn:
If you open the .SVG file with Inkscape you will be able to see all objects

In Illustrator CC, how can I export an SVG path laid down with the brush tool as that path

In Illustrator CC, how can I export an SVG path laid down with the brush tool as that path with a stroke, instead of it automatically replacing it with a fill?
For whatever reason, when I export a path that was drawn with the brush tool (no fill and some colored stroke), the resulting SVG has changed the path to an outline of the path, and then it changed my stroke property to a fill.
This doesn't happen when I export a path that was created with the pen tool.
Any ideas?
EDIT: I am trying to export a path with variable width that was created using a pressure-sensitive wacom tablet. I think what I am trying to do isn't really possible with the current SVG spec. Right?
There's no variable width paths in SVG 1.1 although I believe tapered stroke has been mooted for SVG 2.0.
Also ensure 'Align Stroke' is set to 'Center' in the 'Stroke' panel otherwise it will be converted to a fill.

Possible to take a svg made in illustrator and turn it into a raphael path to then animate?

Would like to take my logo made in illustrator then turn it into a svg so that i can then use Raphael to animate it. I know how to make a simple image by creating my own path using lineTo.
Didn't know if this is possible or not.
Thank you
Once you save your logo created with Illustrator as svg file, there is a way to convert the SVG into a Raphael object and then you can use it with Raphael library.
Chack out this website: http://irunmywebsite.com/raphael/SVGTOHTML_LIVE.php
If you can, open the page with Firefox. Chrome messes up the page. Good Luck.
Well, if its just the path you need without the colors, stroke widths etc, i would save the illustrator logo as an SVG and then open it with a text editor(say Notepad).
From there i would extract the d attribute as a path and manually add the rest of its ''features'' like colors,stroke widths etc.

Using SVG font in <mask>

I have an SVG file that was generated by Illustrator that I have modified slightly, so that I can use it as a mask on both Webkit and Gecko.
The file has the glyphs I need stored in <font> with a defined font-family. Right after there is a <text> element. This is what Webkit uses directly to create the mask. The font-family value correlates to the defined font and it renders correctly.
Then I have a <mask> element (because Firefox can only use that) with the same <text> element inside of it. It renders, but for some reason the font-family that is being declared won't work. I feel like this is something simple but I have very little experience with SVG (though now I know a hell of a lot more than I did!)
Basically how do I get the element inside mask to be able to reach the <font> element?
Firefox does not support SVG fonts. Convert the SVG font to a woff font by using something like this.

Resources