[metapost] Fwd: How to change label font

Dan&Jan Luecking luecking at uark.edu
Tue Sep 11 05:47:38 CEST 2007


At 08:16 PM 9/10/2007, you wrote:

>On 9/10/07, José Carlos Santos <jcsantos at fc.up.pt> wrote:
> > On 10-09-2007 14:53, Steven Woody wrote:
> >
> > >>> In the manual, i got 'defaultfont' used to change font.  but i found
> > >>> it took no effects.  i guess this may caused by that i am using latex,
> > >>> that is i used following statements at beginning of a mp source:
> > >>>
> > >>> verbatimtex
> > >>> %&latex
> > >>> \documentclass{article}
> > >> \usepackage{ appropriate package for the font that you want }
> > >>
> > >>> \begin{document}
> > >>> etex
> > >>>
> > >>> in this case, how can i change font?  thanks.
> > >> Aditya
> > >
> > > need extra packages to use fonts?  if what i want is tahoma, what page
> > > should i load? thanks.
> >
> > See:
> >
> > http://franz.kollmann.in/latex/latex.html#winfonts
> >
> > Best regards,
> >
> > Jose Carlos Santos
> > --
> > http://tug.org/mailman/listinfo/metapost
> >
>
>i think you did not get my point.  i don't want to use any extra-font.
>  in latex, one can already change fonts even without anything such as
>winfonts, is it? i just want to change font, and Tahoma is a oridinary
>one for which i can find tfm files under my tex treee.  the problem
>is, when in metapost using latex as preprocessor, i found i can not
>change label font.

If you change defaultfont, metapost uses that when you ask it to
print a string:
     defaultfont="ptmr8a"; % TFM name for Times
     label("Text", (0,0)); % Will be in Times.

If you use TeX or LaTeX to set labels:
     label(btex Text", (0,0);
you get whatever font TeX or LaTeX has been instructed to use and
defaultfont is ignored. And quite properly, too. I certainly
wouldn't metapost to override my LaTeX font selections.

Is that clear enough?


Dan


Dan Luecking
Fayetteville, Arkansas



More information about the metapost mailing list