kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
22.7k stars 923 forks source link

[RFC] OpenType Variable font support and new UI for choosing fonts #7570

Open kovidgoyal opened 5 days ago

kovidgoyal commented 5 days ago

Hi all,

I have added support to kitty for OpenType variable fonts. This means that, for fonts that support it, you can precisely control the weight, spacing, italic angle, etc. There is also a new UI in the form of the choose-fonts kitten to make selecting fonts and setting their features and variable values easier. Run it with:

kitten choose-fonts

See the docs for the this kitten

Some screenshots of the kitten:

Selecting a font family

Fine tuning the appearance of a font face

The code works on both Linux and macOS. Note that this required extensive re-writing of font selection internals so there could be regressions.

I would appreciate some testing from those of you in a position to do so, as there are two platforms and dozens of fonts and settings and thousands of lines of code involved, it's hard for me to cover everything.

You can use the kitty nightly build or build kitty from source.

Note that the existing font_features setting in kitty.conf still works, but is obsoleted by the new choose fonts kitten. It should only be used for fallback fonts. The main fonts should have their features configured via choose-fonts.

Thanks, and enjoy.

neurocyte commented 5 days ago

I have an issue building on Arch Linux:

> ./dev.sh build
[32/32] Compiling kitty/window_logo.c ... done
Compiling kitty/keys.c ...
gcc -MMD -DNDEBUG -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include -Wextra -Wfloat-conversion -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11 -pedantic-errors -Werror -O3 -fwrapv -fstack-protector-strong -pipe -fvisibility=hidden -fno-plt -fPIC -D_FORTIFY_SOURCE=2 -flto -fcf-protection=full -march=native -mtune=native -pthread -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/libpng16 -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/freetype2 -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/libpng16 -I/usr/include/uuid -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/harfbuzz -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/freetype2 -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/libpng16 -I/home/cjv/pkgs/kitty/dependencies/linux-amd64/include/python3.11 -c kitty/keys.c -o build/fast_data_types-kitty-keys.c.o
kitty/keys.c: In function ‘is_no_action_key’:
kitty/keys.c:55:14: error: ‘XKB_KEY_XF86Fn’ undeclared (first use in this function); did you mean ‘XKB_KEY_XF86Go’?
   55 |         case XKB_KEY_XF86Fn:
      |              ^~~~~~~~~~~~~~
      |              XKB_KEY_XF86Go
kitty/keys.c:55:14: note: each undeclared identifier is reported only once for each function it appears in
The following build command failed: /home/cjv/pkgs/kitty/dependencies/linux-amd64/bin/python setup.py develop
exit status 1
neurocyte commented 5 days ago

I have an issue building on Arch Linux

Nevermind. My bad. ./dev.sh deps fixed it.

neurocyte commented 5 days ago

After pressing enter on the initial font selection screen I get this:

$ kitten choose-fonts
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/cjv/pkgs/kitty/__main__.py", line 7, in <module>
    main()
  File "/home/cjv/pkgs/kitty/kitty/entry_points.py", line 192, in main
    namespaced(['+', first_arg[1:]] + sys.argv[2:])
  File "/home/cjv/pkgs/kitty/kitty/entry_points.py", line 146, in namespaced
    func(args[1:])
  File "/home/cjv/pkgs/kitty/kitty/entry_points.py", line 24, in runpy
    exec(args[1])
  File "<string>", line 1, in <module>
  File "/home/cjv/pkgs/kitty/kittens/choose_fonts/backend.py", line 217, in main
    opts, family_key, dpi_x, dpi_y = opts_from_cmd(cmd)
                                     ^^^^^^^^^^^^^^^^^^
  File "/home/cjv/pkgs/kitty/kittens/choose_fonts/backend.py", line 75, in opts_from_cmd
    opts.foreground = to_color(ts['foreground'])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cjv/pkgs/kitty/kitty/conf/utils.py", line 60, in to_color
    ans = as_color(x, validate=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cjv/pkgs/kitty/kitty/rgb.py", line 73, in to_color
    raise ValueError(f'Invalid color name: {raw}')
ValueError: Invalid color name: 
Error: exit status 1
kovidgoyal commented 4 days ago

Are you running kitten choose-fonts inside an instance of kitty built from source as well?

neurocyte commented 4 days ago

You are right. I was somehow getting my kitty versions mixed up. I deinstalled the arch version of kitty and restarted all my kitty sessions and now it works.

JorgeVV commented 4 days ago

I get segfault when trying to select any Monaspace's font from the list. kittly nightly build

$ kitten choose-fonts
Error: signal: segmentation fault
kovidgoyal commented 4 days ago

Works for me with both Monaspace Argon Var and Monaspace Neon. Post the actual backtrace. What OS are you running on? And exactly what steps dd you take leading to the segfault.

JorgeVV commented 4 days ago

What OS are you running on?

MacOS 12.7.1.

Post the actual backtrace

The only output I get is Error: signal: segmentation fault. Is there a log file with more details?

And exactly what steps dd you take leading to the segfault

I just installed the nightly build. Previously I was on latest stable.

  1. run kitten choose-fonts
  2. Kitten loads. I can see a list of font families.
  3. I change current selection with arrows keys ↑ ↓
  4. If I select any of Monaspace's (just selecting it in the font list, not choosing it by pressing enter), the process exits and I get the output mentioned above.
trygveaa commented 4 days ago

There is something going on with ligatures in the font preview, parts of them are invisible. You can see in the first screenshot below that part of the <=> and |} ligatures are missing.

Preview of JetBrains Mono, looks wrong: image

Preview of JetBrains Mono NL (same font without ligatures), looks correct: image

The same characters printed normally in the terminal with JetBrains Mono (with ligatures), looks correct: image

The font is installed from the ttf-jetbrains-mono package in Arch Linux, version 2.304-1. Running kitty commit 190048080.

kovidgoyal commented 4 days ago

On Mon, Jun 24, 2024 at 09:09:07AM -0700, Jorge Villalobos wrote:

What OS are you running on?

MacOS 12.7.1.

Post the actual backtrace

The only output I get is Error: signal: segmentation fault. Is there a log file with more details?

There should be a crash report available via Console.app

And exactly what steps dd you take leading to the segfault

I just installed the nightly build. Previously I was on latest stable.

  1. run kitten choose-fonts
  2. Kitten loads. I can see a list of font families.
  3. I change current selection with arrows keys ↑ ↓
  4. If I move into any of Monaspace's (just selecting it in the left list, not choosing it pressing enter), the process exits and I get the output mentioned above.

Doesnt repro for me on macOS, however, I can only get the Monaspace Var fonts to show up not the non variable ones. Are you using up to date monaspace fonts and where exactly did you get them from?

kovidgoyal commented 4 days ago

On Mon, Jun 24, 2024 at 09:24:38AM -0700, Trygve Aaberge wrote:

There is something going on with ligatures in the font preview, parts of them are invisible. You can see in the first screenshot below that part of the <=> and |} ligatures are missing.

https://github.com/kovidgoyal/kitty/commit/a8daf067377c8a5214d7bb246288280cbeb8161c

trygveaa commented 4 days ago

a8daf06

Thanks, works now.

JorgeVV commented 2 days ago

There should be a crash report available via Console.app

Crash report ``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: kitty [4851] Path: /Applications/kitty.app/Contents/MacOS/kitty Identifier: net.kovidgoyal.kitty Version: 0.35.2 (0.35.2) Code Type: X86-64 (Native) Parent Process: kitten [4850] Responsible: kitty [4190] User ID: 502 Date/Time: 2024-06-26 17:02:16.9300 -0400 OS Version: macOS 12.7.1 (21G920) Report Version: 12 Bridge OS Version: 3.0 (14Y910) Anonymous UUID: 60CAA844-955C-4D7F-900A-51240AD56C65 Sleep/Wake UUID: DF039810-FB02-4C9C-874A-8A12D45D437E Time Awake Since Boot: 4200 seconds Time Since Wake: 2159 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000010b14f000 Exception Codes: 0x0000000000000001, 0x000000010b14f000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [4851] VM Region Info: 0x10b14f000 is not in any region. Bytes after previous region: 1 Bytes before following region: 1257472 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL mapped file 10b0e1000-10b14f000 [ 440K] r--/rw- SM=COW ...t_id=cf74c2a7 ---> GAP OF 0x133000 BYTES __TEXT 10b282000-10b6be000 [ 4336K] r-x/rwx SM=COW ...s/3.12/Python Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x7ff802f49189 _platform_memmove$VARIANT$Haswell + 41 1 Python 0x10b316b81 PyBytes_FromStringAndSize + 225 2 Python 0x10b4f9e8e va_build_stack + 158 3 Python 0x10b327a4e _PyObject_CallFunctionVa + 94 4 Python 0x10b328074 _PyObject_CallFunction_SizeT + 164 5 Python 0x10b3e03c0 unicode_decode_call_errorhandler_writer + 224 6 Python 0x10b3dd764 unicode_decode_utf8 + 2468 7 Python 0x10b4f8a51 do_mkvalue + 1121 8 Python 0x10b4f9c60 _Py_BuildValue_SizeT + 208 9 kitty.fast_data_types.so 0x10ca351f6 0x10ca1e000 + 94710 10 Python 0x10b47a08a _PyEval_EvalFrameDefault + 72842 11 Python 0x10b46738b PyEval_EvalCode + 299 12 Python 0x10b512533 run_mod + 147 13 Python 0x10b5157bc PyRun_StringFlags + 108 14 Python 0x10b4629fa builtin_exec + 698 15 Python 0x10b391d7b cfunction_vectorcall_FASTCALL_KEYWORDS + 75 16 Python 0x10b477a4c _PyEval_EvalFrameDefault + 63052 17 Python 0x10b46738b PyEval_EvalCode + 299 18 Python 0x10b4628fd builtin_exec + 445 19 Python 0x10b391d7b cfunction_vectorcall_FASTCALL_KEYWORDS + 75 20 Python 0x10b477a4c _PyEval_EvalFrameDefault + 63052 21 Python 0x10b53f5bc pymain_run_module + 268 22 Python 0x10b53ee68 pymain_run_python + 1192 23 Python 0x10b53e977 Py_RunMain + 23 24 kitty 0x10a209849 0x10a203000 + 26697 25 kitty 0x10a20894b main + 2411 26 dyld 0x119c2352e start + 462 Thread 1: 0 libsystem_pthread.dylib 0x7ff802f31f48 start_wqthread + 0 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00007f9ea0700020 rbx: 0x0000000100000004 rcx: 0x00000000fffacb00 rdx: 0x0000000100000004 rdi: 0x00007f9ea0753524 rsi: 0x000000010b14f000 rbp: 0x00007ff7b5cf9ad0 rsp: 0x00007ff7b5cf9ad0 r8: 0x0000000000000000 r9: 0x0000000000000003 r10: 0x0000000000000003 r11: 0x00007f9d95604524 r12: 0x0000000000000001 r13: 0x00007ff7b5cf9b30 r14: 0x00007f9ea0700000 r15: 0x000000010b0fbafc rip: 0x00007ff802f49189 rfl: 0x0000000000010202 cr2: 0x000000010b14f000 Logical CPU: 4 Error Code: 0x00000004 (no mapping for user data read) Trap Number: 14 Thread 0 instruction stream: c1 48 83 c1 10 3d ff ff-00 00 74 db f7 d0 0f bc .H...=....t..... c0 48 01 c1 48 0f b6 44-0f f0 4c 0f b6 44 0e f0 .H..H..D..L..D.. 4c 29 c0 5d c3 90 90 90-90 90 90 90 90 90 90 90 L).]............ 90 90 90 90 90 90 90 55-48 89 e5 49 89 fb 49 29 .......UH..I..I) f3 48 89 f8 49 39 d3 72-1b 48 83 fa 60 76 2f 48 .H..I9.r.H..`v/H 81 fa 00 40 00 00 0f 82-cb 00 00 00 48 89 d1 fc ...@........H... [f3]a4 5d c3 48 39 fe 74-f9 48 01 d6 48 01 d7 48 ..].H9.t.H..H..H <== 83 fa 60 0f 82 8c 01 00-00 e9 a9 01 00 00 48 83 ..`...........H. fa 10 76 56 c5 f8 10 4c-16 f0 48 83 ea 20 76 2a ..vV...L..H.. v* c5 fc 10 06 c5 fc 11 07-48 83 c6 20 48 83 c7 20 ........H.. H.. 48 83 ea 20 72 14 c5 fc-10 06 c5 fc 11 07 48 83 H.. r.........H. c6 20 48 83 c7 20 48 83-ea 20 48 83 c2 10 7e 0c . H.. H.. H...~. Binary Images: 0x7ff802f48000 - 0x7ff802f51fff libsystem_platform.dylib (*) <92c1278d-2673-3513-8239-3da30ea67648> /usr/lib/system/libsystem_platform.dylib 0x10b282000 - 0x10b6bdfff org.python.python (3.12.3, (c) 2001-2023 Python Software Foundation.) <920491a4-c6bb-3f1c-8a2b-0812f5f5d2b3> /Applications/kitty.app/Contents/Frameworks/Python.framework/Versions/3.12/Python 0x10ca1e000 - 0x10cc51fff kitty.fast_data_types.so (*) <710a745a-5cd4-373e-a978-3b588bd1bfc2> /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions/kitty.fast_data_types.so 0x10a203000 - 0x10a21efff net.kovidgoyal.kitty (0.35.2) <2bf099ca-9fd8-3f99-bbbc-46146c77f426> /Applications/kitty.app/Contents/MacOS/kitty 0x119c1e000 - 0x119c89fff dyld (*) <771e1916-3a62-34cd-8488-c1021053c7fa> /usr/lib/dyld 0x7ff802f30000 - 0x7ff802f3bfff libsystem_pthread.dylib (*) /usr/lib/system/libsystem_pthread.dylib 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=844.2M resident=0K(0%) swapped_out_or_unallocated=844.2M(100%) Writable regions: Total=8.6G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8.6G(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 1 ColorSync 72K 4 Kernel Alloc Once 8K 1 MALLOC 457.4M 36 MALLOC guard page 16K 4 MALLOC_LARGE (reserved) 7.8G 3 reserved VM address space (unallocated) MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated) STACK GUARD 56.0M 2 Stack 8712K 2 VM_ALLOCATE 9240K 12 __DATA 22.5M 271 __DATA_CONST 11.1M 154 __DATA_DIRTY 489K 88 __FONT_DATA 4K 1 __LINKEDIT 648.4M 28 __OBJC_RO 82.9M 1 __OBJC_RW 3200K 2 __TEXT 195.8M 286 __UNICODE 592K 1 dyld private memory 1024K 1 mapped file 45.8M 5 shared memory 44K 4 =========== ======= ======= TOTAL 9.6G 908 TOTAL, minus reserved VM space 1.5G 908 ----------- Full Report ----------- {"app_name":"kitty","timestamp":"2024-06-26 17:02:17.00 -0400","app_version":"0.35.2","slice_uuid":"2bf099ca-9fd8-3f99-bbbc-46146c77f426","build_version":"0.35.2","platform":1,"bundleID":"net.kovidgoyal.kitty","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.7.1 (21G920)","incident_id":"A1EAB971-E11F-4645-A6C1-794B8DB5E73B","name":"kitty"} { "uptime" : 4200, "procLaunch" : "2024-06-26 17:02:06.6790 -0400", "procRole" : "Unspecified", "version" : 2, "userID" : 502, "deployVersion" : 210, "modelCode" : "MacBookPro13,3", "procStartAbsTime" : 4238445588549, "coalitionID" : 1819, "osVersion" : { "train" : "macOS 12.7.1", "build" : "21G920", "releaseType" : "User" }, "captureTime" : "2024-06-26 17:02:16.9300 -0400", "incident" : "A1EAB971-E11F-4645-A6C1-794B8DB5E73B", "bug_type" : "309", "pid" : 4851, "procExitAbsTime" : 4248695627365, "cpuType" : "X86-64", "procName" : "kitty", "procPath" : "\/Applications\/kitty.app\/Contents\/MacOS\/kitty", "bundleInfo" : {"CFBundleShortVersionString":"0.35.2","CFBundleVersion":"0.35.2","CFBundleIdentifier":"net.kovidgoyal.kitty"}, "storeInfo" : {"deviceIdentifierForVendor":"694E00B1-579A-5ADC-81C6-E569BA7C1945","thirdParty":true}, "parentProc" : "kitten", "parentPid" : 4850, "coalitionName" : "net.kovidgoyal.kitty", "crashReporterKey" : "60CAA844-955C-4D7F-900A-51240AD56C65", "responsiblePid" : 4190, "responsibleProc" : "kitty", "wakeTime" : 2159, "bridgeVersion" : {"build":"14Y910","train":"3.0"}, "sleepWakeUUID" : "DF039810-FB02-4C9C-874A-8A12D45D437E", "sip" : "enabled", "vmRegionInfo" : "0x10b14f000 is not in any region. Bytes after previous region: 1 Bytes before following region: 1257472\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n mapped file 10b0e1000-10b14f000 [ 440K] r--\/rw- SM=COW ...t_id=cf74c2a7\n---> GAP OF 0x133000 BYTES\n __TEXT 10b282000-10b6be000 [ 4336K] r-x\/rwx SM=COW ...s\/3.12\/Python", "isCorpse" : 1, "exception" : {"codes":"0x0000000000000001, 0x000000010b14f000","rawCodes":[1,4480888832],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x000000010b14f000"}, "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":4851}, "vmregioninfo" : "0x10b14f000 is not in any region. Bytes after previous region: 1 Bytes before following region: 1257472\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n mapped file 10b0e1000-10b14f000 [ 440K] r--\/rw- SM=COW ...t_id=cf74c2a7\n---> GAP OF 0x133000 BYTES\n __TEXT 10b282000-10b6be000 [ 4336K] r-x\/rwx SM=COW ...s\/3.12\/Python", "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":66798,"instructionState":{"instructionStream":{"bytes":[193,72,131,193,16,61,255,255,0,0,116,219,247,208,15,188,192,72,1,193,72,15,182,68,15,240,76,15,182,68,14,240,76,41,192,93,195,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,85,72,137,229,73,137,251,73,41,243,72,137,248,73,57,211,114,27,72,131,250,96,118,47,72,129,250,0,64,0,0,15,130,203,0,0,0,72,137,209,252,243,164,93,195,72,57,254,116,249,72,1,214,72,1,215,72,131,250,96,15,130,140,1,0,0,233,169,1,0,0,72,131,250,16,118,86,197,248,16,76,22,240,72,131,234,32,118,42,197,252,16,6,197,252,17,7,72,131,198,32,72,131,199,32,72,131,234,32,114,20,197,252,16,6,197,252,17,7,72,131,198,32,72,131,199,32,72,131,234,32,72,131,194,16,126,12],"offset":96}},"threadState":{"r13":{"value":140701883931440},"rax":{"value":140319273254944},"rflags":{"value":66050},"cpu":{"value":4},"r14":{"value":140319273254912},"rsi":{"value":4480888832},"r8":{"value":0},"cr2":{"value":4480888832},"rdx":{"value":4294967300},"r10":{"value":3},"r9":{"value":3},"r15":{"value":4480547580},"rbx":{"value":4294967300},"trap":{"value":14,"description":"(no mapping for user data read)"},"err":{"value":4},"r11":{"value":140314792707364},"rip":{"value":140703178199433,"matchesCrashFrame":1},"rbp":{"value":140701883931344},"rsp":{"value":140701883931344},"r12":{"value":1},"rcx":{"value":4294626048},"flavor":"x86_THREAD_STATE","rdi":{"value":140319273596196}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4489,"symbol":"_platform_memmove$VARIANT$Haswell","symbolLocation":41,"imageIndex":0},{"imageOffset":609153,"symbol":"PyBytes_FromStringAndSize","symbolLocation":225,"imageIndex":1},{"imageOffset":2588302,"symbol":"va_build_stack","symbolLocation":158,"imageIndex":1},{"imageOffset":678478,"symbol":"_PyObject_CallFunctionVa","symbolLocation":94,"imageIndex":1},{"imageOffset":680052,"symbol":"_PyObject_CallFunction_SizeT","symbolLocation":164,"imageIndex":1},{"imageOffset":1434560,"symbol":"unicode_decode_call_errorhandler_writer","symbolLocation":224,"imageIndex":1},{"imageOffset":1423204,"symbol":"unicode_decode_utf8","symbolLocation":2468,"imageIndex":1},{"imageOffset":2583121,"symbol":"do_mkvalue","symbolLocation":1121,"imageIndex":1},{"imageOffset":2587744,"symbol":"_Py_BuildValue_SizeT","symbolLocation":208,"imageIndex":1},{"imageOffset":94710,"imageIndex":2},{"imageOffset":2064522,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":72842,"imageIndex":1},{"imageOffset":1987467,"symbol":"PyEval_EvalCode","symbolLocation":299,"imageIndex":1},{"imageOffset":2688307,"symbol":"run_mod","symbolLocation":147,"imageIndex":1},{"imageOffset":2701244,"symbol":"PyRun_StringFlags","symbolLocation":108,"imageIndex":1},{"imageOffset":1968634,"symbol":"builtin_exec","symbolLocation":698,"imageIndex":1},{"imageOffset":1113467,"symbol":"cfunction_vectorcall_FASTCALL_KEYWORDS","symbolLocation":75,"imageIndex":1},{"imageOffset":2054732,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":63052,"imageIndex":1},{"imageOffset":1987467,"symbol":"PyEval_EvalCode","symbolLocation":299,"imageIndex":1},{"imageOffset":1968381,"symbol":"builtin_exec","symbolLocation":445,"imageIndex":1},{"imageOffset":1113467,"symbol":"cfunction_vectorcall_FASTCALL_KEYWORDS","symbolLocation":75,"imageIndex":1},{"imageOffset":2054732,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":63052,"imageIndex":1},{"imageOffset":2872764,"symbol":"pymain_run_module","symbolLocation":268,"imageIndex":1},{"imageOffset":2870888,"symbol":"pymain_run_python","symbolLocation":1192,"imageIndex":1},{"imageOffset":2869623,"symbol":"Py_RunMain","symbolLocation":23,"imageIndex":1},{"imageOffset":26697,"imageIndex":3},{"imageOffset":22859,"symbol":"main","symbolLocation":2411,"imageIndex":3},{"imageOffset":21806,"symbol":"start","symbolLocation":462,"imageIndex":4}]},{"id":66799,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]}], "usedImages" : [ { "source" : "P", "arch" : "x86_64", "base" : 140703178194944, "size" : 40960, "uuid" : "92c1278d-2673-3513-8239-3da30ea67648", "path" : "\/usr\/lib\/system\/libsystem_platform.dylib", "name" : "libsystem_platform.dylib" }, { "source" : "P", "arch" : "x86_64", "base" : 4482146304, "CFBundleShortVersionString" : "3.12.3, (c) 2001-2023 Python Software Foundation.", "CFBundleIdentifier" : "org.python.python", "size" : 4440064, "uuid" : "920491a4-c6bb-3f1c-8a2b-0812f5f5d2b3", "path" : "\/Applications\/kitty.app\/Contents\/Frameworks\/Python.framework\/Versions\/3.12\/Python", "name" : "Python", "CFBundleVersion" : "3.12.3" }, { "source" : "P", "arch" : "x86_64", "base" : 4506902528, "size" : 2310144, "uuid" : "710a745a-5cd4-373e-a978-3b588bd1bfc2", "path" : "\/Applications\/kitty.app\/Contents\/Resources\/Python\/lib\/kitty-extensions\/kitty.fast_data_types.so", "name" : "kitty.fast_data_types.so" }, { "source" : "P", "arch" : "x86_64", "base" : 4464848896, "CFBundleShortVersionString" : "0.35.2", "CFBundleIdentifier" : "net.kovidgoyal.kitty", "size" : 114688, "uuid" : "2bf099ca-9fd8-3f99-bbbc-46146c77f426", "path" : "\/Applications\/kitty.app\/Contents\/MacOS\/kitty", "name" : "kitty", "CFBundleVersion" : "0.35.2" }, { "source" : "P", "arch" : "x86_64", "base" : 4727103488, "size" : 442368, "uuid" : "771e1916-3a62-34cd-8488-c1021053c7fa", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "source" : "P", "arch" : "x86_64", "base" : 140703178096640, "size" : 49152, "uuid" : "e097f78f-fcfb-30f3-9164-dbc9709ba134", "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib", "name" : "libsystem_pthread.dylib" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 140703174836224, "size" : 19331678208, "uuid" : "172bd7f4-7e24-3286-a975-45e4e44c23c1" }, "vmSummary" : "ReadOnly portion of Libraries: Total=844.2M resident=0K(0%) swapped_out_or_unallocated=844.2M(100%)\nWritable regions: Total=8.6G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8.6G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nColorSync 72K 4 \nKernel Alloc Once 8K 1 \nMALLOC 457.4M 36 \nMALLOC guard page 16K 4 \nMALLOC_LARGE (reserved) 7.8G 3 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.0M 2 \nStack 8712K 2 \nVM_ALLOCATE 9240K 12 \n__DATA 22.5M 271 \n__DATA_CONST 11.1M 154 \n__DATA_DIRTY 489K 88 \n__FONT_DATA 4K 1 \n__LINKEDIT 648.4M 28 \n__OBJC_RO 82.9M 1 \n__OBJC_RW 3200K 2 \n__TEXT 195.8M 286 \n__UNICODE 592K 1 \ndyld private memory 1024K 1 \nmapped file 45.8M 5 \nshared memory 44K 4 \n=========== ======= ======= \nTOTAL 9.6G 908 \nTOTAL, minus reserved VM space 1.5G 908 \n", "legacyInfo" : { "threadTriggered" : { "queue" : "com.apple.main-thread" } }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "607844aa04477260f58a8077", "factorPackIds" : { "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a" }, "deploymentId" : 240000066 }, { "rolloutId" : "60f8ddccefea4203d95cbeef", "factorPackIds" : { }, "deploymentId" : 240000025 } ], "experiments" : [ { "treatmentId" : "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597", "experimentId" : "6639bc6ba73d460582162323", "deploymentId" : 400000006 } ] } } ```

Doesnt repro for me on macOS, however, I can only get the Monaspace Var fonts to show up not the non variable ones.

Likewise, only var fonts show up.

Are you using up to date monaspace fonts and where exactly did you get them from?

Yes V1.101. Followed install instructions as specified at monaspace's README.md

$ git clone https://github.com/githubnext/monaspace.git
$ cd monaspace
$ ./util/install_macos.sh
kovidgoyal commented 2 days ago

Hmm, that backtrace has no kitty code in it. Could indicate memory corruption. Can you build kitty with sanitizers as described here: https://sw.kovidgoyal.net/kitty/build/#building-in-debug-mode

might give a more useful backtrace.

Also does the crash happen if you run

kitty --config=NONE kitten choose-fonts

and try to select the monaspace fonts.