Multiple Hebrew diacritics, canonical ordering & ccmp substitutions

Hey, I need help with the following issue:

Consider SHIN with DAGESH (שּ) and some other diacritical mark X (X could be SHIN DOT, SIN DOT, QAMATS, PATAH, etc.).
I have a SHIN_DAGESH ligature which should be mandatory, so I've added a ccmp rule substituting SHIN + DAGESH with SHIN_DAGESH.
However, this rule doesn't have effect on SHIN + X + DAGESH, typed in this order, at least not in InDesign.

I was under the impression there was canonical ordering substituting either SHIN + X + DAGESH with SHIN + DAGESH + X or the other way around (I don't know/remember which way), so there was no difference between these two. Apparently, either InDesign doesn't perform canonical ordering or it implements ccmp first (or I'm missing something... Am I?).

I'd like SHIN + X + DAGESH to produce / behave like SHIN_DAGESH + X.
Moreover, I'd also like SHIN + X + Y + DAGESH to produce / behave like SHIN_DAGESH + X + Y, in case either X or Y is SHIN DOT or SIN DOT and the other one is some nikud mark (QAMATS, PATAH, etc.).
I'm reluctant to code these manually, it doesn't "feel right" to me.
Is there another solution?

Thanks!

Comments

  • Hi Ori,
    In your lookups first:
    SHIN + X + DAGESH
    SHIN + SINDOT +DAGESH
    SHIN + X
    SHIN+SINDOT
    SHIN + DAGESH

    I HOPE IT HELPS

    Regards

  • John Hudson
    John Hudson Posts: 3,186
    If you add mark filtering to your ccmp lookup that produces the shin_dasgesh ligature, that will ensure that the ligature forms even if an intervening mark is in the glyph run.
  • I’m with John on this. It’s absolutely necessary to have this capability when you import texts from outside sources. Very few people know the “correct” typing order for Hebrew with diacritics.

    It’s curious to see that, in Lucida Grande (the font used here), the dagesh in the shin is incorrectly positioned.

  • bdenckla
    bdenckla Posts: 12
    edited March 2023
    Here’s a concrete example of what @John Hudson suggests. Or, for posterity, in case that link isn’t as “perma” as one might hope:

    @dagesh_n_rafe = [dagesh rafe];
    
    lookup ccmp03DageshAndRafeh {
      lookupflag UseMarkFilteringSet @dagesh_n_rafe;
      # [...]
      sub shin dagesh by shindagesh;
      sub trueshin dagesh by trueshindagesh;
      sub sin dagesh by sindagesh;
      # [...]
    } ccmp03DageshAndRafeh;
    
    @dots_for_shinbase = [shindot sindot];
    
    lookup ccmp02ShinDotAndSinDot {
      lookupflag UseMarkFilteringSet @dots_for_shinbase;
      sub shin shindot by trueshin;
      sub shin sindot by sin;
      sub shindagesh shindot by trueshindagesh;
      sub shindagesh sindot by sindagesh;
    } ccmp02ShinDotAndSinDot;

  • Ori Ben-Dor
    Ori Ben-Dor Posts: 386
    Perfect, this mark filtering is exactly the kind of solution I was hoping for.
    Thanks! :smile: