]> git.sur5r.net Git - i3/i3/blobdiff - libi3/font.c
Merge pull request #1521 from Airblader/feature-use-refactored-function
[i3/i3] / libi3 / font.c
index f2a7e1fb839988a9bb05aa3294436e5126c42e53..cb92d52fbd29bc8281cb9beabcc269f2c5fca93b 100644 (file)
@@ -126,7 +126,7 @@ static void draw_text_pango(const char *text, size_t text_len,
     cairo_set_source_rgb(cr, pango_font_red, pango_font_green, pango_font_blue);
     pango_cairo_update_layout(cr, layout);
     pango_layout_get_pixel_size(layout, NULL, &height);
-    cairo_move_to(cr, x, y - (height - savedFont->height));
+    cairo_move_to(cr, x, y - 0.5 * (height - savedFont->height));
     pango_cairo_show_layout(cr, layout);
 
     /* Free resources */
@@ -455,7 +455,7 @@ static int xcb_query_text_width(const xcb_char2b_t *text, size_t text_len) {
                                                                          cookie, &error);
     if (reply == NULL) {
         /* We return a safe estimate because a rendering error is better than
-         * a crash. Plus, the user will see the error in his log. */
+         * a crash. Plus, the user will see the error in their log. */
         fprintf(stderr, "Could not get text extents (X error code %d)\n",
                 error->error_code);
         return savedFont->specific.xcb.info->max_bounds.character_width * text_len;