зеркало из https://github.com/mozilla/gecko-dev.git
Bug 334928 overlapping text when using Hebrew text with style: letter-spacing: 1px r=pavlov
This commit is contained in:
Родитель
52cb640e89
Коммит
55f189fdb2
|
@ -905,6 +905,8 @@ TRY_AGAIN_JUST_PLACE:
|
||||||
cairo_glyph_t *cglyphs = (cairo_glyph_t*)malloc(numGlyphs*sizeof(cairo_glyph_t));
|
cairo_glyph_t *cglyphs = (cairo_glyph_t*)malloc(numGlyphs*sizeof(cairo_glyph_t));
|
||||||
gfxFloat offset = 0;
|
gfxFloat offset = 0;
|
||||||
PRInt32 m = items[i].iCharPos;
|
PRInt32 m = items[i].iCharPos;
|
||||||
|
if (rtl)
|
||||||
|
m += numGlyphs - 1;
|
||||||
for (PRInt32 k = 0; k < numGlyphs; k++) {
|
for (PRInt32 k = 0; k < numGlyphs; k++) {
|
||||||
cglyphs[k].index = glyphs[k];
|
cglyphs[k].index = glyphs[k];
|
||||||
cglyphs[k].x = pt.x + offset + (offsets[k].du * cairoToPixels);
|
cglyphs[k].x = pt.x + offset + (offsets[k].du * cairoToPixels);
|
||||||
|
@ -913,7 +915,7 @@ TRY_AGAIN_JUST_PLACE:
|
||||||
if (!mSpacing.IsEmpty()) {
|
if (!mSpacing.IsEmpty()) {
|
||||||
// XXX We need to convert char index to cluster index.
|
// XXX We need to convert char index to cluster index.
|
||||||
// But we cannot do it until nsTextFrame is refactored.
|
// But we cannot do it until nsTextFrame is refactored.
|
||||||
offset += mSpacing[m++];
|
offset += mSpacing[rtl ? m-- : m++];
|
||||||
} else {
|
} else {
|
||||||
offset += advance[k] * cairoToPixels;
|
offset += advance[k] * cairoToPixels;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче