Font compatibility issue with Adobe Illustrator and MPL PDF's

I'm trying to get my pdf outputs from matplotlib to work properly in
illustrator, but keep having the issue that illustrator does not recognize
the computer modern fonts (eg. CMR10 etc). Everything else seems to work
perfectly.

I'm running matplotlib (1.1.1) in ubuntu precise, and illustrator (CS3) on
my mac. I installed the fonts-cmu package on my ubuntu machine, and I have
the cm fonts installed in illustrator (eg. cmr10 etc. as well as CMU Serif
etc). I've been using the following options in matplotlib for pdf rendering,
and haven't been able to make the fonts work in illustrator:

backend: Agg (also tried pdf)
usedistiller: xpdf
font.family: serif
font.serif: CMU Serif
text.usetex: True
text.latex.unicode: True (also tried the default)

After some searching it seemed like I should try the Pgf backend project,
which supports xelatex:
https://github.com/pwuertz

But after importing that pgf backend with:

import matplotlib as mpl
mpl.use("module://backend_pgf")

then importing matplotlib.pyplot yields this error:

from matplotlib.cbook import check_output
ImportError: cannot import name check_output

All I could find after search was that I needed python 2.7+... but I am
using python 2.7.3.

Any suggestions for how to get my matplotlib/pdf fonts to work properly in
Illustrator would be much appreciated... via whatever method is easiest!

Thanks,

- Floris

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Font-compatibility-issue-with-Adobe-Illustrator-and-MPL-PDF-s-tp38904.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Have you tried setting pdf.fonttype to "42", which will include the font verbatim rather than trying to subset it? That may help with illustrator. You may also have better luck importing an SVG into Illustrator.

Mike

···

On 09/13/2012 02:46 AM, florisvb wrote:

I'm trying to get my pdf outputs from matplotlib to work properly in
illustrator, but keep having the issue that illustrator does not recognize
the computer modern fonts (eg. CMR10 etc). Everything else seems to work
perfectly.

I'm running matplotlib (1.1.1) in ubuntu precise, and illustrator (CS3) on
my mac. I installed the fonts-cmu package on my ubuntu machine, and I have
the cm fonts installed in illustrator (eg. cmr10 etc. as well as CMU Serif
etc). I've been using the following options in matplotlib for pdf rendering,
and haven't been able to make the fonts work in illustrator:

backend: Agg (also tried pdf)
usedistiller: xpdf
font.family: serif
font.serif: CMU Serif
text.usetex: True
text.latex.unicode: True (also tried the default)

After some searching it seemed like I should try the Pgf backend project,
which supports xelatex:
pwuertz (Peter Würtz) · GitHub

But after importing that pgf backend with:

import matplotlib as mpl
mpl.use("module://backend_pgf")

then importing matplotlib.pyplot yields this error:

from matplotlib.cbook import check_output
ImportError: cannot import name check_output

All I could find after search was that I needed python 2.7+... but I am
using python 2.7.3.

Any suggestions for how to get my matplotlib/pdf fonts to work properly in
Illustrator would be much appreciated... via whatever method is easiest!

Thanks,

- Floris

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Font-compatibility-issue-with-Adobe-Illustrator-and-MPL-PDF-s-tp38904.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options