Add a changelog entry for the last merge

Also some misc code/docs cleanups for it.
This commit is contained in:
Kovid Goyal 2020-12-17 11:24:38 +05:30
parent 0b2726ec33
commit 4cd14aee42
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 8 additions and 4 deletions

View File

@ -15,6 +15,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Allow specifying text formatting in :opt:`tab_title_template` (:iss:`3146`)
- Linux: Read :opt:`font_features` from the FontConfig database as well, so
that they can be configured in a single, central location (:pull:`3174`)
- Graphics protocol: Add support for giving individual image placements their
own ids and for asking the terminal emulator to assign ids for images. Also
allow suppressing responses from the terminal to commands.

View File

@ -325,7 +325,8 @@ Note that this code is indexed by PostScript name, and not the font
family. This allows you to define very precise feature settings; e.g. you can
disable a feature in the italic font but not in the regular font.
By default they are derived automatically, by the OSes font system (linux only).
On Linux, these are read from the FontConfig database first and then this,
setting is applied, so they can be configured in a single, central place.
To get the PostScript name for a font, use :code:`kitty + list-fonts --psnames`:

View File

@ -52,7 +52,7 @@ def list_fonts() -> Generator[ListedFont, None, None]:
def find_font_features(postscript_name: str) -> Tuple[str, ...]:
"""Not Implemented"""
return tuple()
return ()
def find_best_match(family: str, bold: bool = False, italic: bool = False) -> CoreTextFont:

View File

@ -74,8 +74,8 @@ def fc_match(family: str, bold: bool, italic: bool, spacing: int = FC_MONO) -> F
def find_font_features(postscript_name: str) -> Tuple[str, ...]:
pat = fc_match_postscript_name(postscript_name)
if 'postscript_name' not in pat or pat['postscript_name'] != postscript_name or 'fontfeatures' not in pat:
return tuple()
if pat.get('postscript_name') != postscript_name or 'fontfeatures' not in pat:
return ()
features = []
for feat in pat['fontfeatures']: