From e0b6a64402201ebe0b36359fb6a6b4de8b4ceb9d Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Thu, 4 Apr 2019 19:00:45 +0800 Subject: [PATCH] tune position for west gravity --- src/newgdi/layoutinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgdi/layoutinfo.c b/src/newgdi/layoutinfo.c index 8d684014..528f54e4 100644 --- a/src/newgdi/layoutinfo.c +++ b/src/newgdi/layoutinfo.c @@ -1978,7 +1978,7 @@ static int traverse_line_glyphs(const LAYOUTINFO* layout, if (run->lrun->flags & LAYOUTRUN_FLAG_CENTERED_BASELINE) { extra.ta = up_ta; if (run->lrun->ort == GLYPH_ORIENT_UPSIDE_DOWN) { - pos.y += run->gstr->glyphs[0].width; + pos.y += run->gstr->glyphs[j].width; if ((layout->rf & GRF_WRITING_MODE_MASK) == GRF_WRITING_MODE_VERTICAL_RL) pos.x -= (line->height - gi->height) / 2; @@ -2009,7 +2009,7 @@ static int traverse_line_glyphs(const LAYOUTINFO* layout, } if (run->lrun->ort == GLYPH_ORIENT_SIDEWAYS_LEFT) { - pos.y += run->gstr->glyphs[0].width; + pos.y += run->gstr->glyphs[j].width; if ((layout->rf & GRF_WRITING_MODE_MASK) == GRF_WRITING_MODE_VERTICAL_RL) pos.x -= line->height;