175175 OT_LABEL_END \
176176 OT_UHEADLESSARRAY (Name##ComponentsArray, OT_LIST (Components))
177177
178-
179178/*
180179 *
181180 * Start of Windows-1256 shaping table.
200199/* Shorthand. */
201200#define G OT_GLYPHID
202201
203- /* We use this to differentiate a medial-Lam from an initial-Lam.
204- * In this two-shape encoding, those two have the same glyph. But
205- * for Lam-Alef ligature formations we need to differentiate. As
206- * such, we add a MultipleSubst to the end of 'medi' feature to
207- * insert an extra glyph there, and we use that to replace the
208- * proper ligature later. As long as this is the code for an
209- * isolated form, it will work fine, as an isolated form cannot
210- * happen between a Lam-Alef sequence of the shapes that form a
211- * ligature. */
212- #define LAM_MEDI_MARKER 225
213-
214-
215202/*
216203 * Table Start
217204 */
@@ -222,11 +209,10 @@ OT_TABLE_START
222209 * Manifest
223210 */
224211MANIFEST (
212+ MANIFEST_LOOKUP (OT_TAG (' r' ,' l' ,' i' ,' g' ), rligLookup)
225213 MANIFEST_LOOKUP (OT_TAG (' i' ,' n' ,' i' ,' t' ), initLookup)
226214 MANIFEST_LOOKUP (OT_TAG (' m' ,' e' ,' d' ,' i' ), mediLookup)
227- MANIFEST_LOOKUP (OT_TAG (' m' ,' e' ,' d' ,' i' ), mediLamLookup)
228215 MANIFEST_LOOKUP (OT_TAG (' f' ,' i' ,' n' ,' a' ), finaLookup)
229- MANIFEST_LOOKUP (OT_TAG (' r' ,' l' ,' i' ,' g' ), rligLookup)
230216 MANIFEST_LOOKUP (OT_TAG (' r' ,' l' ,' i' ,' g' ), rligMarksLookup)
231217)
232218
@@ -240,12 +226,14 @@ OT_LOOKUP(initLookup, OT_LOOKUP_TYPE_SUBST_SINGLE, OT_LOOKUP_FLAG_IGNORE_MARKS,
240226OT_LOOKUP (mediLookup, OT_LOOKUP_TYPE_SUBST_SINGLE, OT_LOOKUP_FLAG_IGNORE_MARKS,
241227 OT_OFFSET (mediLookup, initmediSubLookup)
242228 OT_OFFSET (mediLookup, mediSubLookup)
229+ OT_OFFSET (mediLookup, medifinaLamAlefSubLookup)
243230)
244231OT_LOOKUP (finaLookup, OT_LOOKUP_TYPE_SUBST_SINGLE, OT_LOOKUP_FLAG_IGNORE_MARKS,
245232 OT_OFFSET (finaLookup, finaSubLookup)
246- )
247- OT_LOOKUP (mediLamLookup, OT_LOOKUP_TYPE_SUBST_MULTIPLE, OT_LOOKUP_FLAG_IGNORE_MARKS,
248- OT_OFFSET (mediLamLookup, mediLamSubLookup)
233+ /* We don't need this one currently as the sequence inherits masks
234+ * from the first item. Just in case we change that in the future
235+ * to be smart about Arabic masks when ligating... */
236+ OT_OFFSET (finaLookup, medifinaLamAlefSubLookup)
249237)
250238OT_LOOKUP (rligLookup, OT_LOOKUP_TYPE_SUBST_LIGATURE, OT_LOOKUP_FLAG_IGNORE_MARKS,
251239 OT_OFFSET (rligLookup, lamAlefLigaturesSubLookup)
@@ -277,11 +265,10 @@ OT_SUBLOOKUP_SINGLE_SUBST_FORMAT2(finaSubLookup,
277265 G (2 ) G (1 ) G (3 ) G (181 ) G (0 ) G (159 ) G (8 ) G (10 ) G (12 )
278266 G (29 ) G (127 ) G (152 ) G (160 ) G (156 )
279267)
280- OT_SUBLOOKUP_MULTIPLE_SUBST_FORMAT1 (mediLamSubLookup ,
281- G (141 ),
282- OT_OFFSET (mediLamSubLookup, mediLamSequence )
268+ OT_SUBLOOKUP_SINGLE_SUBST_FORMAT2 (medifinaLamAlefSubLookup ,
269+ G (165 ) G ( 178 ) G ( 180 ) G ( 252 ),
270+ G ( 170 ) G ( 179 ) G ( 185 ) G ( 255 )
283271)
284- OT_SEQUENCE (mediLamSequence, G (141 ) G (LAM_MEDI_MARKER))
285272
286273/*
287274 * Lam+Alef ligatures
@@ -295,19 +282,11 @@ OT_LIGATURE_SET(lamLigatureSet,
295282 OT_OFFSET (lamLigatureSet, lamInitLigature2)
296283 OT_OFFSET (lamLigatureSet, lamInitLigature3)
297284 OT_OFFSET (lamLigatureSet, lamInitLigature4)
298- OT_OFFSET (lamLigatureSet, lamMediLigature1)
299- OT_OFFSET (lamLigatureSet, lamMediLigature2)
300- OT_OFFSET (lamLigatureSet, lamMediLigature3)
301- OT_OFFSET (lamLigatureSet, lamMediLigature4)
302285)
303286OT_LIGATURE (lamInitLigature1, G (0 ), G (165 ))
304287OT_LIGATURE (lamInitLigature2, G (1 ), G (178 ))
305288OT_LIGATURE (lamInitLigature3, G (2 ), G (180 ))
306289OT_LIGATURE (lamInitLigature4, G (3 ), G (252 ))
307- OT_LIGATURE (lamMediLigature1, G (LAM_MEDI_MARKER) G (0 ), G (170 ))
308- OT_LIGATURE (lamMediLigature2, G (LAM_MEDI_MARKER) G (1 ), G (179 ))
309- OT_LIGATURE (lamMediLigature3, G (LAM_MEDI_MARKER) G (2 ), G (185 ))
310- OT_LIGATURE (lamMediLigature4, G (LAM_MEDI_MARKER) G (3 ), G (255 ))
311290
312291/*
313292 * Shadda ligatures
0 commit comments