kitty/kitty_tests
Strykar 8be2a10b29
fonts: attach synthetic-italic FC_MATRIX to found roman faces
fontconfig's FcFontList omits FC_MATRIX from its object set
(kitty/fontconfig.c), so a roman font that find_best_match finds there
(e.g. Fira Code, which ships no italic, in both its static and variable
builds) carries no synthetic-italic shear and its "italic" renders upright.
A family that is not found is substituted, and when the substitute
resolves through the listed faces those descriptors are equally
matrix-less, so this attach covers them too. Only raw fc_match
descriptors (runtime glyph-fallback faces via create_fallback_face, and
find_best_match's last-resort return) already carry the matrix from
substitution.

The italic intent for the configured faces exists only during selection,
not at face construction, so attach the matrix at the end of
get_font_files: for an italic slot whose chosen face is upright and has no
matrix, ask fc_match what fontconfig would do. fc_match returns a synthetic
matrix only when there is no real italic to use (no italic face and no
slanted named instance or variable slant axis), so a font that is already
italic, static or variable, is never double-slanted. Face construction
applies the matrix via FT_Set_Transform; the previous commit makes it
survive the size specialization step the render path builds faces from.
Only the matrix is taken, so selection is unchanged.

FontConfigPattern declared matrix as a required key, but pattern_as_dict
sets it only when the pattern has one, so declare it NotRequired. With
that and narrowing on descriptor_type the attach needs no cast.

Add a regression test (test_synthetic_italic_matrix): a roman no-italic
font gets a non-identity matrix on its italic slot while a real-italic
control does not, and the matrix survives specialize_font_descriptor. It
asserts the invariant rather than the exact shear (the value is
fontconfig's, version-dependent) and skips when the synthetic rule is
inactive.

Covers the four configured faces. Limitation: fc_match re-matches by family
name, so under an uncommon config (a multi-face family key plus a user
per-font FC_MATRIX rule keyed on width/style) it can attach a matrix
computed for a different face; the 90-synthetic shear this targets is
weight-independent and unaffected. A production version should re-match the
selected face by path+index+slant.
2026-06-11 00:57:59 +05:30
..
__init__.py More work on dnd kitten 2026-05-11 21:51:23 +05:30
atexit.py Add integration test for go atexit implementation 2025-09-30 12:37:25 +05:30
CascadiaCode-Regular.otf
check_build.py Cleanup previous PR 2026-03-15 08:38:59 +05:30
clipboard.py Fix a regression that broke writing to the clipboard using the OSC 5522 protocol 2024-09-15 08:42:50 +05:30
ComfyCode-Regular.ttf Add shaping tests for ligature cases and bundle Comfy Code 2026-04-25 19:43:17 +08:00
command_palette.py Add alias and combine support to the command palette 2026-04-06 09:45:39 -07:00
completion.py remove leftover debug prints 2025-07-20 21:45:36 +05:30
crypto.py Only import resource module when actually running the test instead of at import time 2023-05-24 16:59:44 +05:30
datatypes.py Cleanup previous PR 2026-04-28 16:57:14 +05:30
dnd.py fix drop_update_mimes: use exact MIME matching and correct sentinel value 2026-05-17 16:45:07 +00:00
dnd_kitten.py Add data URI support to dnd kitten parse_uri_list 2026-05-18 07:54:57 +00:00
file_transmission.py tests: apply os.utime to created symlinks too 2024-10-03 23:09:28 -04:00
FiraCode-Medium.otf
fonts.py fonts: attach synthetic-italic FC_MATRIX to found roman faces 2026-06-11 00:57:59 +05:30
glfw.py a couple more tests 2023-12-01 18:16:22 +05:30
gr.py Make shebangs consistent 2023-11-11 08:32:05 +05:30
GraphemeBreakTest.json Add support for Unicode 17 2025-10-18 09:59:53 +05:30
graphics.py dd basic drag thumbnail support to dnd kitten 2026-05-03 22:18:18 +05:30
iosevka-regular.ttf Fix ligatures not working with the Iosevka font 2021-06-04 12:18:17 +05:30
keys.py Preserve copy_or_noop passthrough 2026-05-20 11:15:49 +05:00
layout.py Add equalize action and equalize_on_close option to Splits layout 2026-05-29 20:02:42 +01:00
LiberationMono-Regular.ttf
main.py Bump python version in CI 2026-04-19 21:35:13 +05:30
mouse.py Fix double-click word selection not extending beyond viewport edges 2026-04-07 09:49:50 +00:00
multicell.py Fix crash in overlay line drawing on uninitialized linebuf view 2026-04-18 13:10:07 +08:00
notifications.py Ensure temp files and other resources are cleaned up even if kitty crashes or is SIGKILLed 2025-01-05 12:51:59 +05:30
open_actions.py Make shebangs consistent 2023-11-11 08:32:05 +05:30
options.py pep8 2026-04-24 10:42:25 +05:30
panels.py ... 2025-05-03 10:47:03 +05:30
parser.py Add parse test for CSI 14;2 t 2025-11-24 11:23:21 +05:30
screen.py Merge branch 'decst8c' of https://github.com/aymanbagabas/kitty 2026-05-27 08:38:45 +05:30
search_query_parser.py Replace isort with ruff 2023-01-09 16:47:42 +05:30
shell_integration.py Make detection of command line flags that prevent sudo from overriding TERMINFO more robust 2026-05-05 09:38:07 +05:30
shm.py Go SHM API to read simple data with size from SHM name 2023-02-26 08:01:02 +05:30
ssh.py Avoid shell quoting in ssh login fallback 2026-05-19 23:14:08 +05:00
tui.py Make shebangs consistent 2023-11-11 08:32:05 +05:30
twemoji_smiley-cff2_colr_1.otf Add basic colrv1 rendering test 2025-02-03 11:06:41 +05:30
utmp.py ... 2022-12-11 20:55:06 +05:30