+
+#else /* (defined (FLT_PANGO) */
+
+typedef struct {
+ MFLTFont font;
+ PangoFcFont pango_fc_font;
+} FontInfoPango;
+
+int
+get_glyph_id (MFLTFont *font, MFLTGlyph *g)
+{
+ FontInfoPango *font_info = (FontInfoPango *) font;
+ PangoGlyph pg = pango_fc_font_get_glyph (font_info->pango_fc_font, g->c);
+
+ return (pg ? (int) pg : -1);
+}
+
+int
+get_metric (MFLTFont *font, MFLTGlyphString *gstring, int form, int to)
+{
+ FontInfoPango *font_info = (FontInfoPango *) font;
+ PangoFcFont fc_font = font_info->pango_fc_font;
+ int i;
+
+ for (i = from; i < to; i++)
+ {
+ PangoRectangle inc, logical;
+
+ pango_font_get_glyph_extents ((PangoFont *) fc_font,
+ gstring->glyphs[i].code, &inc, &logical);
+ g->lbearing = inc.x;
+ g->rbearing = inc.x + inc.width;
+ g->xadv = logical.width;
+ g->yadv = 0;
+ g->ascent = - inc.y;
+ g->descent = inc.height + inc.y;
+ }
+}
+