Wolfgang Schuster wrote:
2007/11/7, Hans Hagen
: Duncan Hothersall wrote:
Hans said:
\definefontsize[e]
\setupfontenvironment [default] [e=4]
Ah, thanks. Using \setupbodyfontenvironment as the second command did the trick.
I guess there is no easy way of directly calling a specific font at a specific size? No worry, this sort of solution will allow me to do what I need for now. Thanks Hans. chinese in mkii is kind of special, i.e. all kind of mappings to ranges of fonts; in mkiv chines is easier (i still have to finish some spacing issues)
How about a little appetizer from mkiv.
\definefontfeature[chinese][analyze=yes,language=dflt,mode=node,script=hani]
\starttypescript[sans][arial] \definefontsynonym[Sans][Arial][features=chinese] \stoptypescript
\starttypescript[sans][arial] \definefontsynonym[Arial][file:ARIALUNI][features=default] \stoptypescript
\definetypeface[arial][ss][sans][arial][default]
\setupbodyfont[arial,ss]
% alternative to the typescript solution %\definefont[Normal][ARIALUNI*chinese at 12pt][line=16pt]
\starttext
write your chinese text here
\stoptext
There will be no longer any big difference in defining fonts for latin or any other language. A few things are to achive than with the current code from the chinese module like opening and closing braces in vertical mode.
a next mkiv release will provide dynamic features ... \definefontfeature[chinese][analyze=yes,language=dflt,mode=node,script=hani] \starttypescript[sans][arial] \definefontsynonym[Sans][Arial] \stoptypescript \starttypescript[sans][arial] \definefontsynonym[Arial][file:ARIALUNI] \stoptypescript \definetypeface[arial][ss][sans][arial][default] \setupbodyfont[arial,ss] \starttext bla bla {\setfontfeature{chinese} MORE BLA} bla bla {\setfontfeature{oldstyle} 1234} bla bla \stoptext so, just one font instance and independent feature switches; this saves multiple definitions of fonts and is therefore faster and takes less memory too Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------