ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ConTeXt, XeTeX, special effects in Indic font for Kannada
Date: Thu, 08 Aug 2013 13:51:06 +0200	[thread overview]
Message-ID: <5203862A.2030605@wxs.nl> (raw)
In-Reply-To: <DDCBC53B-10E6-4045-8F84-96282202EFB1@zydenbos.net>

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
___________________________________________________________________________________

  reply	other threads:[~2013-08-08 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 11:00 Robert Zydenbos
2013-08-08 11:51 ` Hans Hagen [this message]
2013-08-08 12:26   ` Robert Zydenbos
2013-08-08 16:51     ` Hans Hagen
2013-08-08 19:39   ` Rajeesh K Nambiar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5203862A.2030605@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).