ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: [metafun] MPenvironment / font switching
Date: Fri, 10 Jun 2011 23:36:20 +0200	[thread overview]
Message-ID: <BANLkTi=QkVNkAOC4gBQ2ZdEFe1a0_D41JQ@mail.gmail.com> (raw)
In-Reply-To: <20110609212057.GA3842@orcus>

On Thu, Jun 9, 2011 at 23:20, Philipp Gesang wrote:
> Hi all,
>
> I’m struggling with the font used in metapost. The only way to
> actually change it appears to be enclosing the mp graphic in two
> statements of \setupbodyfont[…] -- which I need to avoid. In the
> following example, the background text should be typeset (drawn)
> as lm sans, whereas the main font should be left untouched
> (serif).

An alternative to Wolfgang's answer when you want to use complex font
definitions (or other complex commands) is to use \sometxt.

\usetypescript[iwona]
\definetextext[myfont]{\switchtobodyfont[iwona,ss,30pt]\bi}

\starttext
\startuseMPgraphic{bg}
 draw \sometxt[myfont]{I wanna get rid of those serifs!} withcolor blue ;
\stopuseMPgraphic

\useMPgraphic{bg}
\stoptext

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2011-06-10 21:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 21:20 Philipp Gesang
2011-06-09 21:31 ` Wolfgang Schuster
2011-06-09 21:51   ` Philipp Gesang
2011-06-10 21:36 ` Mojca Miklavec [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=QkVNkAOC4gBQ2ZdEFe1a0_D41JQ@mail.gmail.com' \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).