glyphs[i] = u;
}
- *numGlyphs = length; // XXX
+ *numGlyphs = length; /* XXX */
return true;
}
const HB_Glyph *glyphs,
hb_uint32 numGlyphs,
HB_Fixed *advances,
- int flags /*HB_ShaperFlag*/)
+ int flags /*HB_ShaperFlag*/ HB_UNUSED)
{
hb_font_t *font = (hb_font_t *) old_font->userData;
const HB_UChar16 *string,
hb_uint32 length)
{
- return true; // TODO
+ return true; /* TODO */
}
static HB_Error
HB_Fixed *ypos,
hb_uint32 *nPoints)
{
- return HB_Err_Ok; // TODO
+ return HB_Err_Ok; /* TODO */
}
static void
data->klass = &hb_old_font_class;
data->x_ppem = font->x_ppem;
data->y_ppem = font->y_ppem;
- data->x_scale = font->x_scale; // XXX
- data->y_scale = font->y_scale; // XXX
+ data->x_scale = font->x_scale; /* XXX */
+ data->y_scale = font->y_scale; /* XXX */
data->userData = font;
return data;
struct hb_old_shaper_shape_plan_data_t {};
hb_old_shaper_shape_plan_data_t *
-_hb_old_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan,
- const hb_feature_t *user_features,
- unsigned int num_user_features)
+_hb_old_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED,
+ const hb_feature_t *user_features HB_UNUSED,
+ unsigned int num_user_features HB_UNUSED)
{
return (hb_old_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
}
void
-_hb_old_shaper_shape_plan_data_destroy (hb_old_shaper_shape_plan_data_t *data)
+_hb_old_shaper_shape_plan_data_destroy (hb_old_shaper_shape_plan_data_t *data HB_UNUSED)
{
}
*/
hb_bool_t
-_hb_old_shape (hb_shape_plan_t *shape_plan,
+_hb_old_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
hb_font_t *font,
hb_buffer_t *buffer,
const hb_feature_t *features,
ALLOCATE_ARRAY (HB_GlyphAttributes, item.attributes, num_glyphs);
ALLOCATE_ARRAY (HB_Fixed, item.advances, num_glyphs);
ALLOCATE_ARRAY (HB_FixedPoint, item.offsets, num_glyphs);
+ /* Apparently in some cases the offsets array will not be fully assigned to.
+ * Clear it. */
+ memset (item.offsets, 0, num_glyphs * sizeof (item.offsets[0]));
uint32_t *vis_clusters;
ALLOCATE_ARRAY (uint32_t, vis_clusters, num_glyphs);
*p = MIN (*p, buffer->info[i].cluster);
}
for (unsigned int i = 1; i < num_glyphs; i++)
- if (vis_clusters[i] == -1)
+ if (vis_clusters[i] == (uint32_t) -1)
vis_clusters[i] = vis_clusters[i - 1];
#undef utf16_index