equal
deleted
inserted
replaced
49 } |
49 } |
50 |
50 |
51 return 0xFFFF; |
51 return 0xFFFF; |
52 } |
52 } |
53 |
53 |
54 le_int32 MarkToBasePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const |
54 le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const |
55 { |
55 { |
56 LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); |
56 LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); |
57 le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph); |
57 le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); |
58 |
58 |
59 if (markCoverage < 0) { |
59 if (markCoverage < 0) { |
60 // markGlyph isn't a covered mark glyph |
60 // markGlyph isn't a covered mark glyph |
61 return 0; |
61 return 0; |
62 } |
62 } |
73 } |
73 } |
74 |
74 |
75 // FIXME: We probably don't want to find a base glyph before a previous ligature... |
75 // FIXME: We probably don't want to find a base glyph before a previous ligature... |
76 GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/)); |
76 GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/)); |
77 LEGlyphID baseGlyph = findBaseGlyph(&baseIterator); |
77 LEGlyphID baseGlyph = findBaseGlyph(&baseIterator); |
78 le_int32 baseCoverage = getBaseCoverage((LEGlyphID) baseGlyph); |
78 le_int32 baseCoverage = getBaseCoverage(base, (LEGlyphID) baseGlyph, success); |
79 const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset)); |
79 const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset)); |
80 le_uint16 baseCount = SWAPW(baseArray->baseRecordCount); |
80 le_uint16 baseCount = SWAPW(baseArray->baseRecordCount); |
81 |
81 |
82 if (baseCoverage < 0 || baseCoverage >= baseCount) { |
82 if (baseCoverage < 0 || baseCoverage >= baseCount) { |
83 // The base glyph isn't covered, or the coverage |
83 // The base glyph isn't covered, or the coverage |