ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Font switching, default features, and a request
@ 2023-08-13 14:53 Hamid,Idris
  0 siblings, 0 replies; only message in thread
From: Hamid,Idris @ 2023-08-13 14:53 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2634 bytes --]

Dear gang,

Consider the following example:

==============

\setupdirections[bidi=global,method=one]

\startTEXpage[offset=1em,width=14in]
\definedfont[almfixed*arabic]
\switchtobodyfont[almfixed*arabic]
\switchtobodyfont[almfixed]

% \addff{arabic}

\startbuffer[]
\startlines
الثَّعْلَبُ الْأَسْمَرُ السَّرِيعُ يَقْفِزُ فَوْقَ الْكَلْبِ الْكَسُولِ!
The quick brown fox jumps over the lazy dog!
\stoplines
\stopbuffer

{\tfxx \type{\tfxx} \getbuffer}

{\tfx \type{\tfx} \getbuffer}

\type{\tf} \getbuffer

{\tfa \type{\tfa} \getbuffer}

{\tfb \type{\tfb} \getbuffer}

{\tfc \type{\tfc} \getbuffer}

{\tfd \type{\tfd} \getbuffer}
\stopTEXpage
==============

There are three font switches to choose from:

==============
\definedfont[almfixed*arabic]
\switchtobodyfont[almfixed*arabic]
\switchtobodyfont[almfixed]
==============

Let's toggle one at a time:

1) \definedfont[almfixed*arabic]

a) gives us the correct bidi output, but only for the \tf size
b) is ignored for every other size switch.

a) and b) are expected behavior.

2) \switchtobodyfont[almfixed]

a) gives us Arabic-script bidi output,
b) exhibits no Arabic-script features
c) gives the same result for each size switch

This means that the fontfeature "arabic" -- already predefined in ConTeXt (font-pre.mkiv) -- is not explicitly applied.

Curiously, invoking

\addff{arabic}

does not affect the output. Why is it that \addff{arabic} does not work here?

3) \switchtobodyfont[almfixed*arabic]

suppresses the font entirely and we're back to Latin Modern for all sizes. Assuming that this is expected behavior, it appears to follow that fontfeatures cannot be invoked for \switchtobodyfont and the like, only from within the typescript read by \switchtobodyfont etc.
=======

REQUEST:

Since ALMFixed is already distributed with ConTeXt, could Hans make the fontfeature "arabic" default for this font? That is

\switchtobodyfont[almfixed]

should automatically

a) give us Arabic-script bidi output (already there),
b) exhibit Arabic-script features (missing)
c) gives the same result for each size switch (already there)

(Indeed, it would be useful to have *arabic-predefined typescripts/bodyfonts for a few other commonly available/used Arabic fonts as well. Would be willing to make a list at some point, test, etc.)

Thank you in advance for considering this request.

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

[-- Attachment #1.2: Type: text/html, Size: 3567 bytes --]

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-13 14:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-13 14:53 [NTG-context] Font switching, default features, and a request Hamid,Idris

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