From: Alan Stone <software.list.1es9s@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: font switching questions
Date: Wed, 18 Mar 2009 09:12:00 +0100 [thread overview]
Message-ID: <326847810903180112r369058daxc1ead108ac62746a@mail.gmail.com> (raw)
In-Reply-To: <49C023EF.9050106@wxs.nl>
[-- Attachment #1.1: Type: text/plain, Size: 1846 bytes --]
On Tue, Mar 17, 2009 at 11:27 PM, Hans Hagen <pragma@wxs.nl> wrote:
> 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
Which low level command allows to fill in \definefont[SomeFont][SomeSynonym
sa SomeScale] with SomeSynonym=Sans(X)/Serif(X) (X)=Bold/Italic, i.e.
regardless of the synonym's name (defined in the typescript)?
>
>> \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)
>
Alan
[-- Attachment #1.2: Type: text/html, Size: 3062 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2009-03-18 8:12 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
2009-03-17 23:48 ` Wolfgang Schuster
2009-03-18 8:05 ` Hans Hagen
2009-03-18 8:12 ` Alan Stone [this message]
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=326847810903180112r369058daxc1ead108ac62746a@mail.gmail.com \
--to=software.list.1es9s@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).