ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: \switchtobodyfont[cmr]  in Gamma
Date: Tue, 12 Nov 2002 09:31:55 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20021112092521.00ad1ab0@server-1> (raw)
In-Reply-To: <200211111448.05918.ishamid@attbi.com>

At 02:48 PM 11/11/2002 -0800, Idris S Hamid wrote:

>In Gamma (and perhaps in regular ConTeXt as well but I have no other fonts to
>test there) \setupbodyfont[cmr] does not seem to work/behaves strangely:
>
>-------------cm-test.tex--------------
>\input m-gamma.tex
>\input type-omg.tex
>
>\setupbodyfont[cmr,14pt]
>%\setupbodyfont[omlgc, 14.4pt]
>
>This is a test
>
>\switchtobodyfont[omlgc, 14.4pt]
>%\switchtobodyfont[cmr,14pt]
>
>This is a test
>
>\switchtobodyfont[cmr, 14pt]
>%\switchtobodyfont[omlgc, 14.4pt]
>
>This is a test
>
>\stoptext

in my type-omg i see no omlgc defined, so \setupbodyfont[cmr,14pt]

\setupbodyfont[cmr, 14pt]        This is a test \fontname\font \par
\switchtobodyfont[omlgc, 14.4pt] This is a test \fontname\font \par
\switchtobodyfont[cmr, 14pt]     This is a test \fontname\font \par

gives me expected behavior.

When mixing fonts, esp with similar names, and esp in an ungrouped way, 
it's best to use the typeface mechanism, since it provides a namespace, 
while the less clever mechanism overloads definitions (keep in mind that 
there are some limitations to the amount of fonts and memory, so there are 
some trade off's)


>---------------------------
>
>Results:
>
>First line in cmr14, second line in omlgc14.4 (OK so far)
>
>Third line in omlgc14 (This is wrong!)

this is probably because you now have Serif redefined to an oml font, and 
since you don't use grouping, there is no way that tex can go back to the 
already lost definitions (that is: in typefaces we use a namespace, so 
there it's no problem).

you may try (1) grouping or (2) \switchtobodyfont[reset] in between, but 
mixing fonts this way (not using typefaces) can be painfully slow

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

  parent reply	other threads:[~2002-11-12  8:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-11 22:48 Idris S Hamid
2002-11-11 21:56 ` Giuseppe Bilotta
2002-11-11 23:28 ` Giuseppe Bilotta
2002-11-12  1:02   ` Idris S Hamid
2002-11-12  8:31 ` Hans Hagen [this message]
2002-11-12 14:06   ` Re[2]: " Giuseppe Bilotta
2002-11-12 18:12     ` Hans Hagen
2002-11-12 22:10       ` Re[3]: " Giuseppe Bilotta
2002-11-13  8:39         ` Hans Hagen
2002-11-13 11:31           ` Re[4]: " Giuseppe Bilotta
2002-11-13 16:16             ` Hans Hagen
2002-11-13 20:25           ` Re[3]: " Idris S Hamid
2002-11-13 20:07   ` Idris S Hamid
2002-11-12 11:59 ` Matthew Huggett
2002-11-13 19:53   ` Idris S Hamid
2002-11-13 22:16 ` Idris S Hamid
2002-11-13 23:06   ` Idris S Hamid

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=5.1.0.14.1.20021112092521.00ad1ab0@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ref.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).