[NTG-context] two languages hyphenation

Yury G. Kudryashov urkud at ya.ru
Fri Jun 25 18:28:26 CEST 2010


Hans Hagen wrote:

> On 25-6-2010 2:24, Mojca Miklavec wrote:
>> Since they are written in two different scripts you can theoretically
>> enable them simultaneously (but I'm not sure if this is supported by
>> default).
> 
> interesting and quite trivial to support ... do you have a test file?
I do.

% Just \usetypescript[xits] doesn't work for me (I have xits fonts in 
~/.fonts). Probably, it is already fixed in the latest beta.
\starttypescript [math] [xits] [name]
  \definefontsynonym[MathRoman][name:xitsmath] 
[features=math\mathsizesuffix]
\stoptypescript

\starttypescript [serif] [xits] [name]
  \definefontsynonym[Serif]          [name:xitsregular]    
[features=default]
  \definefontsynonym[SerifBold]      [name:xitsbold]       
[features=default]
  \definefontsynonym[SerifItalic]    [name:xitsitalic]     
[features=default]
  \definefontsynonym[SerifBoldItalic][name:xitsbolditalic] 
[features=default]
\stoptypescript

\starttypescript[xits]
  \definetypeface [xits] [rm] [serif] [xits]   [default]
  \definetypeface [xits] [ss] [sans]  [heros]  [default] [rscale=0.9]
  \definetypeface [xits] [tt] [mono]  [modern] [default] [rscale=1.05]
  \definetypeface [xits] [mm] [math]  [xits]   [default]
\stoptypescript

\setupbodyfont[xits,12pt]

\starttext
% Hyphenated
{\language[ru]
\dorecurse{50}{русский текст }
}
% Not hyphenated
{\language[en]
\dorecurse{50}{русский текст }
}
% Not hyphenated
{\language[ru]
\dorecurse{50}{Multilingual }
}
% Hyphenated
{\language[en]
\dorecurse{50}{Multilingual }
}
\stoptext



More information about the ntg-context mailing list