Skip to content

Commit 4cd14ae

Browse files
committed
Add a changelog entry for the last merge
Also some misc code/docs cleanups for it.
1 parent 0b2726e commit 4cd14ae

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
1515

1616
- Allow specifying text formatting in :opt:`tab_title_template` (:iss:`3146`)
1717

18+
- Linux: Read :opt:`font_features` from the FontConfig database as well, so
19+
that they can be configured in a single, central location (:pull:`3174`)
20+
1821
- Graphics protocol: Add support for giving individual image placements their
1922
own ids and for asking the terminal emulator to assign ids for images. Also
2023
allow suppressing responses from the terminal to commands.

kitty/config_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ def disable_ligatures(x: str) -> int:
325325
family. This allows you to define very precise feature settings; e.g. you can
326326
disable a feature in the italic font but not in the regular font.
327327
328-
By default they are derived automatically, by the OSes font system (linux only).
328+
On Linux, these are read from the FontConfig database first and then this,
329+
setting is applied, so they can be configured in a single, central place.
329330
330331
To get the PostScript name for a font, use :code:`kitty + list-fonts --psnames`:
331332

kitty/fonts/core_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def list_fonts() -> Generator[ListedFont, None, None]:
5252

5353
def find_font_features(postscript_name: str) -> Tuple[str, ...]:
5454
"""Not Implemented"""
55-
return tuple()
55+
return ()
5656

5757

5858
def find_best_match(family: str, bold: bool = False, italic: bool = False) -> CoreTextFont:

kitty/fonts/fontconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def fc_match(family: str, bold: bool, italic: bool, spacing: int = FC_MONO) -> F
7474
def find_font_features(postscript_name: str) -> Tuple[str, ...]:
7575
pat = fc_match_postscript_name(postscript_name)
7676

77-
if 'postscript_name' not in pat or pat['postscript_name'] != postscript_name or 'fontfeatures' not in pat:
78-
return tuple()
77+
if pat.get('postscript_name') != postscript_name or 'fontfeatures' not in pat:
78+
return ()
7979

8080
features = []
8181
for feat in pat['fontfeatures']:

0 commit comments

Comments
 (0)