Alan Stone wrote:
On Tue, Mar 17, 2009 at 11:27 PM, Hans Hagen
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)?
it just follows the bodyfont \definefont[SomeFont][SerifBold sa 1.5] boils down to 'take the bold serif that we use in the bodyfont and scale it to 1.5 times the bodyfontsize' so, if you then choose another bodyfont (say times instead of palatino) you don't need to adapt all your definitions (there's also Normal, Bold etc that is even more generic in the sense that it can be sans or serif depending of the situation) these symbolic names are there for a reason as i never want to see hard coded font names (and features) in my document styles more than once ----------------------------------------------------------------- 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 -----------------------------------------------------------------