mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-19 14:45:29 +00:00
Font selection was done in Python on the main thread, taking ~15ms at startup on Linux and much more on macOS, where all installed fonts were listed from CoreText and converted to Python, taking ~165ms. Port the selection algorithm to pure C in font-select.c, with platform backends in fontconfig.c and core_text.m, so that it can run in a thread started by set_font_family(). The results are used when the first font group is created, typically when the first OS Window is created. The data for variable fonts is read from the font tables by C code that does not use Python or FreeType. The fontconfig backend lists all monospace fonts once and filters them in C, as listing fonts is dominated by scanning all fonts. The CoreText backend queries only the needed font families and PostScript names instead of all installed fonts. On Linux, the selected fonts are identical to those selected by the previous Python implementation for ~1400 font specifications, including variable fonts. The CoreText backend has not yet been compiled or tested. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atexit.py | ||
| base.py | ||
| CascadiaCode-Regular.otf | ||
| check_build.py | ||
| child.py | ||
| choose_files.py | ||
| clipboard.py | ||
| ComfyCode-Regular.ttf | ||
| command_palette.py | ||
| completion.py | ||
| crypto.py | ||
| datatypes.py | ||
| dnd.py | ||
| dnd_kitten.py | ||
| docks.py | ||
| edit_in_kitty.py | ||
| file_transmission.py | ||
| FiraCode-Medium.otf | ||
| fonts.py | ||
| glfw.py | ||
| gr.py | ||
| GraphemeBreakTest.json | ||
| graphics.py | ||
| hints.py | ||
| iosevka-regular.ttf | ||
| iterable_arguments.py | ||
| keys.py | ||
| layout.py | ||
| LiberationMono-Regular.ttf | ||
| main.py | ||
| mouse.py | ||
| multicell.py | ||
| notifications.py | ||
| notify.py | ||
| open_actions.py | ||
| options.py | ||
| panels.py | ||
| parser.py | ||
| program_status.py | ||
| remote_control.py | ||
| resize_edge.py | ||
| resize_fraction.py | ||
| screen.py | ||
| search_query_parser.py | ||
| selection_drag.py | ||
| sessions.py | ||
| shell_integration.py | ||
| shm.py | ||
| single_instance.py | ||
| slang.py | ||
| ssh.py | ||
| tab_bar.py | ||
| tab_drop.py | ||
| tab_workspaces.py | ||
| tui.py | ||
| twemoji_smiley-cff2_colr_1.otf | ||
| utmp.py | ||