+ if (SCM_HASHTABLE_P (lily_index_to_bbox_table_))
+ {
+ SCM box = scm_hashq_ref (lily_index_to_bbox_table_,
+ scm_from_unsigned (signed_idx), SCM_BOOL_F);
+ Box *box_ptr = Box::unsmob (box);
+ if (box_ptr)
+ return *box_ptr;
+ }
+
+ if (SCM_HASHTABLE_P (lily_character_table_))
+ {
+ const size_t len = 256;
+ char name[len];
+ size_t code = FT_Get_Glyph_Name (face_, signed_idx, name, len);
+ if (code)
+ warning (_f ("FT_Get_Glyph_Name() returned error: %d", code));
+
+ SCM sym = ly_symbol2scm (name);
+ SCM alist = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
+
+ if (alist != SCM_BOOL_F)
+ {
+ SCM bbox = scm_cdr (scm_assq (ly_symbol2scm ("bbox"), alist));
+
+ Box b;
+ b[X_AXIS][LEFT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+ b[Y_AXIS][LEFT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+ b[X_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+ b[Y_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
+ bbox = scm_cdr (bbox);
+
+ b.scale (point_constant);
+
+ scm_hashq_set_x (lily_index_to_bbox_table_,
+ scm_from_unsigned (signed_idx),
+ b.smobbed_copy ());
+ return b;
+ }
+ }
+