Hints on the pstoedit FIG driver

This page is part of the XFig, FIG and associated software site.

  1. Problem: Very intricate PostScript files lose their detail when converted to FIG format via pstoedit.
    Analysis: There seem to be two contributing factors:
    1. xfig lines are a minimum of one old unit (1/80 inches) in width
    2. pstoedit uses an internal resolution of 72 dpi
    Solution: What I did to get around this problem:
    1. add the line:
      20 20 scale
      to the PostScript file, near the top. This scales the PostScript file by a factor of 20.
    2. run pstoedit with the following arguments:
      -dis -r1200x1200 -f fig
      this increases the resolution to 1200 dpi
    3. run xfig. When exporting the figure, use a magnification of 5% (i.e. 1/20). Note that xfig will need to shift the figure down on the page.
    You might want to try other scaling factors to suit your own needs. (I picked 20 because it was somewhat convenient - 10 might be better for editing in xfig.)
    Thanks to: Fulko van Westrenen

  2. Problem: Text rendered as polygons (with the -dt switch) doesn't show "holes". For example, "P" looks like a lump at the top of a stick.
    Analysis: PostScript allows polygons to have "holes" when it uses "fill" or "eofill" commands, which are used when text is "drawn". Fig does not do this (nor do many other formats), and draws this as two (or more) polygons, all filled with the same colour.
    Solution: This has been fixed in 3.11 of pstoedit, with the new "-ssp" option.
    There are a couple of workarounds for those using older versions:
    1. Use text rather than polygons for drawing text. It may not give you the effects that you want, but it will render correctly.
    2. Edit the "inner" polygon(s) and set the fill colour to the "background" value.
    Thanks to: Peter Roosen

Ian MacPhedran