ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Philipp Gesang <gesang@stud.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: [metafun] MPenvironment / font switching
Date: Thu, 9 Jun 2011 23:51:08 +0200	[thread overview]
Message-ID: <20110609215108.GA5662@aides> (raw)
In-Reply-To: <C7F75F58-6524-4214-96BF-6F7FC3921915@googlemail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2213 bytes --]

On 2011-06-09 <23:31:49>, Wolfgang Schuster wrote:
> 
> Am 09.06.2011 um 23:20 schrieb Philipp Gesang:

<snip/>

> > ·································································
> > 
> > \startMPenvironment %[global]
> >  \switchtobodyfont[sans]
> >  %\setupbodyfont[sans]
> > \stopMPenvironment
> > 
> > %\start\setupbodyfont[sans]
> > \startuseMPgraphic{bg}
> >  verbatimtex \setupbodyfont[sans] etex ;
> >  draw btex I wanna get rid of those serifs! etex
> >    xysized (21cm, 5cm) withcolor blue ;
> > \stopuseMPgraphic
> > 
> > \definelayer[bg][x=0,y=0,width=\paperwidth,height=\paperheight]
> > \setlayer[bg]{%
> >  %\setupbodyfont[sans]
> >  \useMPgraphic{bg}
> > }
> > \setupbackgrounds[paper][background=bg]
> > \setupbackgrounds[state=repeat]
> > %\stop
> > 
> > \starttext
> > \dorecurse{42}{I’d really like to keep my serifs! }
> > \stoptext
> > 
> > ·································································

<snip/>

> ConTeXt postpones fontloading till \starttext, as you won’t get any
> text for elements (e.g. layers) which are set before the font was loaded
> the typewriter font is used as fallback and this is what you get.
> 
> Add “\setupbodyfont[modern]” before your layer settings and switch
> the style in the MP graphic with “… btex \ss I wanna get rid … etex …”.

Thanks a lot, this does indeed achieve what I intended.
Philipp


> Wolfgang
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2011-06-09 21:51 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 [this message]
2011-06-10 21:36 ` Mojca Miklavec

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=20110609215108.GA5662@aides \
    --to=gesang@stud.uni-heidelberg.de \
    --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).