Craig Marshall

Replace Font inkscape extension

with 2 comments

Here’s another simple inkscape extension quickly following the previous one. It was inspired by someone on #inkscape wanting a way to replace fonts drawing-wide without it affecting the other styling on the text elements, such as boldface and italics.

It’s probably very rough and ready at the moment, but it should be useful.  I plan to change the way the actual font is replaced, because it’s conceivable that it could break as is, but I haven’t had it do so.

Leave me some feedback if you have any problems. Once it’s had a fair bit of testing, I might try to get this one entered into the inkscape repository too.

So – here’s how you use it:

  1. Download the latest replace_font version and unzip it into your inkscape extensions directory
  2. Open your drawing in inkscape, preferably one that has some text elements, of course.
  3. Select Text->Replace Font from the Extensions menu
  4. Enter the font name that you want to find, e.g. Calibri or Times New Roman
  5. Enter the font name that you’d like to replace it with, e.g. Sans or Helvetica
  6. Press Apply

Enjoy!

Edit:

There were a few bug in this extension, as pointed out by su-v from #inkscape:

  1. Not all fonts were being replaced, because sometimes the font styling was attached to a text element, not a tspan.
  2. tspan elements without style attributes were causing the extension to crash
  3. Some fonts (such as Arial Narrow) were being incorrectly (partially) replaced by searches such as “Arial”.
  4. Fonts in flowed text regions weren’t being replaced at all.

The link above in the original instructions has been updated to point to a new zip file including a fixed version of the extension, along with a couple of new features. Please let me know if you run into any other bugs!

Written by craig

August 17th, 2010 at 1:56 pm

2 Responses to 'Replace Font inkscape extension'

Subscribe to comments with RSS or TrackBack to 'Replace Font inkscape extension'.

  1. Hi-

    http://www.craigmarshall.org/uploads/replace_font.zip works rather than your link.

    Could it act only on the active selection rather than the entire document?

    -Rob A>

    Rob A

    19 Aug 10 at 17:25

  2. Thanks Rob,

    I’ve updated that link now.

    It could indeed work only on the active selection. I have a few more changes (bugfixes) to roll into the next version too. I’ll add the active selection request to that list.

    Thanks for the interest.

    craig

    19 Aug 10 at 17:50

Leave a Reply