diff --git a/src/newgdi/shape-glyphs-basic.c b/src/newgdi/shape-glyphs-basic.c index 90362c60..ff8cd8d5 100644 --- a/src/newgdi/shape-glyphs-basic.c +++ b/src/newgdi/shape-glyphs-basic.c @@ -154,6 +154,7 @@ static BOOL shape_layout_run(SEInstance* inst, } // generate the glyphs +#if 0 gs->glyphs = malloc(sizeof(ShapedGlyph) * nr_ucs); if (gs->glyphs == NULL) { goto out; @@ -163,6 +164,10 @@ static BOOL shape_layout_run(SEInstance* inst, free(gs->glyphs); goto out; } +#else + // must use __mg_glyph_string_set_size + __mg_glyph_string_set_size(gs, nr_ucs); +#endif j = 0; for (i = 0; i < nr_ucs; i++) { diff --git a/src/newgdi/shape-glyphs-complex.c b/src/newgdi/shape-glyphs-complex.c index 8f1187c6..664cca90 100644 --- a/src/newgdi/shape-glyphs-complex.c +++ b/src/newgdi/shape-glyphs-complex.c @@ -245,6 +245,7 @@ static BOOL shape_layout_run(SEInstance* inst, } // generate result +#if 0 assert(gs->glyphs == NULL); assert(gs->log_clusters == NULL); @@ -257,6 +258,10 @@ static BOOL shape_layout_run(SEInstance* inst, free(gs->glyphs); goto error; } +#else + // must use __mg_glyph_string_set_size + __mg_glyph_string_set_size(gs, nr_glyphs); +#endif last_cluster = -1; gs->nr_glyphs = nr_glyphs;