ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Hamid,Idris" <Idris.Hamid@ColoState.EDU>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: [NTG-context] Font switching, default features, and a request
Date: Sun, 13 Aug 2023 14:53:07 +0000	[thread overview]
Message-ID: <574e9369-5041-42a1-add0-9c2669392b17@Spark> (raw)


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

                 reply	other threads:[~2023-08-13 14:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=574e9369-5041-42a1-add0-9c2669392b17@Spark \
    --to=idris.hamid@colostate.edu \
    --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).