Ticket #6113: MarkToBasePosnSubtables.cpp.patch
| File MarkToBasePosnSubtables.cpp.patch, 1.8 kB (added by jonathan_kew@..., 1 year ago) |
|---|
-
../../../libs/icu-release-3-6-source/layout/MarkToBasePosnSubtables.cpp
old new 83 83 glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); 84 84 85 85 if (glyphIterator->isRightToLeft()) { 86 ///// FIXME: need similar patch to below; also in MarkToLigature and MarkToMark 87 ///// (is there a better way to approach this for all the cases?) 86 88 glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); 87 89 } else { 88 90 LEPoint baseAdvance; 89 91 90 92 fontInstance->getGlyphAdvance(baseGlyph, pixels); 93 94 ///// JK: adjustment needs to account for non-zero advance of any marks between base glyph and current mark 95 GlyphIterator gi(baseIterator, (le_uint16)0); // copy of baseIterator that won't ignore marks 96 gi.next(); // point beyond the base glyph 97 while (gi.getCurrStreamPosition() < glyphIterator->getCurrStreamPosition()) { // for all intervening glyphs (marks)... 98 LEGlyphID otherMark = gi.getCurrGlyphID(); 99 LEPoint px; 100 fontInstance->getGlyphAdvance(otherMark, px); // get advance, in case it's non-zero 101 pixels.fX += px.fX; // and add that to the base glyph's advance 102 pixels.fY += px.fY; 103 gi.next(); 104 } 105 ///// end of JK patch 106 91 107 fontInstance->pixelsToUnits(pixels, baseAdvance); 92 108 93 109 glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY);