Skip to content

Commit

Permalink
[lib] Used table macros in locator and text processor...
Browse files Browse the repository at this point in the history
  • Loading branch information
mta452 committed Jan 27, 2018
1 parent e5682ed commit ba90396
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
11 changes: 3 additions & 8 deletions Source/SFLocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ SF_INTERNAL void SFLocatorInitialize(SFLocatorRef locator, SFAlbumRef album, SFD
locator->lookupFlag = 0;

if (gdef) {
SFOffset offset = SFGDEF_MarkAttachClassDefOffset(gdef);
locator->_markAttachClassDef = SFData_Subdata(gdef, offset);
locator->_markAttachClassDef = SFGDEF_MarkAttachClassDefTable(gdef);

if (SFGDEF_Version(gdef) == 0x00010002) {
offset = SFGDEF_MarkGlyphSetsDefOffset(gdef);
locator->_markGlyphSetsDef = SFData_Subdata(gdef, offset);
locator->_markGlyphSetsDef = SFGDEF_MarkGlyphSetsDefTable(gdef);
}
}
}
Expand Down Expand Up @@ -103,10 +101,7 @@ SF_INTERNAL void SFLocatorSetMarkFilteringSet(SFLocatorRef locator, SFUInt16 mar
SFUInt16 markSetCount = SFMarkGlyphSets_MarkSetCount(markGlyphSetsDef);

if (markFilteringSet < markSetCount) {
SFUInt32 offset = SFMarkGlyphSets_CoverageOffset(markGlyphSetsDef, markFilteringSet);
SFData coverage = SFData_Subdata(markGlyphSetsDef, offset);

locator->_markFilteringCoverage = coverage;
locator->_markFilteringCoverage = SFMarkGlyphSets_CoverageTable(markGlyphSetsDef, markFilteringSet);
}
break;
}
Expand Down
3 changes: 1 addition & 2 deletions Source/SFTextProcessor.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ SF_INTERNAL void SFTextProcessorInitialize(SFTextProcessorRef textProcessor, SFP

gdef = pattern->font->tables.gdef;
if (gdef) {
SFOffset offset = SFGDEF_GlyphClassDefOffset(gdef);
textProcessor->_glyphClassDef = SFData_Subdata(gdef, offset);
textProcessor->_glyphClassDef = SFGDEF_GlyphClassDefTable(gdef);
}

SFLocatorInitialize(&textProcessor->_locator, album, gdef);
Expand Down

0 comments on commit ba90396

Please sign in to comment.