From d6bf5aa0113c948c773b1635d5383d95e513776c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 22 Oct 2017 17:13:11 +0530 Subject: [PATCH] Remove unused code --- kitty/fonts/fontconfig.py | 45 --------------------------------------- 1 file changed, 45 deletions(-) diff --git a/kitty/fonts/fontconfig.py b/kitty/fonts/fontconfig.py index 165bb5a50..9375f34aa 100644 --- a/kitty/fonts/fontconfig.py +++ b/kitty/fonts/fontconfig.py @@ -4,7 +4,6 @@ import os import re -import subprocess from collections import namedtuple from kitty.fast_data_types import Face, get_fontconfig_font @@ -35,50 +34,6 @@ def font_not_found(err, char): return FontNotFound(msg) -def get_font_subprocess( - family='monospace', - bold=False, - italic=False, - allow_bitmaped_fonts=False, - size_in_pts=None, - character=None, - dpi=None -): - query = escape_family_name(family) - if character is not None: - query += ':charset={:x}'.format(ord(character[0])) - if not allow_bitmaped_fonts: - query += ':scalable=true:outline=true' - if size_in_pts is not None: - query += ':size={:.1f}'.format(size_in_pts) - if dpi is not None: - query += ':dpi={:.1f}'.format(dpi) - if bold: - query += ':weight=200' - if italic: - query += ':slant=100' - try: - raw = subprocess.check_output([ - 'fc-match', query, '-f', - '%{file}\x1e%{hinting}\x1e%{hintstyle}\x1e%{scalable}\x1e%{outline}\x1e%{weight}\x1e%{slant}\x1e%{index}' - ]).decode('utf-8') - except subprocess.CalledProcessError as err: - raise font_not_found(err, character) - parts = raw.split('\x1e') - try: - path, hinting, hintstyle, scalable, outline, weight, slant, index = parts - except ValueError: - path = parts[0] - hintstyle, hinting, scalable, outline, weight, slant, index = 1, 'True', 'True', 'True', 100, 0, 0 - return Font( - path, - to_bool(hinting), - int(hintstyle), bold, italic, - to_bool(scalable), - to_bool(outline), int(weight), int(slant), int(index) - ) - - def get_font_lib( family='monospace', bold=False,