Type 3 fonts

Christopher Brown <c-b@...1861...> writes:

I have read a little bit online about the difference between types 1
and 3, but I can't find a description of which font is which type. So
what font should I use?

Try setting the pdf.fonttype parameter in your matplotlibrc file to 42
and see if the resulting file passes validation. Matplotlib currently
only uses TrueType fonts, which can be embedded in either Type 3 or Type
42 format. I seem to recall there was some problem with the Type 42
format so Type 3 was made the default; Michael Droettboom probably
remembers it better.

If you really need to use Type 1 fonts as opposed to TrueType, there
actually is some limited support for them in the pdf backend, currently
used only by the dviread approach to using LaTeX. You could try setting
text.usetex to True - if it works out for you, you should see Type 1 TeX
fonts in the output. If not, it will probably take a little hacking to
smuggle a Type 1 font (a pfa or pfb file) past the front end, but the
pdf backend should then embed it.

···

--
Jouni K. Sepp�nen

Jouni K. Sepp�nen wrote:

Christopher Brown <c-b@...1861...> writes:

I have read a little bit online about the difference between types 1
and 3, but I can't find a description of which font is which type. So
what font should I use?
    
Try setting the pdf.fonttype parameter in your matplotlibrc file to 42
and see if the resulting file passes validation. Matplotlib currently
only uses TrueType fonts, which can be embedded in either Type 3 or Type
42 format. I seem to recall there was some problem with the Type 42
format so Type 3 was made the default; Michael Droettboom probably
remembers it better.

Type 42 fonts are currently working, as far as I know. There was a transient problem with them but I think that's fixed. Type 3 is the default just because it makes the files smaller.

Cheers,
Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA