Changes

Jump to navigation Jump to search
76 bytes added ,  14:52, 20 January 2005
m
Formatting, no content changes.
< [[Fonts]]
FlexiFace is a system I've been playing with for a few months on and off. Basically, it's to get around the difficulty of creating typefaces for every combination of fonts. It combines typescripts based on just one parameter -- &mdash;x-height -- &mdash;because other parameters (e.g., italic slant, color/weight) are really hard to quantify, and are best left to the typographer's artistry.
Currently, I normalise all fonts to match with Computer Modern Roman's x-height, which is 5.16667 points for a font size of 12 pt. Seeing that that was a little small, I implemented a variation for larger-eyed fonts, where all fonts are normalised around an x-height of 6.0 pt for the same body font size. Following me yet? How about this:
: When you use <ttcmd>\setupbodyfont[flex]</ttcmd>, you get the typescripts you called previously, accessible as <tt>rm</tt>, <tt>ss</tt>, etc. (as appropriate), all relatively scaled so that their x-height matches up with that of CMR.
Okay then, how about an example. Given the following in a typescript that gets loaded:
<pretexcode>
\starttypescript[palatino][texnansi,ec,8r,default]
\definetypeface[flex][rm][serif][palatino][default][rscale=0.91,encoding=\typescripttwo]
\definetypeface[flex][ss][sans][helvetica][default][rscale=0.83,encoding=\typescripttwo]
\stoptypescript
</pretexcode>
You can use FlexiFace with the following in your source file:
<pretexcode>
\usetypescript[palatino,helvetica][texnansi]% or ec or 8r
\setupbodyfont[flex,12pt,rm]
</pretexcode>
...and you get Palatino (serif and math) with Helvetica, both scaled to a compatible x-height. That seems more complex than necessary, given a one-time use, but the power behind FlexiFace lies in the endless combinations, and that it's embedded in the natural <ttcmd>\usetypescript</ttcmd> calls. Once it's set up, you only need to worry about calling one typeface/bodyfont.
Some side-effects to watch out for:
* The typeface doesn't make <tt>rm</tt> the default, so watch out. It's best to put 'rm' (or your choice) into the \<cmd>setupbodyfont </cmd> call, as above. (Hans points out that <ttcmd>\setuptypeface[flex][default=rm]</ttcmd> is just as effective, and it's probably better in a local config file.)* An x-height to match CMR is a bit small for most fonts -- &mdash;and it can distort the actual size of the font -- &mdash;so either be aware of this global rescaling (e.g., the "&ldquo;12pt" &rdquo; Palatino above actually comes out at 10.92pt after scaling) or use the <tt>flex2</tt> alternative.* This system depends on a "&ldquo;correct" &rdquo; ConTeXt font installation -- &mdash;it doesn't manage any magic if you haven't run TeXfont or use the berry typescripts.
The below typescript includes most of the TeXLive fonts supported in ConTeXt's distribution, and the [http://www.ramm.ch/fiee/texnique/?menu=0-1-4 type-microsoft and type-bitstream-vera] provided by [[User:Hraban|Hraban]]. I've kept some of my local extensions just in case they're useful to others as examples.
Here's my current (May/June 2004) [http://homepage.mac.com/atl/tex/type-flex.tex type-flex]:
<small><pretexcode>
% Flexible typefaces
% 2004.04.18 Adam Lindsay
\endinput
</pretexcode></small>

Navigation menu