Specifying the current font |
In this section, we describe the environment variables which control
the rendering of fonts. Several parameters may be defined
independently for each mode (the font name, variant, series and
shape), whereas other parameters are uniform for all modes. Font
properties may be controlled globally for the whole document in
From an abstract point of view, a font is defined to be a graphically consistent way of rendering strings. Fonts are usually made up from glyphs like “x”, “ffi”, “α”, “∑”, etc. When rendering a string, the string is decomposed into glyphs so as to take into account ligatures (like fi, fl, ff, ffi, ffl). Next, the individual glyphs are positioned while taking into account kerning information (in “xo” the “o” character is slightly shifted to the left so as to take profit out of the hole in the “x”). In the case of mathematical fonts, TeXmacs also provides a coherent rendering for resizable characters, like the large brackets in
Similarly, a font family is a family of fonts with different characteristics (like font weight, slant, etc.), but with a globally consistent rendering. One also says that the fonts in a font family “mix well together”. For instance, the standard computer modern roman font and its bold and italic variants mix well together, but the computer modern roman font and the Avant Garde font do not.
font≔roman
math-font≔roman
These variables control the main name of the font, also called the font family. For instance:
Similarly, TeXmacs supports various mathematical fonts:
Roman: a2 +
b2 = c2
Adobe: a2 +
b2 = c2
New roman: a2 +
b2 = c2
Concrete: a2 +
b2 = c2
font-family≔rm
math-font-family≔mr
This variable selects a variant of the major font, like a sans serif font, a typewriter font, and so on. As explained above, variants of a given font are designed to mix well together. Physically speaking, many fonts do not come with all possible variants (sans serif, typewriter, etc.), in which case TeXmacs tries to fall back on a suitable alternative font.
Typical variants for text fonts are rm (roman), tt (typewriter) and ss (sans serif):
roman, typewriter and
In maths mode, a distinction is made between the mathematical variants mr (roman), mt (typewriter) and ms (sans serif) and textual variants rm (roman), bf (bold), etc. In the first case, variables and operators are usually rendered in a different slant, contrary to the second case:
ms: sin (x +
y) = sin x cos y +
cos x sin y
ss: sin (x +
y) = sin x cos y +
cos x sin y
font-series≔medium
math-font-series≔medium
The font series determines the weight of the font. Most fonts only provide regular and bold font weights. Some fonts also provide light as a possible value.
medium, bold
font-shape≔right
math-font-shape≔normal
The font shape determines other characters of a font, like its slant, whether we use small capitals, whether it is condensed, and so on. For instance,
The base font size is specified in pt units and is usually invariant throughout the document. Usually, the base font size is 9pt, 10pt, 11pt or 12pt. Other font sizes are usually obtained by changing the magnification or the relative font-size.
9pt, 10pt, 11pt, 12pt
The real font size is obtained by multiplying the font-base-size
by the font-size multiplier. The
following standard font sizes are available from
|
||||||||||||||||||||
From a mathematical point of view, the multipliers are in a geometric progression with factor sqrt4 (2). Notice that the font size is also affected by the index level.
The rendering quality of raster fonts (also called Type 3 fonts),
such as the fonts generated by the