From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: font switching questions
Date: Tue, 17 Mar 2009 23:27:59 +0100 [thread overview]
Message-ID: <49C023EF.9050106@wxs.nl> (raw)
In-Reply-To: <326847810903171448l5208311do3b5d440486dd8122@mail.gmail.com>
Alan Stone wrote:
> Ahoi,
>
> Following a previous discussion, I've been advised to "try to avoid
> \switchtobodyfont and use \definedfont or \definefont instead".
what is better depends on the situation
- for a structured document using \switchtobodyfont is ok
- for special layout elements (headers, title pages, keywords)
\definefont might be handier (esp when funny sizes are used)
- when using \definefont it can be handy to use the symbolic names
(Serif, SansBold etc) and sizes (sa 1.2) because that makes redefinition
easier
> (1) What's the difference between \definefont and \definedfont ?
\definefont defines a macro that represents a font, and \definedfont
just switches to a font (the forst one is more efficient when you switch
often)
> (2) In the underneath example...
>
> (2a) how to implement \define(d)font for font switching ?
>
> (2b) how to define \myFontHook ?
>
> Thanks,
> Alan
>
> \usemodule[t-lettrine]
>
> \usetypescriptfile[tps_arial]
> \usetypescript[arial]
... just look how gyre typefaces are defined
> \setupbodyfont[myFont,\myFontSize]
just \setupbodyfont[myFont,12pt]
and an occasional \definefont[BigFont][SerifBold sa 3.5] which gives you
\BigFont
> \setuphead[chapter][style={\switchtobodyfont[myOtherFont,\myOtherFontSize]}]
it depends on what can occur in a title, if there's math and monospaced
and whatever being used mixed, then best use a typeface (apart from the
one time definition it's quite fast to switch a typeface)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2009-03-17 22:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 21:48 Alan Stone
2009-03-17 22:27 ` Hans Hagen [this message]
2009-03-17 23:48 ` Wolfgang Schuster
2009-03-18 8:05 ` Hans Hagen
2009-03-18 8:12 ` Alan Stone
2009-03-18 8:23 ` Hans Hagen
2009-03-18 8:39 ` Alan Stone
2009-03-18 8:51 ` Wolfgang Schuster
2009-03-18 10:44 ` Hans Hagen
2009-03-18 10:34 ` Alan Stone
2009-03-18 15:26 ` Alan Stone
2009-03-18 16:03 ` Wolfgang Schuster
2009-03-19 15:17 ` Alan Stone
2009-03-19 15:24 ` Taco Hoekwater
2009-03-19 16:38 ` Alan Stone
2009-03-19 18:17 ` George N. White III
2009-03-19 15:29 ` Hans Hagen
2009-03-19 16:39 ` Alan Stone
2009-03-19 15:36 ` Peter Rolf
2009-03-19 17:50 ` Wolfgang Schuster
2009-03-23 10:51 ` Alan Stone
2009-03-23 11:08 ` Wolfgang Schuster
2009-03-23 11:16 Vyatcheslav Yatskovsky
2009-03-23 11:20 ` Wolfgang Schuster
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=49C023EF.9050106@wxs.nl \
--to=pragma@wxs.nl \
--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).