ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt, XeTeX, special effects in Indic font for Kannada
@ 2013-08-08 11:00 Robert Zydenbos
  2013-08-08 11:51 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Zydenbos @ 2013-08-08 11:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

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

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.

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.

(2) use the other font files (Kedage-b.TTF etc.), and again I do not know how to do this.

Can anybody help me out, either way? (I have attached a sample.)

Robert


[-- Attachment #2: kannadacontext.pdf --]
[-- Type: application/pdf, Size: 14656 bytes --]

[-- Attachment #3: kannadacontext.tex --]
[-- Type: application/octet-stream, Size: 553 bytes --]

\font\kannada="Kedage"

\definefontsynonym[kan][name:Kedage]

\starttext

We will now use a Kannada font named Kedage in XeConTeXt.\blank

{\kannada ಇದು ಕನ್ನಡದಲ್ಲಿದೆ. ಬಹಳ ರೋಚಕವಾದುದು, ಹೀಗೆ ಬರೆಯುವುದು ಎಂದು ಭಾವಿಸುತ್ತೇನೆ. \bold ಈಗ ದಪ್ಪಗೆ, ಮತ್ತು \em ಕೊಂಕು.} (Kedage)\blank

And now it is defined differently:
{\definedfont[kan] ಇದು ಓದಬಹುದಾ? \bold ಓದಬಹುದಾ?}\blank


\stoptext

[-- Attachment #4: Type: text/plain, Size: 2 bytes --]




[-- Attachment #5: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt, XeTeX, special effects in Indic font for Kannada
  2013-08-08 11:00 ConTeXt, XeTeX, special effects in Indic font for Kannada Robert Zydenbos
@ 2013-08-08 11:51 ` Hans Hagen
  2013-08-08 12:26   ` Robert Zydenbos
  2013-08-08 19:39   ` Rajeesh K Nambiar
  0 siblings, 2 replies; 5+ messages in thread
From: Hans Hagen @ 2013-08-08 11:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt, XeTeX, special effects in Indic font for Kannada
  2013-08-08 11:51 ` Hans Hagen
@ 2013-08-08 12:26   ` Robert Zydenbos
  2013-08-08 16:51     ` Hans Hagen
  2013-08-08 19:39   ` Rajeesh K Nambiar
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Zydenbos @ 2013-08-08 12:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

Hans,

Just now I tried your suggestions:

On Aug 8, 2013, at 13:51 , Hans Hagen <pragma@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


[-- Attachment #2: hagen-kan-luatex.pdf --]
[-- Type: application/pdf, Size: 9987 bytes --]

[-- Attachment #3: hagen-kan-xetex.pdf --]
[-- Type: application/pdf, Size: 8937 bytes --]

[-- Attachment #4: hagen-kan1-luatex.pdf --]
[-- Type: application/pdf, Size: 9985 bytes --]

[-- Attachment #5: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt, XeTeX, special effects in Indic font for Kannada
  2013-08-08 12:26   ` Robert Zydenbos
@ 2013-08-08 16:51     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2013-08-08 16:51 UTC (permalink / raw)
  To: ntg-context; +Cc: g.c.eigner

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ConTeXt, XeTeX, special effects in Indic font for Kannada
  2013-08-08 11:51 ` Hans Hagen
  2013-08-08 12:26   ` Robert Zydenbos
@ 2013-08-08 19:39   ` Rajeesh K Nambiar
  1 sibling, 0 replies; 5+ messages in thread
From: Rajeesh K Nambiar @ 2013-08-08 19:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Aug 8, 2013 at 1:51 PM, Hans Hagen <pragma@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-08 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-08 11:00 ConTeXt, XeTeX, special effects in Indic font for Kannada Robert Zydenbos
2013-08-08 11:51 ` Hans Hagen
2013-08-08 12:26   ` Robert Zydenbos
2013-08-08 16:51     ` Hans Hagen
2013-08-08 19:39   ` Rajeesh K Nambiar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).