Print Logo

Changing Fonts Globally With XFIG




<<  <   >  >>

One feature that many drawing programs have is the ability to edit properties globally after the fact. I have not found a way to do this with XFIG via the GUI. Now, the XFIG format is all plain text, so it is possible to do global changes with a text editor.

Here is an example of the old font size and new font size from a circuit I'm working on at Coprolite.com. At certain zoom settings the pin numbers are too large. Pin 35 is TimesRoman 15, and pin 38 is TimesRoman 14. I have *a lot* of pins that I want to change this on.

Here is a snippit of the FIG file that shows how the fonts are set. Now, if we edit this with vi, we can just do a substitution:

:%s/15 0.0000/14 0.0000/
Presto chango, we have changed 243 instances of the font. Here is an example of the fixed schematic. Of course, the search pattern may be different. I'm relying on the 0.0000, which consistently signifies the text I want to modify in my drawing.



This article comes from Xfig:
http://xfig.org/

The URL for this story is:
http://xfig.org/art5.html

Copyright 1999-2006 Xfig.org. Read our Terms of Use.