Re: [NTG-context] ConTeXt, XeTeX, special effects in Indic font for Kannada

2013-08-08 Thread Hans Hagen

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ConTeXt, XeTeX, special effects in Indic font for Kannada

2013-08-08 Thread Robert Zydenbos
Hans,

Just now I tried your suggestions:

On Aug 8, 2013, at 13:51 , Hans Hagen pra...@wxs.nl wrote:

 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] ...

The slanting and stretched effects come out nicely -- but the complex 
combinations of the signs are not supported as they are in XeTeX. XeTeX 
supports the combinations, but not the effects (see attachments 
hagen-kan-luatex.pdf and hagen-kan-xetex.pdf).

 (2) use the other font files (Kedage-b.TTF etc.), and again I do not know 
 how to do this.
 
 \definefontfeature[slanted] [slant=.2]
 \definefontfeature[boldened][extend=1.2]
 
 \starttypescript [serif] [kedage] [name] ...

No, unfortunately that one doesn't work so well (see attachment 
hagen-kan1-luatex.pdf).

 in context, there is experimental support for devanagari
 \definedfont[file:kedage-n*devanagari-one]
 
 but it all depends on what the font provides

Is there any way to find out the font's possibilities, if one doesn't have any 
technical documentation about it?

Robert



hagen-kan-luatex.pdf
Description: Adobe PDF document


hagen-kan-xetex.pdf
Description: Adobe PDF document


hagen-kan1-luatex.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ConTeXt, XeTeX, special effects in Indic font for Kannada

2013-08-08 Thread Hans Hagen

On 8/8/2013 2:26 PM, Robert Zydenbos wrote:


Is there any way to find out the font's possibilities, if one doesn't have any 
technical documentation about it?


looking at tables in the font ... in fact, this font is somewhat messed 
up as it uses latin glyph names for kannaga ligatures


concerning indic scripts ... this is an ongoing project:

- kai eigner made the first setup, for devangari only but extending is a 
matter of adding more info


- i cleaned up the code and optimized it (runs reasonable fast now) and 
and probably in the process broke some things


anyhow, I added a few more entries in tables and get different output 
but also the impression that some glyphs get lost) so we're not there yet


\definefontfeature[slanted] [slant=.2]
\definefontfeature[boldened][extend=1.2]

\definefontfeature[kannada][devanagari-one][script=knda]

\starttypescript [serif] [kedage] [name]
\definefontsynonym[Serif]  [file:kedage-n][features={kannada}]
\definefontsynonym[SerifBold] 
[file:kedage-n][features={kannada,default,boldened}]
\definefontsynonym[SerifItalic] 
[file:kedage-n][features={kannada,default,slanted}]


\definefontsynonym[SerifBoldItalic][file:kedage-n][features={kannada,default,boldened,slanted}]
\stoptypescript

\starttypescript [kedage]
\definetypeface[kedage][rm][serif][kedage][default]
\definetypeface[kedage][mm][math] [modern][default]
\stoptypescript

\setupbodyfont[kedage]

\enabletrackers[otf.analyzing]

\starttext

ಇದು ಕನ್ನಡದಲ್ಲಿದೆ. ಬಹಳ ರೋಚಕವಾದುದು, ಹೀಗೆ ಬರೆಯುವುದು ಎಂದು ಭಾವಿಸುತ್ತೇನೆ.

{\definedfont[file:kedage-n]ಇದು ಕನ್ನಡದಲ್ಲಿದೆ. ಬಹಳ ರೋಚಕವಾದುದು, ಹೀಗೆ ಬರೆಯುವುದು 
ಎಂದು ಭಾವಿಸುತ್ತೇನೆ.}


% ಇದು ಕನ್ನಡದಲ್ಲಿದೆ. ಬಹಳ ರೋಚಕವಾದುದು, ಹೀಗೆ ಬರೆಯುವುದು ಎಂದು ಭಾವಿಸುತ್ತೇನೆ.\par
% {\bf ಈಗ ದಪ್ಪಗೆ}\par
% , ಮತ್ತು\par
% {\it ಕೊಂಕು}\par
% .\par

\stoptext

we can probably best move this discussion off list .. for instance we 
need to figure out what


-- 0C82 anusvara
-- 0C83 visarga
-- 0CBD avagraha
-- 0CD5 length mark
-- 0CD6 ai length mark
-- 0CE0 letter ll
-- 0CE1 letter rr
-- 0CE2 vowel sign l
-- 0CE2 vowel sign ll
-- 0CF1 sign
-- 0CF2 sign
-- OCE6 - OCEF digits

does (maybe some has to be added to some tables).

It's probably no big deal to get some more scripts working given what's 
already there ... more a matter of testing (and no, i can't read those 
scripts).


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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ConTeXt, XeTeX, special effects in Indic font for Kannada

2013-08-08 Thread Rajeesh K Nambiar
On Thu, Aug 8, 2013 at 1:51 PM, Hans Hagen pra...@wxs.nl wrote:

 forget about xetex, first check what context mkiv van do


Sorry to hijack this thread, but...

Hans, it would be great to see Indic languages support in
context/mkiv. At the moment I am typesetting, for example, in
Malayalam using mkii+xetex. So I tested context (from TeXLive 2013
distribution) but found that the rendering is not correct. There are
examples and screenshots here in an old thread:
http://tex.stackexchange.com/questions/89118/context-xetex-texlive-2012-does-not-work-for-indic-scripts-like-malayalam

I am interested in helping, at least by testing, especially Malayalam
support. Harfbuzz has excellent opentype support for Malayalam now,
which could be used for comparing the rendering.


-- 
Cheers,
Rajeesh
http://rajeeshknambiar.wordpress.com
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___