This commit is contained in:
Vincent Wei
2019-04-08 16:13:03 +08:00
parent 8e95f3bd93
commit 4ea2e11c5a
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -191,7 +191,7 @@ int DrawLayoutLine(HDC hdc, const LAYOUTLINE* line, int x, int y)
if (run->lrun->flags & LAYOUTRUN_FLAG_CENTERED_BASELINE) {
ta = up_ta;
if (run->lrun->ort == GLYPH_ORIENT_UPSIDE_DOWN) {
log_y += run->gstr->glyphs[0].width;
log_y += run->gstr->glyphs[j].width;
if ((layout->rf & GRF_WRITING_MODE_MASK) ==
GRF_WRITING_MODE_VERTICAL_RL)
log_x -= (line->height - gi->height) / 2;
@@ -213,7 +213,7 @@ int DrawLayoutLine(HDC hdc, const LAYOUTLINE* line, int x, int y)
}
if (run->lrun->ort == GLYPH_ORIENT_SIDEWAYS_LEFT) {
log_y += run->gstr->glyphs[0].width;
log_y += run->gstr->glyphs[j].width;
if ((layout->rf & GRF_WRITING_MODE_MASK) ==
GRF_WRITING_MODE_VERTICAL_RL)
log_x -= line->height;
+1 -1
View File
@@ -173,7 +173,7 @@ static void resolve_layout_run_dir(const LAYOUT* layout,
}
if (layout->rf & GRF_WRITING_MODE_VERTICAL_FLAG) {
lrun->dir = (lrun->el & 1) ? GLYPH_RUN_DIR_TTB : GLYPH_RUN_DIR_BTT;
lrun->dir = (lrun->el & 1) ? GLYPH_RUN_DIR_BTT : GLYPH_RUN_DIR_TTB;
if (lrun->ort == GLYPH_ORIENT_UPRIGHT ||
lrun->ort == GLYPH_ORIENT_UPSIDE_DOWN)
+3 -2
View File
@@ -142,8 +142,8 @@ static BOOL shape_layout_run(SEInstance* inst,
gs->glyphs[i].height = run->lf->size;
}
gs->glyphs[i].x_off = glyph_pos[i].x_offset >> 6;
gs->glyphs[i].y_off = glyph_pos[i].y_offset >> 6;
gs->glyphs[i].x_off = ((glyph_pos[i].x_offset + 0x8000) >> 16);
gs->glyphs[i].y_off = ((glyph_pos[i].y_offset + 0x8000) >> 16);
gs->glyphs[i].is_cluster_start = gs->log_clusters[i] != last_cluster;
last_cluster = gs->log_clusters[i];
@@ -152,6 +152,7 @@ static BOOL shape_layout_run(SEInstance* inst,
ok = TRUE;
error:
if (hb_font)
hb_font_destroy(hb_font);
if (hb_buf)