[NTG-context] basic fontsizes question

Thomas Fehige thomas at fehige.de
Wed Jun 8 10:35:22 CEST 2016


Am 06.06.2016 um 22:48 schrieb Wolfgang Schuster:
> Hi Thomas,

[Thanks for the hint re starting a new thread, I didn't know that, sorry.]

>> Thomas Fehige <mailto:thomas at fehige.de>
>> 6. Juni 2016 um 16:05
>>
>> In the fonts book I found the \definebodyfont command, but it does not
>> to do what I expected. What I need (for a poster) is a set of absolute
>> font sizes. I tried the code below. I put some quirks in, like the
>> huge value for "a", to see if it works, but it doesn't. It just uses
>> the preset proportions relative to the preceding fontsize command (in
>> the example, \tfx is bigger than \tf).
>>
>> \definebodyfontenvironment[palatino][24pt][
>>    text = 24pt,
>>    small = 22pt,
>>    x = 22pt,
>>    scriptscript = 16pt,
>>    xx = 16pt,
>>    big=28pt,
>>    a = 80pt, % 28pt
>>    b = 40pt,
>>    c = 50pt,
>>    d = 50pt,
>>    interlinespace = 3ex,
>>    em = italic
>> ]
>>
>> \setupbodyfont[palatino,24pt]
>>
>> \starttext
>>    \tf tf\\
>>    \tfa tfa\\
>>    \tfb tfb\\
>>    \tfx tfx\\
>>    \tfx tfx
>> \stoptext
>>
>>
> When you have only a small amount of text the use of
> \definebodyfontenvironment is overkill because you can use the
> \definedfont command to set a certain font size.
>
> \starttext
>
> \start \definedfont[Serif at 20pt]
> \input ward
> \stop
>
> \startfont[SansBoldItalic at 18pt]
> \input ward
> \stopfont
>
> \stoptext
>
> Wolfgang

Nevertheless, I prefer to keep all the font and fontsize definitions and 
tweaks together in the preamble. This poster is not the only work I'm 
planning to do in ConTeXt, and I need to learn to swim while already in 
the water ;) .

Meanwhile I found the command \definebodyfontswitch and defined switches 
like \normalsize, \scriptsize, \large, \Large etc.

But this doesn't explain why \definebodyfontenvironment did not do 
anything in my MNWE. The fonts book is not very clear on its intended use.

BTW, I have no idea how all the strange line breaks crept into my code 
sample again. It seems tabs in a html mail are converted into line 
breaks somewhere along the line. I'll stick to plain text in the future.

Cheers -- Thomas


More information about the ntg-context mailing list