1

I have a bunch of SVG files that were created by MagicDraw. In these files, I have several font definitions, e.g.,

<text x="152" space="preserve" font-size="11" y="376.958"
   clip-path="url(#clipPath2)" stroke="none">
   MyClassName</text>

So it is clearly defined that the font size should be 11px. However, when I open the file in Illustrator CS6, the font size is now 8,25. How can I fix this?

Thank you!

6
  • 2
    Have you tried adding the units in? i.e.: font-size="11pt" or compared with a file that works to see what might be different?
    – curious
    Commented Jun 17, 2014 at 12:13
  • 1
    Another place to look - are there any elements or groups the text is in that have a transform? Could be, it's reading the size as 11, then scaling it by 75% because of something elsewhere Commented Jun 17, 2014 at 14:29
  • @Emilie I opened the file with the text editor and added the units, but same result.
    – strauberry
    Commented Jun 17, 2014 at 15:24
  • have you tried selecting the right unit of measure when you are creating the new file in illustrator? maybe that's why it's not working, since from what I read here: w3.org/TR/SVG/text.html#FontSizeProperty the font-size seems to inherit the unit of the file it's pasted (if I understood correctly)
    – tomtomtom
    Commented Jun 18, 2014 at 10:43
  • strauberry: How about adding a link to an example SVG that has this problem? Or, making the simplest possible SVG that has this problem, then posting the code in your question? Commented Jun 23, 2014 at 10:18

1 Answer 1

3
+50

11px equates to roughly 8.25pt - I reckon you've got your Illustrator Units set to pt but expecting it to read the px value.

To change the units Illustrator uses for type go the Edit Menu > Preferences > Units and changed the Type dropdown to Pixels.

2
  • Or just change the number in the svg file.
    – Daniel
    Commented Jun 23, 2014 at 14:22
  • That's definitely an option, although it probably makes more sense to work with a single unit of measure where possible, it saves having to do annoying conversions! Commented Jun 23, 2014 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.