ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* how to switch font family
@ 2001-02-28 16:27 Han The Thanh
  2001-03-01 14:34 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Han The Thanh @ 2001-02-28 16:27 UTC (permalink / raw)


Hi all,

can someone please tell me how to change the current font family, so that
other atributes (size, weight and style) remain the same?

Thanks,
Thanh


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

* Re: how to switch font family
  2001-02-28 16:27 how to switch font family Han The Thanh
@ 2001-03-01 14:34 ` Taco Hoekwater
  2001-03-07 10:13   ` Han The Thanh
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2001-03-01 14:34 UTC (permalink / raw)


Han The Thanh wrote:
> 
> Hi all,
> 
> can someone please tell me how to change the current font family, so that
> other atributes (size, weight and style) remain the same?

\def\familyswitch#1[#2]{%
     \edef\oldalternative{\fontalternative}%
     \switchtobodyfont[#2]%
     \getvalue{\oldalternative}}

\familyswitch[pos]

-- 
groeten,

Taco


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

* Re: how to switch font family
  2001-03-01 14:34 ` Taco Hoekwater
@ 2001-03-07 10:13   ` Han The Thanh
  2001-03-07 12:04     ` S2P development
  0 siblings, 1 reply; 6+ messages in thread
From: Han The Thanh @ 2001-03-07 10:13 UTC (permalink / raw)
  Cc: ntg-context

Hi Taco,

> > Hi all,
> > 
> > can someone please tell me how to change the current font family, so that
> > other atributes (size, weight and style) remain the same?
> 
> \def\familyswitch#1[#2]{%
>      \edef\oldalternative{\fontalternative}%
>      \switchtobodyfont[#2]%
>      \getvalue{\oldalternative}}
> 
> \familyswitch[pos]

thanks for the tip. It works, however everytime I switched to another
family, then the font definition file is loaded again (font-pos.tex). Is
there anyway to prevent it? My need is to typeset a few characters in the
body text in different font than the main font, so the switching is used
quite frequently.

Regards
Thanh


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

* Re: how to switch font family
  2001-03-07 10:13   ` Han The Thanh
@ 2001-03-07 12:04     ` S2P development
  2001-03-07 14:35       ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: S2P development @ 2001-03-07 12:04 UTC (permalink / raw)


Han The Thanh wrote:
> 
> thanks for the tip. It works, however everytime I switched to another
> family, then the font definition file is loaded again (font-pos.tex). Is
> there anyway to prevent it? My need is to typeset a few characters in the
> body text in different font than the main font, so the switching is used
> quite frequently.

Can't help you straight away. But perhaps you can define this (the
alternate fontfamily) as 'hw' or 'cg'? Context has 5 different text
families at the same time:

\tt \ss \rm \hw \cg

The previous macro then becomes something like:

\def\familyswitch#1{%
      {\edef\oldalternative{\fontalternative}%
      \hw \getvalue{\oldalternative}#1}}

With call:

	\familyswitch{The chars for the other fontfamily}


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

* Re: how to switch font family
  2001-03-07 12:04     ` S2P development
@ 2001-03-07 14:35       ` Hans Hagen
  2001-03-07 15:14         ` Han The Thanh
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2001-03-07 14:35 UTC (permalink / raw)
  Cc: ntg-context

At 01:04 PM 3/7/01 +0100, S2P development wrote:
>Han The Thanh wrote:
>> 
>> thanks for the tip. It works, however everytime I switched to another
>> family, then the font definition file is loaded again (font-pos.tex). Is
>> there anyway to prevent it? My need is to typeset a few characters in the
>> body text in different font than the main font, so the switching is used
>> quite frequently.
>
>Can't help you straight away. But perhaps you can define this (the
>alternate fontfamily) as 'hw' or 'cg'? Context has 5 different text
>families at the same time:
>
>\tt \ss \rm \hw \cg

or more, as you use more -) 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: how to switch font family
  2001-03-07 14:35       ` Hans Hagen
@ 2001-03-07 15:14         ` Han The Thanh
  0 siblings, 0 replies; 6+ messages in thread
From: Han The Thanh @ 2001-03-07 15:14 UTC (permalink / raw)
  Cc: ConTeXt List

> >Can't help you straight away. But perhaps you can define this (the
> >alternate fontfamily) as 'hw' or 'cg'? Context has 5 different text
> >families at the same time:
> >
> >\tt \ss \rm \hw \cg
>  
> or more, as you use more -) 

can you please tell me how to define further ones?

Thanh


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

end of thread, other threads:[~2001-03-07 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-28 16:27 how to switch font family Han The Thanh
2001-03-01 14:34 ` Taco Hoekwater
2001-03-07 10:13   ` Han The Thanh
2001-03-07 12:04     ` S2P development
2001-03-07 14:35       ` Hans Hagen
2001-03-07 15:14         ` Han The Thanh

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).