From 7ab32056e1be5acbbc7cbed9389b53a4424338df Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 10 Apr 2019 18:06:48 +0800 Subject: [PATCH] tune glyph generating --- src/newgdi/shape-glyphs-complex.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/newgdi/shape-glyphs-complex.c b/src/newgdi/shape-glyphs-complex.c index cc7d2ed7..171c1f1d 100644 --- a/src/newgdi/shape-glyphs-complex.c +++ b/src/newgdi/shape-glyphs-complex.c @@ -270,7 +270,17 @@ static BOOL shape_layout_run(SEInstance* inst, Glyph32 gv; - gv = SET_GLYPH_DFI(glyph_info[i].codepoint, dfi); + if (glyph_info[i].codepoint == 0) { + gv = GetGlyphValue(run->lf, + UCHAR2ACHAR(run->ucs[glyph_info[i].cluster])); + if (REAL_GLYPH(gv) == 0) { + _WRN_PRINTF("Got an invalid glyph for uchar: 0x%04x", + run->ucs[glyph_info[i].cluster]); + } + } + else + gv = SET_GLYPH_DFI(glyph_info[i].codepoint, dfi); + gs->glyphs[i].gv = gv; gs->log_clusters[i] = glyph_info[i].cluster;