On Thu, 23 Aug 2007, Istvan Hollerbach wrote:
Hi,
Ok, I have seen showfont.pdf, and have tried
\definetypeface [times] [rm] [serif] [times] [default] [encoding=ec] \switchtotypeface [times] [12pt,rm],
and they work. But what are [rm], [encoding=ec] and why is included [times] twice? I do not understand the syntax.
This is the basic syntax of "using" a typeface (defining typefaces is different). \definetypeface [name of typeface] [style] [font style] [font name] [special mappings] [extras] You can give anything as the name of the typeface. In the above example it is times. When you switch to that font, you need to use the name of the typeface. So you could have also done \definetypeface [mainface] [rm] [serif] [times] [default] [encoding=ec] \switchtobodyfont[mainface, rm 12pt] The style (rm), and font style (serif) are needed for internal purposes. This is telling context that times is a serif font (http://en.wikipedia.org/wiki/Serif) and it will be used as the roman (rm) style of the typeface. Other options are sans serif (http://en.wikipedia.org/wiki/Sans-serif) used as sans-serif style, which is indicated by [ss] [sans]. The special mappings tell context if something special needs to be done for that font. I have only seen this being used for math fonts. In other cases you can leave it to default. The extras specify, encoding, scaling, (and in case of math fonts, the text typeface in math operators). In the above, encoding=ec tells ConTeXt to use ec encoding (also called cork encoding) see http://www.tug.org/fontname/html/Encodings.html#Encodings. The more commonly used encoding with context is texnansi (also called LY1). Aditya