From: Joey McCollum via ntg-context <ntg-context@ntg.nl>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: Joey McCollum <jmccollum20140511@gmail.com>,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Unicode normalization and Hebrew in ConTeXt
Date: Mon, 16 Aug 2021 20:07:14 -0400 [thread overview]
Message-ID: <CAGxRUG9LN97bPutiR6ovLN1eas-yCiE_2sgy=VbH6T5Qz0Tv3Q@mail.gmail.com> (raw)
In-Reply-To: <CAGxRUG-gvopyDYE-AZn5dOJ-rgeB8jy-FCVG6wpUrVHVy-ijmQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 4060 bytes --]
Hans,
Sorry to bring this up after over a year, but I just noticed something that
doesn't seem right. I implemented some contextual substitutions in my own
fork of the Keter YG Hebrew font (.ttf file attached) under the "dlig"
feature that should do the following two things:
1. If a *shin *with a *sin *dot (שׂ) is pointed with a *holam *(the
vowel point placed high and on the left), then the *shin*, *sin *dot,
and *holam *are combined into a single ligature that depicts the *sin *dot
and *holam *merged into a single point.
2. If a *shin *with a *shin *dot (שׁ) follows another letter pointed
with a *holam *(except for *vav*, which must be pointed with a *holam
haser*), then the shin and shin dot are replaced with a ligature that
moves the *shin* dot a bit to the right (so that it appears to be merged
with the preceding *holam*), and the combination of the preceding letter
and the actual holam is changed to just the preceding letter (thus
effectively stripping the old *holam*).
I've tested both of these features in FontForge, and they work as expected
there. Likewise, if I test them in the following XeLaTeX script, XeLaTeX
handles both rules correctly:
```
\documentclass{article}
%Set fonts and font features:
\usepackage{fontspec}
\setmainfont[Path=../fonts/KeterYG/, UprightFont = *-Medium, Script=Hebrew,
Ligatures=Discretionary]{KeterYG} % I'm using a local copy of the attached
font
\begin{document}
שֹׂבַע
עָשׂוֹר
קֹשֶׁט
שֹׁשַׁנִּים
עָשׂוֹר
מֹשֶׁה
שַׁלֹשׁ
\end{document}
```
But in ConTeXt, only rule (1) above works as expected. Here is a minimal
(non-)working example:
```
\starttypescriptcollection[keteryg]
\starttypescript[serif][keteryg]
\definefontsynonym[Serif][file:../fonts/KeterYG/KeterYG-Medium.ttf][features=hebrew]
% use a local copy of the attached font, with all the necessary Hebrew
features (this includes dlig by default)
\stoptypescript
\starttypescript[keteryg]
\definetypeface[keteryg][rm][serif][keteryg][default]
\stoptypescript
\stoptypescriptcollection
%Set up the main font:
\setupbodyfont[keteryg]
%Set up right-to-left alignment:
\setupalign[r2l]
\starttext
שֹׂבַע
עָשׂוֹר
קֹשֶׁט
שֹׁשַׁנִּים
עָשׂוֹר
מֹשֶׁה
שַׁלֹשׁ
\stoptext
```
In examples 3, 4, 6, and 7, the *holam *dot still appears before the *shin*
-with-merged-*shin*-dot-and-*holam *ligature, when it should be absent. (I
realize that it may be difficult to tell; in the last two examples, the
presence of two dots is easier to make out.)
Do you have any idea why this might be happening in ConTeXt? Does the glyph
reordering in font-imp-combining.lua take place before any OpenType
features in the font are applied?
Thanks again!
Joey
On Thu, Apr 30, 2020 at 4:17 PM Joey McCollum <jmccollum20140511@gmail.com>
wrote:
> Okay! I have not figured out how to add a new page to the wiki, but I was
> able to add a section to the end of the "Arabic and Hebrew" page (
> https://www.contextgarden.net/Arabic_and_Hebrew) discussing the issue,
> providing a test, and briefly describing the fix.
>
> Joey
>
> On Thu, Apr 30, 2020 at 11:14 AM Hans Hagen <j.hagen@xs4all.nl> wrote:
>
>> On 4/30/2020 4:28 PM, Joey McCollum wrote:
>> > Thanks so much, Hans! I should be able to add a wiki page summarizing
>> > the tests before the end of the week.
>> >
>> > For reference purposes, do you know which version of ConTeXt has (or
>> > will have) this update included?
>> todays upload
>>
>>
>> -----------------------------------------------------------------
>> Hans Hagen | PRAGMA ADE
>> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -----------------------------------------------------------------
>>
>
[-- Attachment #1.2: Type: text/html, Size: 6651 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2021-08-17 0:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 11:59 Joey McCollum
2020-04-28 13:17 ` Hans Hagen
[not found] ` <CAGxRUG_cyT1XfYTvTh23+LaVg4an8exL-LZYfbZUOf+s2XvRRQ@mail.gmail.com>
2020-04-28 16:16 ` Fwd: " Joey McCollum
2020-04-28 18:03 ` Hans Hagen
2020-04-28 18:21 ` Hans Hagen
2020-04-28 19:06 ` Joey McCollum
2020-04-30 19:40 ` Arthur Reutenauer
2020-04-30 9:26 ` Hans Hagen
2020-04-30 14:28 ` Joey McCollum
2020-04-30 15:14 ` Hans Hagen
2020-04-30 20:17 ` Joey McCollum
2021-08-17 0:07 ` Joey McCollum via ntg-context [this message]
2021-08-17 9:19 ` Hans Hagen via ntg-context
2021-08-17 12:56 ` Joey McCollum via ntg-context
2021-08-17 19:46 ` Joey McCollum via ntg-context
2021-08-18 13:19 ` Hans Hagen via ntg-context
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='CAGxRUG9LN97bPutiR6ovLN1eas-yCiE_2sgy=VbH6T5Qz0Tv3Q@mail.gmail.com' \
--to=ntg-context@ntg.nl \
--cc=j.hagen@xs4all.nl \
--cc=jmccollum20140511@gmail.com \
/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).