Make font immutable in hb_shape()

This commit is contained in:
Behdad Esfahbod 2012-04-17 12:37:19 -04:00
parent 3cde23664f
commit a5e40542ab
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ hb_shape_full (hb_font_t *font,
unsigned int num_features, unsigned int num_features,
const char * const *shaper_list) const char * const *shaper_list)
{ {
hb_font_make_immutable (font); /* So we can safely cache stuff on it */
if (likely (!shaper_list)) { if (likely (!shaper_list)) {
for (unsigned int i = 0; i < ARRAY_LENGTH (shapers); i++) for (unsigned int i = 0; i < ARRAY_LENGTH (shapers); i++)
if (likely (shapers[i].func (font, buffer, features, num_features))) if (likely (shapers[i].func (font, buffer, features, num_features)))