ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fonts in Metapost
@ 2005-07-01 16:01 Wolfgang Zillig
  2005-07-01 16:58 ` Willi Egger
  2005-07-02 20:34 ` Willi Egger
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Zillig @ 2005-07-01 16:01 UTC (permalink / raw)


Hello,

I have problems with changeing the font in Metapost. I defined my own 
typescripts somewhere and I also have a mapfile for that fonts. In 
normal text it workes fine (even math).

Now I want to change the font in MP as well (my text is included as 
label("test",(200,200));):

%normal stups:
     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
only once
     \usetypescriptfile[type-cmbr]
     \usetypescript[Cmbr]
      \setupbodyfont[12pt]

\startMPenvironment
     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
only once
     \usetypescriptfile[type-cmbr]
     \usetypescript[Cmbr]
      \setupbodyfont[12pt]
\stopMPenvironment

But I always get the standard CMR output.

Did I miss a step somewhere?

Has anyone an idea what's going wrong?

Thanks for any help!

Wolfgang

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-01 16:01 Fonts in Metapost Wolfgang Zillig
@ 2005-07-01 16:58 ` Willi Egger
  2005-07-01 17:44   ` Wolfgang Zillig
  2005-07-02 10:28   ` Wolfgang Zillig
  2005-07-02 20:34 ` Willi Egger
  1 sibling, 2 replies; 8+ messages in thread
From: Willi Egger @ 2005-07-01 16:58 UTC (permalink / raw)


Hi Wolfgang,

I do hope  that I am not missing something. But I think, that you should 
say in the  MPenvironment:
\setupbodyfont[Cmbr,12pt]

Otherwise the setupbodyfont command does not know which font to setup.

Willi

Wolfgang Zillig wrote:
> Hello,
> 
> I have problems with changeing the font in Metapost. I defined my own 
> typescripts somewhere and I also have a mapfile for that fonts. In 
> normal text it workes fine (even math).
> 
> Now I want to change the font in MP as well (my text is included as 
> label("test",(200,200));):
> 
> %normal stups:
>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded only 
> once
>     \usetypescriptfile[type-cmbr]
>     \usetypescript[Cmbr]
>      \setupbodyfont[12pt]
> 
> \startMPenvironment
>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded only 
> once
>     \usetypescriptfile[type-cmbr]
>     \usetypescript[Cmbr]
>      \setupbodyfont[12pt]
> \stopMPenvironment
> 
> But I always get the standard CMR output.
> 
> Did I miss a step somewhere?
> 
> Has anyone an idea what's going wrong?
> 
> Thanks for any help!
> 
> Wolfgang
> 
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-01 16:58 ` Willi Egger
@ 2005-07-01 17:44   ` Wolfgang Zillig
  2005-07-02 10:28   ` Wolfgang Zillig
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Zillig @ 2005-07-01 17:44 UTC (permalink / raw)


Ok, I changed it but it does not help.

Wolfgang


Willi Egger wrote:

> Hi Wolfgang,
>
> I do hope  that I am not missing something. But I think, that you 
> should say in the  MPenvironment:
> \setupbodyfont[Cmbr,12pt]
>
> Otherwise the setupbodyfont command does not know which font to setup.
>
> Willi
>
> Wolfgang Zillig wrote:
>
>> Hello,
>>
>> I have problems with changeing the font in Metapost. I defined my own 
>> typescripts somewhere and I also have a mapfile for that fonts. In 
>> normal text it workes fine (even math).
>>
>> Now I want to change the font in MP as well (my text is included as 
>> label("test",(200,200));):
>>
>> %normal stups:
>>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
>> only once
>>     \usetypescriptfile[type-cmbr]
>>     \usetypescript[Cmbr]
>>      \setupbodyfont[12pt]
>>
>> \startMPenvironment
>>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
>> only once
>>     \usetypescriptfile[type-cmbr]
>>     \usetypescript[Cmbr]
>>      \setupbodyfont[12pt]
>> \stopMPenvironment
>>
>> But I always get the standard CMR output.
>>
>> Did I miss a step somewhere?
>>
>> Has anyone an idea what's going wrong?
>>
>> Thanks for any help!
>>
>> Wolfgang
>>
>>
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-01 16:58 ` Willi Egger
  2005-07-01 17:44   ` Wolfgang Zillig
@ 2005-07-02 10:28   ` Wolfgang Zillig
  2005-07-02 11:58     ` Willi Egger
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Zillig @ 2005-07-02 10:28 UTC (permalink / raw)


Hello all,

finaly I solved my problem: I had my metapost graphic in an external 
file and used it with:

\startuseMPgraphic{test}
\input mp.mp ;
\stopuseMPgraphic

\useMPgraphic{test}

or

\startbuffer[test1]
\input mp.mp
\stopbuffer

\processMPbuffer[test1,graphic]

in both cases I get the graphic but the font switching does not work. 
When I copy the content of my graphic file into "\startuseMPgraphic 
\stopuseMPgraphic" or "\startbuffer \stopbuffer" I works. Is there an 
explanation for this behaviour? I thought \input would be equal to 
typing it directly.

What is the best way to handle multiple graphics when I want to use the 
font switching mechanismn? Any advice?

Thanks alot
Wolfgang

Willi Egger wrote:

> Hi Wolfgang,
>
> I do hope  that I am not missing something. But I think, that you 
> should say in the  MPenvironment:
> \setupbodyfont[Cmbr,12pt]
>
> Otherwise the setupbodyfont command does not know which font to setup.
>
> Willi
>
> Wolfgang Zillig wrote:
>
>> Hello,
>>
>> I have problems with changeing the font in Metapost. I defined my own 
>> typescripts somewhere and I also have a mapfile for that fonts. In 
>> normal text it workes fine (even math).
>>
>> Now I want to change the font in MP as well (my text is included as 
>> label("test",(200,200));):
>>
>> %normal stups:
>>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
>> only once
>>     \usetypescriptfile[type-cmbr]
>>     \usetypescript[Cmbr]
>>      \setupbodyfont[12pt]
>>
>> \startMPenvironment
>>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
>> only once
>>     \usetypescriptfile[type-cmbr]
>>     \usetypescript[Cmbr]
>>      \setupbodyfont[12pt]
>> \stopMPenvironment
>>
>> But I always get the standard CMR output.
>>
>> Did I miss a step somewhere?
>>
>> Has anyone an idea what's going wrong?
>>
>> Thanks for any help!
>>
>> Wolfgang
>>
>>
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-02 10:28   ` Wolfgang Zillig
@ 2005-07-02 11:58     ` Willi Egger
  0 siblings, 0 replies; 8+ messages in thread
From: Willi Egger @ 2005-07-02 11:58 UTC (permalink / raw)


Hi Wolfgang,

usually I compile the MetaPost fiures into a pdf. I refer to the 
pictures then by \externalfigure[metapost-pdf][page=1] or similar.

Willi

Wolfgang Zillig wrote:
> Hello all,
> 
> finaly I solved my problem: I had my metapost graphic in an external 
> file and used it with:
> 
> \startuseMPgraphic{test}
> \input mp.mp ;
> \stopuseMPgraphic
> 
> \useMPgraphic{test}
> 
> or
> 
> \startbuffer[test1]
> \input mp.mp
> \stopbuffer
> 
> \processMPbuffer[test1,graphic]
> 
> in both cases I get the graphic but the font switching does not work. 
> When I copy the content of my graphic file into "\startuseMPgraphic 
> \stopuseMPgraphic" or "\startbuffer \stopbuffer" I works. Is there an 
> explanation for this behaviour? I thought \input would be equal to 
> typing it directly.
> 
> What is the best way to handle multiple graphics when I want to use the 
> font switching mechanismn? Any advice?
> 
> Thanks alot
> Wolfgang
> 
> Willi Egger wrote:
> 
>> Hi Wolfgang,
>>
>> I do hope  that I am not missing something. But I think, that you 
>> should say in the  MPenvironment:
>> \setupbodyfont[Cmbr,12pt]
>>
>> Otherwise the setupbodyfont command does not know which font to setup.
>>
>> Willi
>>
>> Wolfgang Zillig wrote:
>>
>>> Hello,
>>>
>>> I have problems with changeing the font in Metapost. I defined my own 
>>> typescripts somewhere and I also have a mapfile for that fonts. In 
>>> normal text it workes fine (even math).
>>>
>>> Now I want to change the font in MP as well (my text is included as 
>>> label("test",(200,200));):
>>>
>>> %normal stups:
>>>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
>>> only once
>>>     \usetypescriptfile[type-cmbr]
>>>     \usetypescript[Cmbr]
>>>      \setupbodyfont[12pt]
>>>
>>> \startMPenvironment
>>>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded 
>>> only once
>>>     \usetypescriptfile[type-cmbr]
>>>     \usetypescript[Cmbr]
>>>      \setupbodyfont[12pt]
>>> \stopMPenvironment
>>>
>>> But I always get the standard CMR output.
>>>
>>> Did I miss a step somewhere?
>>>
>>> Has anyone an idea what's going wrong?
>>>
>>> Thanks for any help!
>>>
>>> Wolfgang
>>>
>>>
>>> _______________________________________________
>>> ntg-context mailing list
>>> ntg-context@ntg.nl
>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>
>>
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-01 16:01 Fonts in Metapost Wolfgang Zillig
  2005-07-01 16:58 ` Willi Egger
@ 2005-07-02 20:34 ` Willi Egger
  2005-07-03 10:49   ` Wolfgang Zillig
  1 sibling, 1 reply; 8+ messages in thread
From: Willi Egger @ 2005-07-02 20:34 UTC (permalink / raw)


Hi Wolfgang,

I reread your mail, I am not sure, whether I understood your message 
correctly. therefore here what I usually do:

\setupoutput[pdftex]
\useMPlibrary[clp,txt]

\startMPenvironment
     \usetypescript[palatino][texnansi]
     \switchtobodyfont[palatino,rm,10pt]
\stopMPenvironment

\startMPinclusions
     drawpathoptions (withpen pencircle scaled 1.5 withcolor .8white) ;
     drawpointoptions (withpen pencircle scaled 2.5 withcolor red) ;
     drawcontroloptions(withpen pencircle scaled 1 withcolor blue) ;
     drawlineoptions (withpen pencircle scaled 1.2 withcolor black) ;
     drawlabeloptions () ;
     swappointlabels := true ;
     numeric u; u := 0.5mm ;
\stopMPinclusions

\setupcolors[state=start]

\startuniqueMPgraphic{1}
	mp code
\stopuniqueMPgraphic

\startuniqueMPgraphic{2}
	mp code
\stopuniqueMPgraphic

\startuniqueMPgraphic{2}
	mp code
\stopuniqueMPgraphic

\starttext

\dorecurse{3}{%
     \startTEXpage
         \useMPgraphic{\recurselevel}
     \stopTEXpage}
\stoptext

Willi

Wolfgang Zillig wrote:
> Hello,
> 
> I have problems with changeing the font in Metapost. I defined my own 
> typescripts somewhere and I also have a mapfile for that fonts. In 
> normal text it workes fine (even math).
> 
> Now I want to change the font in MP as well (my text is included as 
> label("test",(200,200));):
> 
> %normal stups:
>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded only 
> once
>     \usetypescriptfile[type-cmbr]
>     \usetypescript[Cmbr]
>      \setupbodyfont[12pt]
> 
> \startMPenvironment
>     \loadmapfile[cmbright.map] %it seems that the mapfile is loaded only 
> once
>     \usetypescriptfile[type-cmbr]
>     \usetypescript[Cmbr]
>      \setupbodyfont[12pt]
> \stopMPenvironment
> 
> But I always get the standard CMR output.
> 
> Did I miss a step somewhere?
> 
> Has anyone an idea what's going wrong?
> 
> Thanks for any help!
> 
> Wolfgang
> 
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-02 20:34 ` Willi Egger
@ 2005-07-03 10:49   ` Wolfgang Zillig
  2005-07-03 17:26     ` Willi Egger
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Zillig @ 2005-07-03 10:49 UTC (permalink / raw)


Hello all,

the last suggestion I made was wrong, to change the font I need (somehow 
strange) the following code:

\loadmapfile[mymap.map]
\usetypescriptfile[type-cmbr]
\usetypescript[Cmbr]

\startMPenvironment[global]
\input type-cmbr
\usetypescript[Cmbr]
\switchtobodyfont[Cmbr,12pt]
\stopMPenvironment
....

I don't know what I did, that in my typescriptfile that I have 
explicitely to include it.

Willi Egger wrote:

> Hi Wolfgang,
>
> I reread your mail, I am not sure, whether I understood your message 
> correctly. therefore here what I usually do:
>
> \setupoutput[pdftex]
> \useMPlibrary[clp,txt]
>

can you explain for what the command \useMPlibrary[] is?


Thanks,

Wolfgang

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fonts in Metapost
  2005-07-03 10:49   ` Wolfgang Zillig
@ 2005-07-03 17:26     ` Willi Egger
  0 siblings, 0 replies; 8+ messages in thread
From: Willi Egger @ 2005-07-03 17:26 UTC (permalink / raw)


Hi Wolfgang,

The MPlibraries are part of the metafun-suite.

Willi


Wolfgang Zillig wrote:
> Hello all,
> 
> the last suggestion I made was wrong, to change the font I need (somehow 
> strange) the following code:
> 
> \loadmapfile[mymap.map]
> \usetypescriptfile[type-cmbr]
> \usetypescript[Cmbr]
> 
> \startMPenvironment[global]
> \input type-cmbr
> \usetypescript[Cmbr]
> \switchtobodyfont[Cmbr,12pt]
> \stopMPenvironment
> ....
> 
> I don't know what I did, that in my typescriptfile that I have 
> explicitely to include it.
> 
> Willi Egger wrote:
> 
>> Hi Wolfgang,
>>
>> I reread your mail, I am not sure, whether I understood your message 
>> correctly. therefore here what I usually do:
>>
>> \setupoutput[pdftex]
>> \useMPlibrary[clp,txt]
>>
> 
> can you explain for what the command \useMPlibrary[] is?
> 
> 
> Thanks,
> 
> Wolfgang
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-07-03 17:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-01 16:01 Fonts in Metapost Wolfgang Zillig
2005-07-01 16:58 ` Willi Egger
2005-07-01 17:44   ` Wolfgang Zillig
2005-07-02 10:28   ` Wolfgang Zillig
2005-07-02 11:58     ` Willi Egger
2005-07-02 20:34 ` Willi Egger
2005-07-03 10:49   ` Wolfgang Zillig
2005-07-03 17:26     ` Willi Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).