View | Details | Raw Unified | Return to bug 131128
Collapse All | Expand All

(-)pango/pango/pangocairo-fcfont.c.orig (-7 / +9 lines)
Lines 72-77 GType pango_cairo_fc_font_get_type (void Link Here
72
72
73
static cairo_font_face_t *pango_cairo_fc_font_get_font_face (PangoCairoFont *font);
73
static cairo_font_face_t *pango_cairo_fc_font_get_font_face (PangoCairoFont *font);
74
74
75
#define PANGO_UNITS(Double) ((int)((Double) * PANGO_SCALE + 0.49999))
76
75
/*******************************
77
/*******************************
76
 *       Utility functions     *
78
 *       Utility functions     *
77
 *******************************/
79
 *******************************/
Lines 183-191 compute_glyph_extents (PangoFont Link Here
183
  cairo_scaled_font_extents (scaled_font, &font_extents);
185
  cairo_scaled_font_extents (scaled_font, &font_extents);
184
  
186
  
185
  logical_rect->x = 0;
187
  logical_rect->x = 0;
186
  logical_rect->y = - font_extents.ascent * PANGO_SCALE;
188
  logical_rect->y = -PANGO_UNITS (font_extents.ascent);
187
  logical_rect->width = 0;
189
  logical_rect->width = 0;
188
  logical_rect->height = (font_extents.ascent + font_extents.descent) * PANGO_SCALE;
190
  logical_rect->height = PANGO_UNITS (font_extents.ascent + font_extents.descent);
189
191
190
  if (glyph)
192
  if (glyph)
191
    {
193
    {
Lines 196-207 compute_glyph_extents (PangoFont Link Here
196
      cairo_scaled_font_glyph_extents (scaled_font,
198
      cairo_scaled_font_glyph_extents (scaled_font,
197
				       &cairo_glyph, 1, &extents);
199
				       &cairo_glyph, 1, &extents);
198
      
200
      
199
      ink_rect->x = extents.x_bearing * PANGO_SCALE;
201
      ink_rect->x = PANGO_UNITS (extents.x_bearing);
200
      ink_rect->y = extents.y_bearing * PANGO_SCALE;
202
      ink_rect->y = PANGO_UNITS (extents.y_bearing);
201
      ink_rect->width = extents.width * PANGO_SCALE;
203
      ink_rect->width = PANGO_UNITS (extents.width);
202
      ink_rect->height = extents.height * PANGO_SCALE;
204
      ink_rect->height = PANGO_UNITS (extents.height);
203
      
205
      
204
      logical_rect->width = extents.x_advance * PANGO_SCALE;
206
      logical_rect->width = PANGO_UNITS (extents.x_advance);
205
    }
207
    }
206
}
208
}
207
209

Return to bug 131128