のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

pango_fc_hb_font_get_glyph_extents

183 static hb_bool_t
184 pango_fc_hb_font_get_glyph_extents (
                                    hb_font_t                 *font,
                                    void                          *font_data,
185				    hb_codepoint_t        glyph,
186				    hb_glyph_extents_t *extents,
187				    void *user_data        G_GNUC_UNUSED)
188 {
189     PangoFcHbContext *context = (PangoFcHbContext *) font_data;
190     PangoFcFont            *fc_font  = context->fc_font;
191     PangoRectangle ink;
192
193     pango_font_get_glyph_extents ((PangoFont *) fc_font, glyph, &ink, NULL);
194
195     if (G_LIKELY (!context->vertical)) {
196         extents->x_bearing  = ink.x;
197         extents->y_bearing  = ink.y;
198         extents->width         = ink.width;
199         extents->height        = ink.height;
200     } else {
201         /* XXX */
202        extents->x_bearing  = ink.x;
203        extents->y_bearing  = ink.y;
204        extents->width         = ink.height;
205        extents->height        = ink.width;
206      }
207
208  return TRUE;
209}
210