summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/amiri/sources/kashida.fea
blob: 816c8ec8b7ba36758f33b05fe7dfd6a4398b348d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Kashida justification as implemented in most, if not all, applications is
// broken by design; it inserts kashidas *after* doing OT layout which makes it
// impossible for OT code to interact with those kashidas breaking all sorts of
// things.
// To trick LibreOffice/MS Office to not do kashida justification we set the
// default kashida to a zero width, blank glyph which makes them to think there
// is no suitable kashida glyph, resorting back to regular justification
// To get manually inserted kashida working we use an rlig feature to map to the
// actual kashida glyph(s).

feature rlig {
  lookupflag IgnoreMarks;
  sub uni0640 uni0640 uni0640 uni0640 by uni0640.4;
  sub uni0640 uni0640 uni0640         by uni0640.3;
  sub uni0640 uni0640                 by uni0640.2;
} rlig;

// should be merged with the bove lookup, FF ignores it for some reason.
feature rlig {
  lookupflag IgnoreMarks;
  sub uni0640                         by uni0640.1;
} rlig;

feature rlig {
  lookupflag IgnoreMarks;
  sub uni0640.1 uni0627.fina by uni0627.fina_Tatweel;
  sub uni0640.2 uni0627.fina by uni0627.fina_Tatweel;
  sub uni0640.3 uni0627.fina by uni0627.fina_Tatweel;
  sub uni0640.4 uni0627.fina by uni0627.fina_Tatweel;
} rlig;