ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: Example for Persian
Date: Sun, 17 Sep 2000 23:44:45 +0200	[thread overview]
Message-ID: <3.0.6.32.20000917234445.008c1c90@pop.wxs.nl> (raw)
In-Reply-To: <39C3E16A.221C79C6@i-one.at>

At 11:08 PM 9/16/00 +0200, Behnam Tabatabai wrote:

>I have uploaded an example for utf-8 encoded Persian text to be used
>with Context+Omega to http://meineseite.i-one.at/behnam-tabatabai/
>I would be very thankful if you would have a look into it.

We may continue this thread off list, but some aspects may be interesting
to others so let me for the moment use the list:

Your file says: 

\font\OMARAB=omarab

far better is a definition like

\definefont[OMARAB][omarab sa 1] 

because it adapts itself to the body font size. Even better, if the beta
version we change the following [i'll add it to the beta]. 

\def\dododefinefont#1#2%
  {\parsefontspec[#2]{\bodyfontsize}{*#1*}\getvalue{*#1*}}

the \OMARAB\ command will now honor changes in size halfway the document
[for those interested: there is no real delay in resolving the font spec
each time and since persian is not used in math formulas, we don't need the
tex family concept here; this \definefotn mechanism is btw more powerful
than it may seem at first sight, since it scales, maps, etc quite nicely].

Then there is the OTP mechanism, which chains a series of filters. Whet we
need there is something similar, like (maybe we can leave the synonym here,
and auto resolve indirect mappings)

\definefiltersynonym [OTF8 to UNICODE16]   [inutf8]
\definefiltersynonym [farsi to arabic]     [FarsiToArabic]
\definefiltersynonym [preprocess arabic]   [uni2cuni]
\definefiltersynonym [build arabic glyphs] [cuni2oar]

next there is: 

\definefiltersequence[Farsi][OTF8 to UNICODE16, farsi to arabic, preprocess
arabic, build arabic glyphs]

[what is the 1000 in \ocplist\OCPListFarsiUTF=\addbeforeocplist 1000
\OCPutf ?]

[it's no problem to call sequences inside filter sequences] 

now we can say: 

\Farsi\OMARABIC

and get thoce nice sequences of glyphs. In this way we can hide the otp
interface and protect macros. 

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  parent reply	other threads:[~2000-09-17 21:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-15  9:47 Building format with TeX [and Omega] Behnam Tabatabai
2000-09-15 10:19 ` Hans Hagen
2000-09-15 17:52   ` Tobias Burnus
2000-09-16  4:48     ` Radhakrishnan C V
2000-09-16 21:08   ` Example for Persian Behnam Tabatabai
2000-09-17  4:00     ` Radhakrishnan C V
2000-09-17 21:44     ` Hans Hagen [this message]
2000-09-18 14:08 Behnam Tabatabai
2000-09-18 15:08 ` Hans Hagen
2000-09-18 19:56   ` Behnam Tabatabai

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=3.0.6.32.20000917234445.008c1c90@pop.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).