On 8/8/2013 1:00 PM, Robert Zydenbos wrote:
On my Mac (Mountain Lion) I would like to use ConTeXt with a complex OpenType font named Kedage for the Indian language Kannada, and I thought that I could do this using XeTeX (because LuaTeX seems unable to handle Indic fonts at present).
forget about xetex, first check what context mkiv van do
This freely available font (found on Linux systems, for instance) comes in four files: Kedage-n.TTF, Kedage-b.TTF, Kedage-i.TTF, Kedage-t.TTF (normal, bold, italic and bolditalic, respectively).
I have been partly successful with the simple command
\definefontsynonym[kan][name:Kedage]
and then using
\definedfont[kan]
where I want to have the font in the text. Also \font\kannada="Kedage" (and \kannada later in the text) seems to work well without any further indications of language, script etc.
it all depends on how much processing is needed in context, there is experimental support for devanagari \definedfont[file:kedage-n*devanagari-one] but it all depends on what the font provides
However, I would also like to use the bold, italic and bolditalic forms of the font. Simply using \bold and \em does not work.
Here I see two possibilities:
(1) use the XeTeX parameters FakeSlant and FakeBold, which I have done in LaTeX. But I do not know how this is done in ConTeXt.
\starttext \definefontfeature[slanted] [slant=.2] \definefontfeature[boldened][extend=1.2] \definedfont[file:kedage-n*default] ಇಡೀ ಪ್ರಪಂಚದ ಜನರು ಒಂದೇ ಭಾಷೆಯನ್ನು ಮಾತಾಡುತ್ತಿ ದ್ದರು \definedfont[file:kedage-n*default,slanted] ಇಡೀ ಪ್ರಪಂಚದ ಜನರು ಒಂದೇ ಭಾಷೆಯನ್ನು ಮಾತಾಡುತ್ತಿ ದ್ದರು \definedfont[file:kedage-n*default,boldened] ಇಡೀ ಪ್ರಪಂಚದ ಜನರು ಒಂದೇ ಭಾಷೆಯನ್ನು ಮಾತಾಡುತ್ತಿ ದ್ದರು \definedfont[Serif*default] test \definedfont[Serif*default,boldened] test \stoptext
(2) use the other font files (Kedage-b.TTF etc.), and again I do not know how to do this.
see type-imp-* files (or give simplefonts a try) \definefontfeature[slanted] [slant=.2] \definefontfeature[boldened][extend=1.2] \starttypescript [serif] [kedage] [name] \definefontsynonym[Serif] [file:kedage-n] \definefontsynonym[SerifBold] [file:kedage-n][features={default,boldened}] \definefontsynonym[SerifItalic] [file:kedage-n][features={default,slanted}] \definefontsynonym[SerifBoldItalic][file:kedage-n][features={default,boldened,slanted}] \stoptypescript \starttypescript [kedage] \definetypeface[kedage][rm][serif][kedage][default] \definetypeface[kedage][mm][math] [modern][default] \stoptypescript \setupbodyfont[kedage] \starttext ಇದು ಕನ್ನಡದಲ್ಲಿದೆ. ಬಹಳ ರೋಚಕವಾದುದು, ಹೀಗೆ ಬರೆಯುವುದು ಎಂದು ಭಾವಿಸುತ್ತೇನೆ. {\bf ಈಗ ದಪ್ಪಗೆ} , ಮತ್ತು {\it ಕೊಂಕು} . ಇದು ಕನ್ನಡದಲ್ಲಿದೆ. ಬಹಳ ರೋಚಕವಾದುದು, ಹೀಗೆ ಬರೆಯುವುದು ಎಂದು ಭಾವಿಸುತ್ತೇನೆ.\par {\bf ಈಗ ದಪ್ಪಗೆ}\par , ಮತ್ತು\par {\it ಕೊಂಕು}\par .\par \stoptext Beware: there is bug in the luatex backend with respect to switching slanted/boldened that sometimes shows up. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------