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

(-)pango/pango/pangocairo-fcfont.c (-7 / +14 lines)
Lines 45-50 typedef struct _GlyphExtentsCacheEntry Link Here
45
typedef struct _GUnicharToGlyphCacheEntry GUnicharToGlyphCacheEntry;
45
typedef struct _GUnicharToGlyphCacheEntry GUnicharToGlyphCacheEntry;
46
46
47
47
48
49
50
#define PANGO_UNITS(Double) ((int)((Double) * PANGO_SCALE + 0.49999))
51
52
53
54
48
/* define one of these to profile one of the caches */
55
/* define one of these to profile one of the caches */
49
#undef PROFILE_GLYPH_EXTENTS_CACHE
56
#undef PROFILE_GLYPH_EXTENTS_CACHE
50
#undef PROFILE_CHAR_TO_GLYPH_CACHE
57
#undef PROFILE_CHAR_TO_GLYPH_CACHE
Lines 366-373 pango_cairo_fc_font_glyph_extents_cache_ Link Here
366
  cairo_scaled_font_extents (scaled_font, &font_extents);
373
  cairo_scaled_font_extents (scaled_font, &font_extents);
367
374
368
  cffont->font_extents.x = 0;
375
  cffont->font_extents.x = 0;
369
  cffont->font_extents.y = - font_extents.ascent * PANGO_SCALE;
376
  cffont->font_extents.y = - PANGO_UNITS (font_extents.ascent);
370
  cffont->font_extents.height = (font_extents.ascent + font_extents.descent) * PANGO_SCALE;
377
  cffont->font_extents.height = PANGO_UNITS (font_extents.ascent + font_extents.descent);
371
  cffont->font_extents.width = 0;
378
  cffont->font_extents.width = 0;
372
379
373
  cffont->glyph_extents_cache = g_new0 (GlyphExtentsCacheEntry, GLYPH_CACHE_NUM_ENTRIES);
380
  cffont->glyph_extents_cache = g_new0 (GlyphExtentsCacheEntry, GLYPH_CACHE_NUM_ENTRIES);
Lines 399-409 compute_glyph_extents (PangoCairoFcFont Link Here
399
				   &cairo_glyph, 1, &extents);
406
				   &cairo_glyph, 1, &extents);
400
  
407
  
401
  entry->glyph = glyph;
408
  entry->glyph = glyph;
402
  entry->width = extents.x_advance * PANGO_SCALE;
409
  entry->width = PANGO_UNITS (extents.x_advance);
403
  entry->ink_rect.x = extents.x_bearing * PANGO_SCALE;
410
  entry->ink_rect.x = PANGO_UNITS (extents.x_bearing);
404
  entry->ink_rect.y = extents.y_bearing * PANGO_SCALE;
411
  entry->ink_rect.y = PANGO_UNITS (extents.y_bearing);
405
  entry->ink_rect.width = extents.width * PANGO_SCALE;
412
  entry->ink_rect.width = PANGO_UNITS (extents.width);
406
  entry->ink_rect.height = extents.height * PANGO_SCALE;
413
  entry->ink_rect.height = PANGO_UNITS (extents.height);
407
}
414
}
408
     
415
     
409
static GlyphExtentsCacheEntry *
416
static GlyphExtentsCacheEntry *

Return to bug 131128