[vte] widget: Remove faux bold support



commit f0ee057544f7ba255e92c171203e8b4a8de09121
Author: Egmont Koblinger <egmont gmail com>
Date:   Wed Mar 21 21:20:39 2018 +0100

    widget: Remove faux bold support
    
    When no suitable bold counterpart is found for a font, simply use the
    base font rather than printing it twice with a 1px offset.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756010

 src/vte.cc     |    3 +--
 src/vtedraw.cc |   22 ----------------------
 src/vtedraw.hh |    1 -
 3 files changed, 1 insertions(+), 25 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index fae9da8..9730ac8 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -361,8 +361,7 @@ VteTerminalPrivate::invalidate_cells(vte::grid::column_t column_start,
         * Always include the extra pixel border and overlap pixel.
         */
         rect.x = column_start * m_cell_width - 1;
-        /* The extra + 1 is for the faux-bold overdraw */
-        int xend = (column_start + n_columns) * m_cell_width + 1 + 1;
+        int xend = (column_start + n_columns) * m_cell_width + 1;
         rect.width = xend - rect.x;
 
         rect.y = row_to_pixel(row_start) - 1;
diff --git a/src/vtedraw.cc b/src/vtedraw.cc
index 178f844..7fceef7 100644
--- a/src/vtedraw.cc
+++ b/src/vtedraw.cc
@@ -982,12 +982,6 @@ _vte_draw_get_char_edges (struct _vte_draw *draw, vteunistr c, int columns, guin
                 *right = l + w;
 }
 
-gboolean
-_vte_draw_has_bold (struct _vte_draw *draw, guint style)
-{
-       return (draw->fonts[style ^ VTE_DRAW_BOLD] != draw->fonts[style]);
-}
-
 /* Check if a unicode character is actually a graphic character we draw
  * ourselves to handle cases where fonts don't have glyphs for them. */
 static gboolean
@@ -1561,22 +1555,6 @@ _vte_draw_text (struct _vte_draw *draw,
        }
 
        _vte_draw_text_internal (draw, requests, n_requests, color, alpha, style);
-
-       /* handle fonts that lack a bold face by double-striking */
-       if ((style & VTE_DRAW_BOLD) && !_vte_draw_has_bold (draw, style)) {
-               gsize i;
-
-               /* Take a step to the right. */
-               for (i = 0; i < n_requests; i++) {
-                       requests[i].x++;
-               }
-               _vte_draw_text_internal (draw, requests,
-                                          n_requests, color, alpha, style);
-               /* Now take a step back. */
-               for (i = 0; i < n_requests; i++) {
-                       requests[i].x--;
-               }
-       }
 }
 
 /* The following two functions are unused since commit 154abade902850afb44115cccf8fcac51fc082f0,
diff --git a/src/vtedraw.hh b/src/vtedraw.hh
index 5248aef..c3ede79 100644
--- a/src/vtedraw.hh
+++ b/src/vtedraw.hh
@@ -70,7 +70,6 @@ void _vte_draw_get_text_metrics(struct _vte_draw *draw,
                                 GtkBorder *char_spacing);
 void _vte_draw_get_char_edges (struct _vte_draw *draw, vteunistr c, int columns, guint style,
                                int *left, int *right);
-gboolean _vte_draw_has_bold (struct _vte_draw *draw, guint style);
 
 void _vte_draw_text(struct _vte_draw *draw,
                    struct _vte_draw_text_request *requests, gsize n_requests,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]