ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Making necessary OpenType features on by default
Date: Sat, 21 Feb 2009 14:05:01 +0100	[thread overview]
Message-ID: <32A3D493-4371-459B-A2DA-3B98494BD641@gmail.com> (raw)
In-Reply-To: <499EFD12.1080808@wxs.nl>

Hi Hans, Khaled, and Idris,

If a humble opinion from an ordinary user may be issued, I agree with  
Khaled that it would be extremely useful to have some basic default  
settings for Arabic fonts, and even more generally for any particular  
fonts used for other languages. This would not prevent those  
specialist typesetters who want particular features to be turned on,  
to do so through appropriate mechanisms.

As a basic user I am frustrated when using mkiv, that most declaration  
of features are completely cryptic, and not being a specialist of OTF  
or other font specifications, I don't know which features are  
essential for writing and typesetting an article in Persian or any  
language using Arabic alphabet.
While the following is quite easy to understand and to use in XeConTeXt
%%%%%%%%%
%!TEX TS-program = xecontext

\TeXXeTstate=1

% defining a font for Arabic, Persian
\font\Faarsi="Scheherazade:script=arab" at 14pt
\Faarsi

% defining a font for Roman languages
\font\romfont="Times Roman" at 12pt
\def\rom#1{{\beginL\romfont #1\endL}}

\everypar={\setbox0=\lastbox \beginR \box0 }

\starttext
\rom{goedemorgen Hans}

  سلام خالد، درود بر ادریس
\stoptext
%%%%%%%%%%%

it is not so easy to figure out how to typeset the same thing in mkiv:  
for instance the non specialist has to try several fonts which are  
installed on his system before getting a result…
%%%%%%%%%%%
%!TEX TS-program = mkiv

\setupdirections[bidi=global]

% defining a font for Arabic, Persian
\definefontfeature
   [CrypticFeatures]
   [analyze=yes,
   mode=node,
   language=dflt,
   script=arab,
   aalt=yes,
   init=yes,
   medi=yes,
   fina=yes,
   isol=yes,
   liga=yes,
   mset=yes]

%\font\Faarsi=Scheherazade*CrypticFeatures at 14pt  % this does not work
% after trying a few other fonts one finds that the following works:
\font\Faarsi=arabtype*CrypticFeatures at 14pt

% defining a font for Roman languages
\setupbodyfont[12pt]
\def\rom#1{{\start \textdir TLT #1 \stop}}

\pardir TRT \textdir TRT

\starttext
\rom{goedemorgen Hans}

\start
\Faarsi
  سلام خالد، درود بر ادریس
\stop
\stoptext
%%%%%%%%%%%%

The ideal situation would be:
• in a document, when one sets a language then a certain font, with  
certain standard features is set by default;

• when an adapted font for that language is defined by the user, then  
certain features are set by default;

• possibly a command like \setupArabic[state=start] 
[...=...,features=...] (and the analogous settings for other languages  
such as \setupHanzi[state=start][...=...,features=...], and alike),  
could be imagined;

• for instance, as we have now in ConTeXt, when one has a document  
written in English, then without even defining a font one can write
\starttext
goedmorgen Hans! This is some maths formula: $a^2+b^2 = c^2$.
\stoptext

Therefore, in the same spirit one should have some default allowing  
the user to write
\setupArabic[state=start]
\setupHanzi[state=start]
\starttext
goedmorgen Hans! This is some maths formula: $a^2+b^2 = c^2$.
And this is some Arabic text written and typeset from right to left,  
in the midst of some English text:
\startArabic
  سلام خالد، درود بر ادریس
\stopArabic
and analogously this is in Hanzi
\startHanzi
大家你好
stopHanzi
\stoptext

I understand that this can be done by each user upon defining his own  
environment and installing fonts, etc. But
for the non specialist it is not that easy to understand the  
intricacies.

With my best regards: OK

On 20 févr. 09, at 19:57, Hans Hagen wrote:

> Khaled Hosny wrote:
>
>> Currently, when defining a font feature one has to enable all  
>> features
>> by hand which is IMHO not very user friendly as it implies prior
>> knowledge about OpenType font features and the meaning of each one,  
>> not
>> every Arabic user, for example, knows what does 'init', 'medi, etc.
>> ligatures mean yet to know that he must enable them to get proper  
>> font
>> rendering. I think some font features should be on by default, so  
>> that
>> \definefontfeature[script=arabic] should be enough to get an Arabic  
>> font
>> rendered correctly with the default features as its designer intended
>> (designers assume that certain will be on while other are off by
>> default, like liga vs. dlig), and if some one wants to disable a  
>> certain
>> default feature he can turn it off, not the reverse.
>> Microsoft's OpenType features list page
>> (http://www.microsoft.com/typography/otspec/features_ae.htm) gives  
>> a "UI
>> suggestion" for each feature noting if it should be on by default, I
>> think those are what most OpenType enable by default (at least the  
>> ones
>> I tested).
>
> i've been thinking of a features=default option (as there is already  
> features=yes|no)
>
> even then it can never be fully automatic as some usage of fonts  
> (think of verbatim) demands devation from defaults
>
> now, if we implement a default list then we first need to make a  
> detailed list of what the supposed defaults are (and i'm not sure if  
> ms is the only resource for that; after all, not all machineries  
> support all features)
>
> a related issue is that fonts can be used for different languages  
> and scripts and therefore a more dynamic feature switching might be  
> needed i.e. arabic might need init, but when the same font is used  
> for latin it not handy to have it enabled, so there might be a  
> matrix of features / scripts needed
>
> if it was trivial i'd already done it -)
>
> (implementing is trivial but i don't want to make the wrong decision  
> here as it will influence compatibility)
>
> Hans
>
>
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2009-02-21 13:05 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 18:39 Khaled Hosny
2009-02-20 18:57 ` Hans Hagen
2009-02-20 19:31   ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-20 21:02     ` Khaled Hosny
2009-02-20 21:23       ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-20 22:10         ` Hans Hagen
2009-02-20 22:26           ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-21 23:53             ` Karl Berry
2009-02-20 20:23   ` Khaled Hosny
2009-02-20 22:07     ` Hans Hagen
2009-02-20 22:49       ` Khaled Hosny
2009-02-21 15:58         ` Ilda Khaki
2009-02-23 10:58           ` Hans Hagen
2009-02-21 13:05   ` Otared Kavian [this message]
2009-02-22 21:03     ` Khaled Hosny
2009-02-22 22:44       ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-23 12:02         ` Khaled Hosny
2009-02-23 13:00           ` Hans Hagen
2009-02-23 15:34           ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-23 17:15             ` Khaled Hosny
2009-02-23 17:56               ` Idris Samawi Hamid
2009-02-23 22:51                 ` Khaled Hosny
2009-02-23 23:19                   ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-24 20:41                     ` Khaled Hosny
2009-02-25  2:30                       ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-23 10:53       ` Hans Hagen
2009-02-23 12:09         ` Khaled Hosny
2009-02-23 12:17           ` Thomas A. Schmitz
2009-02-23 12:28             ` Hans Hagen
2009-02-23 16:56               ` Khaled Hosny
2009-02-23 17:01                 ` Taco Hoekwater
2009-02-23 17:04                   ` Taco Hoekwater
2009-02-23 17:49                   ` Khaled Hosny
2009-02-23 23:23                 ` Hans Hagen
2009-02-24 15:49                   ` Idris Samawi Hamid
2009-02-24 16:03                     ` Hans Hagen
2009-02-23 12:36             ` Khaled Hosny
2009-02-22 22:54     ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-22 23:35     ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-21 21:14   ` Otared Kavian
2009-02-23 10:42     ` Hans Hagen
2009-02-23 12:25       ` Khaled Hosny
2009-02-23 12:46         ` Khaled Hosny
2009-02-23 12:56         ` Hans Hagen
2009-02-20 18:58 ` Hans Hagen
2009-02-20 20:27   ` Khaled Hosny
2009-02-20 22:09     ` Hans Hagen
2009-02-20 22:46 ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-21 11:41   ` Hans Hagen
2009-02-22 20:54     ` Khaled Hosny
2009-02-22 23:08       ` Idris Samawi Hamid ادريس سماوي حامد
2009-02-22 13:51   ` Khaled Hosny

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=32A3D493-4371-459B-A2DA-3B98494BD641@gmail.com \
    --to=otared@gmail.com \
    --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).