2010 changes Arial font to Calibri in SVG output

Started by dlemkuil, November 09, 2011, 01:17:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dlemkuil

Company just moved to Office 2010 including Visio. I recently opened one of my older drawings, made some changes, selected all objects and then saved as SVG. Opened the SVG in IE8 and noticed the font that was Arial was now Calibri, which is not acceptable. I opened the SVG code and saw this:

<style type="text/css">
   <![CDATA[
      .st1 {fill:none;marker-start:url(#mrkr13-4);stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}
      .st2 {fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1;stroke-width:0.33333333333333}
      .st3 {fill:none;stroke:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.48}
      .st4 {fill:#000000;font-family:Calibri;font-size:0.583328em}
      .st5 {fill:none;stroke:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}
      .st6 {fill:#000000;font-family:Calibri;font-size:0.666664em}

I noticed if I don't select objects that it will save the SVG with Arial. However, it will also save the white space above and below the objects which is not acceptable. Can anyone tell me how to change Visio so this doesn't happen? I've already tried selecting "Put all settings in windows registry" and that didn't work.
Thanks,
Dave

saveenr

Can you attach (not sure if that's possible in these forums) or send me via email (saveenr@microsoft.com) the original file. I can take a look.


Paul Herber

When you reply click the + sign underneath your reply next to the text "Attachments and other options".
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

wapperdude

This wouldn't be one of those font mapping issues, would it?  As I recall, Visio maps the font face to a number.  Case in point, Arial = 4 and Calibri = 90.  I don't believe it actually references the font face by name.  Perhaps I am wrong on this.  So, a translator program must know the correct mapping.

Just a thought.

Visio 2019 Pro

saveenr

@wrapperdude - you are correct. However it must generate a name for the font when it emits SVG. So far it seems that either Visio is either generating the incorrect fontames in SVG (which seems unlikely to be honest) or something is happening only when viewing where the font is being remapped.

@dlemkuil - you mentioned that you are opening the file in IE8. But this version of IE doesn't have native SVG viewing - the support only started with IE9. Are you using an SVG viewer plug-in of some kind in IE8?

dlemkuil

I think it's a previous version template issue, because if I copy and paste into a new blank page, it doesn't seem to have the same issue. Attached is the Visio file and an example of an SVG created with everything selected. I'm using Adobe SVG viewer to view within IE8.
Obviously, I don't want to have to copy and paste all our old Visio files into a new template (several thousand graphics), so I'm hoping to find an easy method to correct. The only way I've been able to do it so far is to crop the page size and save without selecting - still an extra step I'd like to avoid.
Thanks,
Dave

saveenr

#6
@dlemkuil

Did a bit of investigation here.

First, I tried reproducing the problem you encountered. And very similar to what you saw I noticed that the fonts in SVG are shown as Calibri. There's a slight difference in the output I get: some of the text is still shown as Arial in the SVG, but I do still see a lot of Calibri.

Then, I examined the VSD I noticed that The VSD file does not use Arial for a substantial part of the text. Many of the character regions are using "Helvetica" instead. (Probably the master shapes and styles are also using that font - I only checked the shape text)

What I believe is happening is this: when viewed in Visio the Helvetica is mapped to Arial (which most people wouldn't notice) because Helvetica is not installed.  When exported as SVG again because there is no Helvetica font installed the export uses the default Visio font of "Calibri".

Am still thinking of how you can fix all your files at once instead of one-at-a-time. If anyone has suggestions, I would like to hear them.

dlemkuil

saveenr -

Thanks for investigating! Did you ever figure out why there is different output when objects are selected vs. not selected on Save As? I found that to be "interesting" behavior. Even though I make sure all fonts in the graphic are Arial, if I select all and Save As svg, I still get Calibri substitution.

Dave

chrispitude

Ugh. I just got upgraded (not by choice) to Visio 2010, and ran into it. I too always select the objects before copying to avoid excessive whitespace margin in the SVG, and I too have run into the font mapping issue. Is there a true solution to this problem?

chrispitude

(And to add insult to injury, the reason I've had to use Arial for my diagrams is that Visio refuses to offer Helvetica as a choice, even though it is installed on my system and I can use it with no problem in other Office suite programs.)

dlemkuil

My solution has been to size the page to the graphic and then just Save As without selecting anything. To resize the page, hold the Control key down and move the cursor arrow to the edge of the page (any side) till it changes to the Resize cursor and then click and drag to the edge of the graphic.