aliftype / xits

XITS - OpenType implementation of STIX fonts with math support
SIL Open Font License 1.1
351 stars 35 forks source link

greek letters in ConTeXt #5

Closed urkud closed 14 years ago

urkud commented 14 years ago

I try the following:

\usetypescript[xits]
\setupbodyfont[xits]
\starttext
$σ$
\stoptext

No σ in the resulting PDF file.

khaledhosny commented 14 years ago

The typescript included in ConTeXt searches for the fonts based by filename, so you need to install the fonts in texmf tree, propably under ~/texmf/fonts/opentype/xits, or try using this typescript:

\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

(assuming you installed the fonts in a way ConTeXt can find them by name)

urkud commented 14 years ago

Thanks. It works with your typescript. I have xits unpacked to ~/.fonts, and OSFONTDIR=$HOME/.fonts.