Reverse the sign of mXOffset in RTL runs so that the offset is always from left to right. Bug 378351, r=roc

This commit is contained in:
smontagu%smontagu.org 2007-04-25 06:59:34 +00:00
Родитель b783c2ede6
Коммит faff1b304a
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -958,7 +958,10 @@ public:
/** The glyphID if this is a ComplexCluster, or the Unicode character
* if this is a Missing glyph */
PRUint32 mGlyphID:31;
// The advance, x-offset and y-offset of the glyph, in appunits
/** The advance, x-offset and y-offset of the glyph, in appunits
* mAdvance is in the text direction (RTL or LTR)
* mXOffset is always from left to right
* mYOffset is always from bottom to top */
PRInt32 mAdvance;
float mXOffset, mYOffset;
};

Просмотреть файл

@ -1199,7 +1199,7 @@ public:
details->mIsLastGlyph = i == glyphCount - 1;
details->mGlyphID = mGlyphs[k + i];
details->mAdvance = mAdvances[k + i]*appUnitsPerDevUnit;
details->mXOffset = float(mOffsets[k + i].du)*appUnitsPerDevUnit;
details->mXOffset = float(mOffsets[k + i].du)*appUnitsPerDevUnit*aRun->GetDirection();
details->mYOffset = float(mOffsets[k + i].dv)*appUnitsPerDevUnit;
}
aRun->SetDetailedGlyphs(runOffset, detailedGlyphs.Elements(), glyphCount);