mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 09:14:09 +08:00
always use __mg_glyph_string_set_size
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user