[metapost] problem with 'dvips mproof'

Stephan Hennig mailing_list at arcor.de
Sun Oct 10 12:26:26 CEST 2010


Am 10.10.2010 02:52, schrieb Reinhard Kotucha:
> On 9 October 2010 Stephan Hennig wrote:
>
>> 0   -   The files looks fine with text "test" probably rendered in
>> CMR.
>>
>> 1   -   Fine again.  But at closer inspection the kerning between
>> letters changes slightly in comparison to prologues:=0.
>>
>> 2   -   Exactly the same as with prologues:=1.
>>
>> 3   -   The text is visible, but rendered with something else than
>> CMR (probably Courier).
>
> [quotes reordered]
>
> BTW, the prologues variable might be confusing because you have to
> remember what all the values are good for.  But it's probably
> helpful to know that Metapost was designed to support dvips in the
> first place, hence you don't have to set prologues at all for dvips.

My understanding up until now was like your (possibly unintentional)
conclusion in the last sentence: you don't have to set prologues to
values >0 for dvips, but it doesn't hurt to do so.  I'm seldom using
dvips, but prefer pdftex, where prologues is much less relevant, but do 
I understand you correctly that setting prologues to 0 is /mandatory/ 
when using dvips or dvipdfm as a post-processor for MetaPost files?


> With prologues>  0 metapost creates (more or less) standalone
> PostScript files.  Standalone means that either the font is embedded
> or is included by the PS interpreter itself.

Yes, but why is the rendering different in the viewer for prologues set
to 0 and 1|2?  In both cases the font comes from dvips, not the viewer.


> If you want to post-process the file with dvips, set prologues := 0
> (or not at all).  Then you'll see a comment line
>
> %*Font: cmr10 9.96265 9.96265 65:8003
>
> in the created PostScript file.  This line is evaluated by dvips and
> allows dvips to insert the fonts.  Its format is explained on page 29
> of the dvips manual.

Thanks!  To quote from that:

> You can use any font available to TEX and Dvips within a graphics
> file by putting a %*Font: line in the leading commentary of the
> file.

Does that mean dvips, unlike the pdftex driver, cannot handle embedded 
PostScript fonts in EPS files?  I wouldn't have expected that.


> If you set prologues := 0, then dvips inserts the fonts itself.
> dvips looks for fonts and TFM files in texmf trees and therefore has
> access to everything needed in order to typeset metapost labels
> perfectly.

Why are other prologues values handled differently by dvips?


> As said before, PostScript doesn't support kerning itself, but
> kerning can be applied by programs creating PS files.  In the example
> below I inserted kerning information manually, but it's similar to
> what dvips actually does.

Hm, for prologues set to both, 0 or 1, I find the following code in the 
dvips output:

> %%Page: 1 1
>  0 0 0 setrgbcolor
> -8.05316 -3.06392 moveto
> (test) cmr10 9.96265 fshow
> showpage
> %%EOF

Any idea as to why the rendering is different in PS_View in both cases?

Best regards,
Stephan Hennig


More information about the metapost mailing list