Changes

Jump to navigation Jump to search
4,001 bytes added ,  17:44, 19 September 2013
my initial attempt at documenting \definetypeface, based on the ref man
{{Reference
|name=definetypeface
|attributes=
}}

== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\definetypeface<span class="first">[...]</span><span class="second">[...]</span><span class="third">[...]</span><span class="fourth">[...]</span><span class="fifth">[...]</span><span class="sixth">[...]</span></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[...]</td>
<td>TEXT (typescript identifier)</td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[...]</td>
<td>rm ss tt mm hw cg ("basic style")</td>
</tr>
<tr valign="top" class="third">
<td class="cmd">[...]</td>
<td>IDENTIFIER (existing font set)</td>
</tr>
<tr valign="top" class="fourth">
<td class="cmd">[...]</td>
<td>IDENTIFIER (existing font set)</td>
</tr>
<tr valign="top" class="fifth">
<td class="cmd">[...]</td>
<td>IDENTIFIER (?)</td>
</tr>
<tr valign="top" class="sixth">
<td class="cmd">[...]</td>
<td>features = IDENTIFIER<br />
rscale = NUMBER<br/>
encoding = IDENTIFIER<br/>
text = IDENTIFIER</td>
</tr>
</table>

== Description ==

{{cmd|definetypeface}} sets up a typeface for use within a typescript.

The third and fourth arguments to \definetypeface are pointers to already declared font sets;
these are defined elsewhere. Table 5.8 gives the full list of predefined typescripts (the first
argument of \starttypescript) and font sets that are attached to the styles (the third and
fourth argument of each \definetypeface).
The names in the third argument (like serif and sans) do not have the same meaning as the
names used in \setupbodyfont. Inside \setupbodyfont, they were keywords that were in-
ternally remapped to one of the two-letter internal styles. Inside \definetypeface, they are
nothing more than convenience names that are attached to a group of fonts by the person that
wrote the font definition. They only reflect a grouping that the person believed that could be
a single font style. Oftentimes, these names are identical to the official style keywords, just as
the typescript and typeface names are often the same, but there can be (and sometimes are)
different names altogether.

How to define your own font sets is explained in the reference manual, but there are quite a
few predefined font sets that come with ConTEXt; these are all listed in the four tables 5.9, 5.10,
5.11, and 5.12.
For everything to work properly in MkII, the predefined font sets also have to have an encoding
attached, you can look those up in the relevant tables as well.

The fifth argument to \definetypeface specifies specific font size setups (if any), these will be
covered in section ?? in the next chapter. Almost always, specifying default will suffice.

The optional sixth argument is used for tweaking font settings like the specification of font
features or adjusting parameters. In this case, the two modern font sets are loaded with a small
magnification, this evens out the visual heights of the font styles.

== Example ==
<context source="yes">
\starttypescript [palatino] [texnansi,ec,qx,t5,default]
\definetypeface[palatino] [rm] [serif][palatino] [default]
\definetypeface[palatino] [ss] [sans] [modern] [default] [rscale=1.075]
\definetypeface[palatino] [tt] [mono] [modern] [default] [rscale=1.075]
\definetypeface[palatino] [mm] [math] [palatino] [default]
\stoptypescript
</context>

This defines a typescript named palatino in five different encodings. When this typescript is
executed via \usetypescript, it will define four typefaces, one of each of the four basic styles
rm, ss, tt, and mm.

== See also ==
* [[ConTeXt_reference_manual]] Section 5.8.3 Typeface definitions
* {{cmd|starttypescript}}
* [[Simple_Typescript_Example]]

== Help from ConTeXt-Mailinglist/Forum ==
All issues with:
{{Forum|{{SUBPAGENAME}}}}

[[Category:Command/Paragraphs|setupinterlinespace]]
[[Category:Command/Layout|setupinterlinespace]]
53

edits

Navigation menu