summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
Diffstat (limited to 'pango')
-rw-r--r--pango/pangoxft-font.c8
-rw-r--r--pango/pangoxft-render.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 884d49a5..0080ba81 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -197,16 +197,16 @@ get_glyph_extents_missing (PangoXftFont *xfont,
if (ink_rect)
{
ink_rect->x = 0;
- ink_rect->y = PANGO_SCALE * (- xft_font->ascent + (xft_font->ascent + xft_font->descent - xfont->mini_height * 2 - xfont->mini_pad * 5) / 2);
- ink_rect->width = PANGO_SCALE * (xfont->mini_width * cols + xfont->mini_pad * (2 * cols + 1));
- ink_rect->height = PANGO_SCALE * (xfont->mini_height * 2 + xfont->mini_pad * 5);
+ ink_rect->y = - PANGO_SCALE * xft_font->ascent + PANGO_SCALE * (((xft_font->ascent + xft_font->descent) - (xfont->mini_height * 2 + xfont->mini_pad * 5 + PANGO_SCALE / 2) / PANGO_SCALE) / 2);
+ ink_rect->width = xfont->mini_width * cols + xfont->mini_pad * (2 * cols + 1);
+ ink_rect->height = xfont->mini_height * 2 + xfont->mini_pad * 5;
}
if (logical_rect)
{
logical_rect->x = 0;
logical_rect->y = - PANGO_SCALE * xft_font->ascent;
- logical_rect->width = PANGO_SCALE * (xfont->mini_width * cols + xfont->mini_pad * (2 * cols + 2));
+ logical_rect->width = xfont->mini_width * cols + xfont->mini_pad * (2 * cols + 2);
logical_rect->height = (xft_font->ascent + xft_font->descent) * PANGO_SCALE;
}
}
diff --git a/pango/pangoxft-render.c b/pango/pangoxft-render.c
index 1c156405..44d15ddb 100644
--- a/pango/pangoxft-render.c
+++ b/pango/pangoxft-render.c
@@ -279,7 +279,7 @@ box_in_bounds (PangoRenderer *renderer,
if (!renderer->matrix)
{
#define COORD_MIN (PANGO_SCALE * -16384 - PANGO_SCALE / 2)
-#define COORD_MAX (PANGO_SCALE * -32767 + PANGO_SCALE / 2 - 1)
+#define COORD_MAX (PANGO_SCALE * 32767 + PANGO_SCALE / 2 - 1)
return (x >= COORD_MIN && x + width <= COORD_MAX &&
y >= COORD_MIN && y + width <= COORD_MAX);
#undef COORD_MIN
@@ -348,7 +348,7 @@ pango_xft_renderer_draw_glyphs (PangoRenderer *renderer,
glyph &= ~PANGO_XFT_UNKNOWN_FLAG;
- ys[0] = glyph_y - PANGO_SCALE * xft_font->ascent + (PANGO_SCALE * (xft_font->ascent + xft_font->descent) - xfont->mini_height * 2 - xfont->mini_pad * 5) / 2;
+ ys[0] = glyph_y - PANGO_SCALE * xft_font->ascent + PANGO_SCALE * (((xft_font->ascent + xft_font->descent) - (xfont->mini_height * 2 + xfont->mini_pad * 5 + PANGO_SCALE / 2) / PANGO_SCALE) / 2);
ys[1] = ys[0] + 2 * xfont->mini_pad + xfont->mini_height;
ys[2] = ys[1] + xfont->mini_height + xfont->mini_pad;