[shape-plan] Fix shape-plan caching with more than one requested shaper

Wasn't breaking out of loop, ouch!

http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1246370.html
This commit is contained in:
Behdad Esfahbod 2014-08-12 16:50:22 -04:00
parent bc3d0dc601
commit 8d5eebc0c6
1 changed files with 6 additions and 3 deletions

View File

@ -420,17 +420,20 @@ hb_shape_plan_create_cached (hb_face_t *face,
if (shaper_list) {
/* Choose shaper. Adapted from hb_shape_plan_plan(). */
#define HB_SHAPER_PLAN(shaper) \
HB_STMT_START { \
{ \
if (hb_##shaper##_shaper_face_data_ensure (face)) \
{ \
proposal.shaper_func = _hb_##shaper##_shape; \
} HB_STMT_END
break; \
} \
}
for (const char * const *shaper_item = shaper_list; *shaper_item; shaper_item++)
if (0)
;
#define HB_SHAPER_IMPLEMENT(shaper) \
else if (0 == strcmp (*shaper_item, #shaper)) \
HB_SHAPER_PLAN (shaper);
HB_SHAPER_PLAN (shaper)
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT