@@ -49,17 +49,17 @@ typedef struct {
49
49
50
50
typedef SFBoolean (* _SFGlyphAssessment )(_SFGlyphAgent * glyphAgent );
51
51
52
- static SFBoolean _SFApplyRuleSetTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
52
+ static SFBoolean _SFApplyRuleSetTable (SFTextProcessorRef textProcessor ,
53
53
SFData ruleSetTable , _SFGlyphAssessment glyphAsessment , void * helperPtr );
54
- static SFBoolean _SFApplyRuleTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
54
+ static SFBoolean _SFApplyRuleTable (SFTextProcessorRef textProcessor ,
55
55
SFData ruleTable , SFBoolean includeFirst , _SFGlyphAssessment glyphAsessment , void * helperPtr );
56
56
57
- static SFBoolean _SFApplyChainRuleSetTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
57
+ static SFBoolean _SFApplyChainRuleSetTable (SFTextProcessorRef textProcessor ,
58
58
SFData chainRuleSetTable , _SFGlyphAssessment glyphAsessment , void * helperPtr );
59
- static SFBoolean _SFApplyChainRuleTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
59
+ static SFBoolean _SFApplyChainRuleTable (SFTextProcessorRef textProcessor ,
60
60
SFData chainRuleTable , SFBoolean includeFirst , _SFGlyphAssessment glyphAsessment , void * helperPtr );
61
61
62
- static SFBoolean _SFApplyContextLookups (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
62
+ static SFBoolean _SFApplyContextLookups (SFTextProcessorRef textProcessor ,
63
63
SFData lookupArray , SFUInteger lookupCount , SFUInteger contextStart , SFUInteger contextEnd );
64
64
65
65
static SFBoolean _SFAssessGlyphByEquality (_SFGlyphAgent * glyphAgent )
@@ -209,7 +209,7 @@ static SFBoolean _SFAssessLookaheadGlyphs(SFTextProcessorRef textProcessor,
209
209
return SFTrue ;
210
210
}
211
211
212
- SF_PRIVATE SFBoolean _SFApplyContextSubtable (SFTextProcessorRef processor , SFFeatureKind featureKind , SFData contextSubtable )
212
+ SF_PRIVATE SFBoolean _SFApplyContextSubtable (SFTextProcessorRef processor , SFData contextSubtable )
213
213
{
214
214
SFAlbumRef album = processor -> _album ;
215
215
SFLocatorRef locator = & processor -> _locator ;
@@ -233,7 +233,7 @@ SF_PRIVATE SFBoolean _SFApplyContextSubtable(SFTextProcessorRef processor, SFFea
233
233
SFOffset ruleSetOffset = SFContextF1_RuleSetOffset (contextSubtable , coverageIndex );
234
234
SFData ruleSetTable = SFData_Subdata (contextSubtable , ruleSetOffset );
235
235
236
- return _SFApplyRuleSetTable (processor , featureKind , ruleSetTable , _SFAssessGlyphByEquality , NULL );
236
+ return _SFApplyRuleSetTable (processor , ruleSetTable , _SFAssessGlyphByEquality , NULL );
237
237
}
238
238
}
239
239
break ;
@@ -261,22 +261,22 @@ SF_PRIVATE SFBoolean _SFApplyContextSubtable(SFTextProcessorRef processor, SFFea
261
261
262
262
helperTables [0 ] = classDefTable ;
263
263
264
- return _SFApplyRuleSetTable (processor , featureKind , ruleSetTable , _SFAssessGlyphByClass , helperTables );
264
+ return _SFApplyRuleSetTable (processor , ruleSetTable , _SFAssessGlyphByClass , helperTables );
265
265
}
266
266
}
267
267
break ;
268
268
}
269
269
270
270
case 3 : {
271
271
SFData ruleTable = SFContextF3_Rule (contextSubtable );
272
- return _SFApplyRuleTable (processor , featureKind , ruleTable , SFTrue , _SFAssessGlyphByCoverage , (void * )contextSubtable );
272
+ return _SFApplyRuleTable (processor , ruleTable , SFTrue , _SFAssessGlyphByCoverage , (void * )contextSubtable );
273
273
}
274
274
}
275
275
276
276
return SFFalse ;
277
277
}
278
278
279
- static SFBoolean _SFApplyRuleSetTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
279
+ static SFBoolean _SFApplyRuleSetTable (SFTextProcessorRef textProcessor ,
280
280
SFData ruleSetTable , _SFGlyphAssessment glyphAsessment , void * helperPtr )
281
281
{
282
282
SFUInt16 ruleCount = SFRuleSet_RuleCount (ruleSetTable );
@@ -289,7 +289,7 @@ static SFBoolean _SFApplyRuleSetTable(SFTextProcessorRef textProcessor, SFFeatur
289
289
if (ruleOffset ) {
290
290
SFData ruleTable = SFData_Subdata (ruleSetTable , ruleOffset );
291
291
292
- if (_SFApplyRuleTable (textProcessor , featureKind , ruleTable , SFFalse , glyphAsessment , helperPtr )) {
292
+ if (_SFApplyRuleTable (textProcessor , ruleTable , SFFalse , glyphAsessment , helperPtr )) {
293
293
return SFTrue ;
294
294
}
295
295
}
@@ -298,7 +298,7 @@ static SFBoolean _SFApplyRuleSetTable(SFTextProcessorRef textProcessor, SFFeatur
298
298
return SFFalse ;
299
299
}
300
300
301
- static SFBoolean _SFApplyRuleTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
301
+ static SFBoolean _SFApplyRuleTable (SFTextProcessorRef textProcessor ,
302
302
SFData ruleTable , SFBoolean includeFirst , _SFGlyphAssessment glyphAsessment , void * helperPtr )
303
303
{
304
304
SFUInt16 glyphCount = SFRule_GlyphCount (ruleTable );
@@ -312,14 +312,14 @@ static SFBoolean _SFApplyRuleTable(SFTextProcessorRef textProcessor, SFFeatureKi
312
312
SFUInteger contextEnd ;
313
313
314
314
return (_SFAssessInputGlyphs (textProcessor , valueArray , glyphCount , includeFirst , glyphAsessment , helperPtr , & contextEnd )
315
- && _SFApplyContextLookups (textProcessor , featureKind , lookupArray , lookupCount , contextStart , contextEnd ));
315
+ && _SFApplyContextLookups (textProcessor , lookupArray , lookupCount , contextStart , contextEnd ));
316
316
}
317
317
318
318
return SFFalse ;
319
319
}
320
320
321
321
SF_PRIVATE SFBoolean _SFApplyChainContextSubtable (SFTextProcessorRef textProcessor ,
322
- SFFeatureKind featureKind , SFData chainContextSubtable )
322
+ SFData chainContextSubtable )
323
323
{
324
324
SFGlyphID inputGlyph = SFAlbumGetGlyph (textProcessor -> _album , textProcessor -> _locator .index );
325
325
SFUInt16 format ;
@@ -341,7 +341,7 @@ SF_PRIVATE SFBoolean _SFApplyChainContextSubtable(SFTextProcessorRef textProcess
341
341
SFOffset chainRuleSetOffset = SFChainContextF1_ChainRuleSetOffset (chainContextSubtable , coverageIndex );
342
342
SFData chainRuleSetTable = SFData_Subdata (chainContextSubtable , chainRuleSetOffset );
343
343
344
- return _SFApplyChainRuleSetTable (textProcessor , featureKind , chainRuleSetTable , _SFAssessGlyphByEquality , NULL );
344
+ return _SFApplyChainRuleSetTable (textProcessor , chainRuleSetTable , _SFAssessGlyphByEquality , NULL );
345
345
}
346
346
}
347
347
break ;
@@ -375,22 +375,22 @@ SF_PRIVATE SFBoolean _SFApplyChainContextSubtable(SFTextProcessorRef textProcess
375
375
helperTables [1 ] = backtrackClassDefTable ;
376
376
helperTables [2 ] = lookaheadClassDefTable ;
377
377
378
- return _SFApplyChainRuleSetTable (textProcessor , featureKind , chainRuleSetTable , _SFAssessGlyphByClass , helperTables );
378
+ return _SFApplyChainRuleSetTable (textProcessor , chainRuleSetTable , _SFAssessGlyphByClass , helperTables );
379
379
}
380
380
}
381
381
break ;
382
382
}
383
383
384
384
case 3 : {
385
385
SFData chainRuleTable = SFChainContextF3_ChainRule (chainContextSubtable );
386
- return _SFApplyChainRuleTable (textProcessor , featureKind , chainRuleTable , SFTrue , _SFAssessGlyphByCoverage , (void * )chainContextSubtable );
386
+ return _SFApplyChainRuleTable (textProcessor , chainRuleTable , SFTrue , _SFAssessGlyphByCoverage , (void * )chainContextSubtable );
387
387
}
388
388
}
389
389
390
390
return SFFalse ;
391
391
}
392
392
393
- static SFBoolean _SFApplyChainRuleSetTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
393
+ static SFBoolean _SFApplyChainRuleSetTable (SFTextProcessorRef textProcessor ,
394
394
SFData chainRuleSetTable , _SFGlyphAssessment glyphAsessment , void * helperPtr )
395
395
{
396
396
SFUInt16 chainRuleCount = SFChainRuleSet_ChainRuleCount (chainRuleSetTable );
@@ -401,15 +401,15 @@ static SFBoolean _SFApplyChainRuleSetTable(SFTextProcessorRef textProcessor, SFF
401
401
SFOffset chainRuleOffset = SFChainRuleSet_ChainRuleOffset (chainRuleSetTable , chainRuleIndex );
402
402
SFData chainRuleTable = SFData_Subdata (chainRuleSetTable , chainRuleOffset );
403
403
404
- if (_SFApplyChainRuleTable (textProcessor , featureKind , chainRuleTable , SFFalse , glyphAsessment , helperPtr )) {
404
+ if (_SFApplyChainRuleTable (textProcessor , chainRuleTable , SFFalse , glyphAsessment , helperPtr )) {
405
405
return SFTrue ;
406
406
}
407
407
}
408
408
409
409
return SFFalse ;
410
410
}
411
411
412
- static SFBoolean _SFApplyChainRuleTable (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
412
+ static SFBoolean _SFApplyChainRuleTable (SFTextProcessorRef textProcessor ,
413
413
SFData chainRuleTable , SFBoolean includeFirst , _SFGlyphAssessment glyphAsessment , void * helperPtr )
414
414
{
415
415
SFData backtrackRecord = SFChainRule_BacktrackRecord (chainRuleTable );
@@ -433,13 +433,13 @@ static SFBoolean _SFApplyChainRuleTable(SFTextProcessorRef textProcessor, SFFeat
433
433
return (_SFAssessInputGlyphs (textProcessor , inputArray , inputCount , includeFirst , glyphAsessment , helperPtr , & contextEnd )
434
434
&& _SFAssessBacktrackGlyphs (textProcessor , backtrackArray , backtrackCount ,glyphAsessment , helperPtr )
435
435
&& _SFAssessLookaheadGlyphs (textProcessor , lookaheadArray , lookaheadCount , glyphAsessment , helperPtr , contextEnd )
436
- && _SFApplyContextLookups (textProcessor , featureKind , lookupArray , lookupCount , contextStart , contextEnd ));
436
+ && _SFApplyContextLookups (textProcessor , lookupArray , lookupCount , contextStart , contextEnd ));
437
437
}
438
438
439
439
return SFFalse ;
440
440
}
441
441
442
- static SFBoolean _SFApplyContextLookups (SFTextProcessorRef textProcessor , SFFeatureKind featureKind ,
442
+ static SFBoolean _SFApplyContextLookups (SFTextProcessorRef textProcessor ,
443
443
SFData lookupArray , SFUInteger lookupCount , SFUInteger contextStart , SFUInteger contextEnd )
444
444
{
445
445
SFLocatorRef contextLocator = & textProcessor -> _locator ;
@@ -461,7 +461,7 @@ static SFBoolean _SFApplyContextLookups(SFTextProcessorRef textProcessor, SFFeat
461
461
if (SFLocatorMoveNext (contextLocator )) {
462
462
/* Skip the glyphs till sequence index and apply the lookup. */
463
463
if (SFLocatorSkip (contextLocator , sequenceIndex )) {
464
- _SFApplyLookup (textProcessor , featureKind , lookupListIndex );
464
+ _SFApplyLookup (textProcessor , lookupListIndex );
465
465
}
466
466
}
467
467
}
@@ -475,7 +475,7 @@ static SFBoolean _SFApplyContextLookups(SFTextProcessorRef textProcessor, SFFeat
475
475
}
476
476
477
477
SF_PRIVATE SFBoolean _SFApplyExtensionSubtable (SFTextProcessorRef textProcessor ,
478
- SFFeatureKind featureKind , SFData extensionSubtable )
478
+ SFData extensionSubtable )
479
479
{
480
480
SFUInt16 format = SFExtension_Format (extensionSubtable );
481
481
@@ -485,14 +485,7 @@ SF_PRIVATE SFBoolean _SFApplyExtensionSubtable(SFTextProcessorRef textProcessor,
485
485
SFUInt32 extensionOffset = SFExtensionF1_ExtensionOffset (extensionSubtable );
486
486
SFData innerSubtable = SFData_Subdata (extensionSubtable , extensionOffset );
487
487
488
- switch (featureKind ) {
489
- case SFFeatureKindSubstitution :
490
- return _SFApplySubstitutionSubtable (textProcessor , lookupType , innerSubtable );
491
-
492
- case SFFeatureKindPositioning :
493
- return _SFApplyPositioningSubtable (textProcessor , lookupType , innerSubtable );
494
- }
495
- break ;
488
+ return textProcessor -> _lookupOperation (textProcessor , lookupType , innerSubtable );
496
489
}
497
490
}
498
491
0 commit comments