ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Yue Wang <yuleopen@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Font switching question
Date: Tue, 12 May 2009 00:26:42 +0800	[thread overview]
Message-ID: <68bfdc900905110926ka2fe366h56987caabde9b5c4@mail.gmail.com> (raw)
In-Reply-To: <B2D0D603-E3DA-4E7A-9F98-5B91BAFEF5F6@gmail.com>

On Mon, May 11, 2009 at 11:23 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 11.05.2009 um 16:38 schrieb Yue Wang:
>
>> Hi Hans:
>>
>> let me give a better explanation.
>>
>> we define a typescript foobar. so we can call  \foobar to load the
>> foobar typeface.
>> then we should define a macro like this:
>> \def\switchtofoobar{\savecurrentstyle\foobar\getcurrentstyle}
>> and call it like that:
>>
>> text 1 {\swichtofoobar text2} text 3
>> when \savecurrentstyle is called, it define a macro named
>> \getcurrentstyle in order to save the style of text 1 (like \ss\it,
>> 10pt) into that. that's all we want.
>
> From font-ini.mkii (\push/\popcurrentfont):
>
> % \definetypeface[one][rm][serif][computer-roman][default]
> % \definetypeface[two][rm][serif][computer-roman][default][rscale=.9]
> %
> % {\one \bf test \two test}
> % {\one \bf test \pushcurrentfont \two \popcurrentfont test}
>
> there are more helper macros like \savefont and \restorefont


Thank you very much, Wolfgang!


>
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2009-05-11 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 12:08 Yue Wang
2009-05-11 14:38 ` Yue Wang
2009-05-11 15:23   ` Wolfgang Schuster
2009-05-11 16:26     ` Yue Wang [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=68bfdc900905110926ka2fe366h56987caabde9b5c4@mail.gmail.com \
    --to=yuleopen@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).