[metapost] Fwd: How to change label font
José Carlos Santos
jcsantos at fc.up.pt
Tue Sep 11 09:46:54 CEST 2007
On 11-09-2007 8:24, 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?
>
> thanks, i now got the point. the question may need to be changed to
> "how to change font in latext". i had did "\fontfamily{...} in
> verbatimtex .. etex. but dont't know what is the right family name
> for Tahoma. maybe this question should not be discussed here.
Didn't you read my previous reply? The right family name is "tahoma",
as in:
\fontfamily{tahoma}\selectfont Tahoma \normalfont \\
but you will also have to load the winfonts package.
Best regards,
Jose Carlos Santos
More information about the metapost
mailing list