From a00e7fbed80ff6cf2133ddfd8b92fd2e6e6cdc6c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Oct 2016 22:13:24 +0530 Subject: [PATCH] Fix bold fonts not being used --- kitty/fonts.py | 4 ++-- kitty/shaders.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/fonts.py b/kitty/fonts.py index 135d4cfb5..1f3c998f6 100644 --- a/kitty/fonts.py +++ b/kitty/fonts.py @@ -42,7 +42,7 @@ def get_font(query, bold, italic): def find_font_for_character(family, char, bold=False, italic=False): q = escape_family_name(family) + ':charset={}'.format(hex(ord(char[0]))[2:]) if bold: - q += ':bold=200' + q += ':weight=200' if italic: q += ':slant=100' return get_font(q, bold, italic) @@ -52,7 +52,7 @@ def find_font_for_character(family, char, bold=False, italic=False): def get_font_information(q, bold=False, italic=False): q = escape_family_name(q) if bold: - q += ':bold=200' + q += ':weight=200' if italic: q += ':slant=100' return get_font(q, bold, italic) diff --git a/kitty/shaders.py b/kitty/shaders.py index c673ba41f..686016775 100644 --- a/kitty/shaders.py +++ b/kitty/shaders.py @@ -138,7 +138,7 @@ class Sprites: except KeyError: pass text, attrs = key - bold, italic = attrs & BOLD_MASK, attrs & ITALIC_MASK + bold, italic = bool(attrs & BOLD_MASK), bool(attrs & ITALIC_MASK) first, second = render_cell(text, bold, italic) self.first_cell_cache[key] = first = self.add_sprite(first) if second is not None: