tune CB_GLYPH_LAID_OUT

This commit is contained in:
Vincent Wei
2019-03-27 19:28:19 +08:00
parent 2cffa1154c
commit 9cca87878c
3 changed files with 5 additions and 8 deletions
+2 -2
View File
@@ -12807,8 +12807,8 @@ MG_EXPORT LAYOUTINFO* GUIAPI CreateLayoutInfo(
MG_EXPORT BOOL GUIAPI DestroyLayoutInfo(LAYOUTINFO* layout_info);
typedef BOOL (*CB_GLYPH_LAID_OUT) (GHANDLE ctxt,
const TEXTRUNSINFO *truninfo, int uc_index, LOGFONT* lf,
Uchar32 uc, Glyph32 gv, const GLYPHPOS* pos);
const TEXTRUNSINFO *truninfo, int uc_index,
Uchar32 uc, LOGFONT* lf, Glyph32 gv, const GLYPHPOS* pos);
/**
* \fn LAYOUTLINE* GUIAPI LayoutNextLine(LAYOUTINFO* layout_info,
+1 -3
View File
@@ -146,10 +146,8 @@ LayoutRun* __mg_layout_run_new_orphan(const LAYOUTINFO* layout,
lrun = malloc(sizeof(LayoutRun));
lrun->lf = lf;
lrun->ucs = ucs;
lrun->si = 0;
lrun->len = nr_ucs;
lrun->si = trun->si;
lrun->len = trun->len;
lrun->len = nr_ucs;
lrun->lc = trun->lc;
lrun->st = UCharGetScriptType(ucs[0]);
lrun->el = trun->el;
+2 -3
View File
@@ -1660,7 +1660,6 @@ static int traverse_line_glyphs(const LAYOUTINFO* layout,
ShapedGlyph* glyph_info;
uc = run->lrun->ucs[run->gstr->log_clusters[j]];
index = run->lrun->si + run->gstr->log_clusters[j];
glyph_info = run->gstr->glyphs + j;
@@ -1683,8 +1682,8 @@ static int traverse_line_glyphs(const LAYOUTINFO* layout,
}
}
cb_laid_out(ctxt, layout->truninfo, index, run->lrun->lf,
uc, glyph_info->gv, &pos);
cb_laid_out(ctxt, layout->truninfo, index, uc,
run->lrun->lf, glyph_info->gv, &pos);
line_adv += glyph_info->width;
}