diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2010-01-26 12:30:44 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2010-01-26 12:30:44 -0500 |
commit | 797d46714d27f147277fdd5346648d838c68fb8c (patch) | |
tree | 42a2c56a06946e5e8d97191549fdac338ff44da0 | |
parent | 558b96314f1184c5f031545ee238549ac3dd3868 (diff) | |
download | pango-797d46714d27f147277fdd5346648d838c68fb8c.tar.gz |
[HB/GDEF] Fix bug in building synthetic GDEF table
-rw-r--r-- | pango/opentype/hb-ot-layout.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pango/opentype/hb-ot-layout.cc b/pango/opentype/hb-ot-layout.cc index 67b2b9ae..d1bb49da 100644 --- a/pango/opentype/hb-ot-layout.cc +++ b/pango/opentype/hb-ot-layout.cc @@ -44,6 +44,8 @@ _hb_ot_layout_init (hb_face_t *face) { hb_ot_layout_t *layout = &face->ot_layout; + memset (layout, 0, sizeof (*layout)); + layout->gdef_blob = Sanitizer<GDEF>::sanitize (hb_face_get_table (face, HB_OT_TAG_GDEF)); layout->gdef = &Sanitizer<GDEF>::lock_instance (layout->gdef_blob); @@ -293,7 +295,7 @@ hb_ot_layout_build_glyph_classes (hb_face_t *face, return; if (layout->new_gdef.len == 0) { - layout->new_gdef.klasses = (unsigned char *) calloc (num_total_glyphs, sizeof (unsigned char)); + layout->new_gdef.klasses = (unsigned char *) calloc (count, sizeof (unsigned char)); layout->new_gdef.len = count; } |