Menu

#203 encoding problem with latex fonts

fig2dev
open
nobody
None
2026-04-06
2026-03-23
No

I received the following bug report in Debian https://bugs.debian.org/1131602:


Reported by: Manuel Bilderbeek manuel.bilderbeek@gmail.com

I have the attached minimal fig file.

When I use fig2dev to convert it to PDF, the accent in the word "Lèghe" is wrongly rendered as ˆ¤. (fig2dev -L pdf minimal.fig > minimal.pdf)
The file is in UTF-8 and so is my locale.

This does not happen if I change the line to the commented out line, i.e. when I use a similar PostScript font. Moreover, it also doesn't happen if I leave the first line in!
Anyway, I had a drawing with LaTeX fonts and such an accent and it rendered wrongly.

I would expect both LaTex and PostScript fonts to render correctly in the PDF.

My workaround was to use a PostScript font instead (Helvetica instead of Sans-Serif).


I can confirm the observations. With PS/Helvetica (commented line in minimal.fig) the PDF output looks okay, while with LaTeX/SansSerif the PDF output is broken.

1 Attachments

Discussion

  • tkl

    tkl - 2026-03-25

    This is a bug, and unfortunately there is not an easy workaround. In the eps/ps file fig2dev produces, a composite font "AvantGarde-Book-UTF-8" is defined, but later "Helvetica-UTF-8" is searched. The workaround would be to create a eps file with fig2dev, change the "AvantGarde-Book" (two-times) to "Helvetica" in the eps file and then convert to pdf. Fig2dev must be patched. The other workaround, of course, is to change latex-fonts to ps-fonts in the fig file.

     
  • tkl

    tkl - 2026-04-06

    Should be fixed with commit [4221b5].

     

    Related

    Commit: [4221b5]


Log in to post a comment.

MongoDB Logo MongoDB