Giter Club home page Giter Club logo

Comments (36)

kovidgoyal avatar kovidgoyal commented on August 15, 2024 2

And browsing the "Fixed width" collection in Apple's own Font Book does not show Cartograph. So you should report the issue to the font's developers.

And on Linux, fontconfig thinks all the faces have the same weight.

fc-list : postscriptname weight | grep -i carto                                                                                 master 
:weight=80:postscriptname=CartographCF-Regular
:weight=80:postscriptname=CartographCF-LightItalic
:weight=80:postscriptname=CartographCF-RegularItalic
:weight=80:postscriptname=CartographCF-DemiBoldItalic
:weight=80:postscriptname=CartographCF-Light
:weight=80:postscriptname=CartographCF-ExtraLight
:weight=80:postscriptname=CartographCF-ThinItalic
:weight=80:postscriptname=CartographCF-ExtraLightItalic
:weight=80:postscriptname=CartographCF-DemiBold
:weight=80:postscriptname=CartographCF-BoldItalic
:weight=80:postscriptname=CartographCF-Bold
:weight=80:postscriptname=CartographCF-HeavyItalic
:weight=80:postscriptname=CartographCF-Heavy
:weight=80:postscriptname=CartographCF-ExtraBoldItalic
:weight=80:postscriptname=CartographCF-Thin
:weight=80:postscriptname=CartographCF-ExtraBold

This is an extremely buggy font.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024 1

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024 1

No it will not. Your font needs to have an italic face that is metric compatible with the regular face for that, it has no connection with font selection/features/variability.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024 1

Strange dont see how that style could be empty, but anyway, this should fix the panic: 573058d

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

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

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

I have an issue building on Arch Linux

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

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

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

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

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

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

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.

from kitty.

JorgeVV avatar JorgeVV commented on August 15, 2024

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

$ kitten choose-fonts
Error: signal: segmentation fault

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

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.

from kitty.

JorgeVV avatar JorgeVV commented on August 15, 2024

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.

from kitty.

trygveaa avatar trygveaa commented on August 15, 2024

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 1900480.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

from kitty.

trygveaa avatar trygveaa commented on August 15, 2024

a8daf06

Thanks, works now.

from kitty.

JorgeVV avatar JorgeVV commented on August 15, 2024

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  [email protected]...
 [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 (*) <e097f78f-fcfb-30f3-9164-dbc9709ba134> /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

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

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.

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

Can I suggest you add a default keybinding? I have
map ctrl+shift+f7 launch --type tab kitten choose-font

Also, the text on the final screen says Enter to modify kitty.conf and use the new fonts, but pressing Enter only saves the config and does not actually load the new config as the text implies. I have to refresh the config with a load_config_file keybind manually.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

Arch Linux.

Removing my existing config and then running kitty doesn't make any difference.

The themes kitten doesn't reload automatically for me either.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

Odd, works fine on Arch for me, indeed Arch is my main box and the
feature was developed on it. Is the KITTY_PID env var set for you inside
kitty? Are your kitty processes named kitty? Those are pretty much the
only things that can influence the code as far as I know. See the
ReloadConfigInKitty() function tools/config/api.go it's a pretty simple
implementation, just send SIGUSR1 to the kitty process. Maybe add some
prints to see why it's failing for you.

Also check that stdout/stderr of the kitty process (by running it from a
terminal) and see if anything is printed there in case the actual
reloading of the config is failing.

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

Ok. I've figured it out. If I launch kitty via a symbolic link to the kitty binary then auto reload does not work. If I call the binary directly it works as expected.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

Your symbolic link is not named kitty?

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

No, in this case it was called kitty-git.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

This should fix it: da9a36d

from kitty.

neurocyte avatar neurocyte commented on August 15, 2024

Yep, that fixed it.

from kitty.

pithecantrope avatar pithecantrope commented on August 15, 2024

Will this fix italic font rendering issue that I'm currently facing?
0xProto:
Screenshot from 2024-07-06 11-55-20
Iosevka:
Screenshot from 2024-07-06 12-35-20
kitty.conf is simply:
Screenshot from 2024-07-06 12-36-31

from kitty.

mikelerch avatar mikelerch commented on August 15, 2024

The issue described in #7647 seems to be resolved when using the nightly build, which is great.

However, I ran into another problem, which is that a font that previously worked, doesn't seem to show up when running kitten choose-fonts.

I was able to see it before when running kitten +list-fonts.

The font in question is Cartograph CF, which is supposed to be a monospaced font. (Font has not been patched or modified in any way)

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

Did it show up in kitty list-fonts with previous kitty releases? And what OS is this?

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

If its a publicly available font attach it here otherwise email it to me (my email address is at the top of most kitty source code files) and I will take a look.

from kitty.

mikelerch avatar mikelerch commented on August 15, 2024

Did it show up in kitty list-fonts with previous kitty releases? And what OS is this?

I'm on Mac.

I double checked again, and I might not have remembered correctly. It did not show up with kitty list-fonts, however I'm sure I used it not too long ago. It is supposed to be monospaced, so I would assume it's supported? https://connary.com/cartograph.html

I sent you a e-mail with the font files.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

Your font shows up on Linux but not on macOS. That is because CoreText (Apple's font framework) does not think the font is monospaced. More precisely the font traits for this font returned from CoreText dont have the kCTFontTraitMonoSpace trait. Relevant code starting from line 261 in core_text.m I dont see any issues with that code.

from kitty.

dumb-kermit avatar dumb-kermit commented on August 15, 2024
^[_Gi=1;OK^[\
Panicked with error: runtime error: slice bounds out of range [2:1]
Stacktrace (most recent call first):
kitty/tools/tui/loop.(*Loop).style_region
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/api.go:226
kitty/tools/tui/loop.(*Loop).StyleRegion
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/api.go:235
kitty/tools/tui.(*MouseState).ApplyHoverStyles
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/mouse.go:295
kitty/kittens/choose_fonts.(*handler).draw_screen.func1
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/kittens/choose_fonts/ui.go:154
kitty/kittens/choose_fonts.(*handler).draw_screen
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/kittens/choose_fonts/ui.go:164
kitty/kittens/choose_fonts.(*handler).on_mouse_event
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/kittens/choose_fonts/ui.go:191
kitty/tools/tui/loop.(*Loop).handle_mouse_event
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/run.go:144
kitty/tools/tui/loop.(*Loop).handle_csi
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/run.go:123
kitty/tools/wcswidth.(*EscapeCodeParser).dispatch_esc_code
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/wcswidth/escape-code-parser.go:153
kitty/tools/wcswidth.(*EscapeCodeParser).dispatch_byte
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/wcswidth/escape-code-parser.go:291
kitty/tools/wcswidth.(*EscapeCodeParser).ParseByte
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/wcswidth/escape-code-parser.go:95
kitty/tools/wcswidth.(*EscapeCodeParser).Parse
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/wcswidth/escape-code-parser.go:106
kitty/tools/tui/loop.(*Loop).dispatch_input_data
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/read.go:25
kitty/tools/tui/loop.(*Loop).run
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/run.go:548
kitty/tools/tui/loop.(*Loop).Run
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/tui/loop/api.go:314
kitty/kittens/choose_fonts.main
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/kittens/choose_fonts/main.go:54
kitty/kittens/choose_fonts.EntryPoint.func1
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/kittens/choose_fonts/main.go:83
kitty/tools/cli.(*Command).ExecArgs
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/cli/command.go:546
kitty/tools/cli.(*Command).Exec
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/cli/command.go:564
main.main
	/private/var/folders/wj/cqy1nsyn4wn94d96btkldt0r0000gn/C/t/plugins-95tch4we/src/tools/cmd/main.go:34
runtime.main
	/usr/local/go/src/runtime/proc.go:271
Press any key to exit.
Error: Panicked: runtime error: slice bounds out of range [2:1]

Can't click on about any font weight regardless if it is VF or not, crashes instantly. MacOS (15b M2 Pro)

from kitty.

dumb-kermit avatar dumb-kermit commented on August 15, 2024

Strange dont see how that style could be empty, but anyway, this should fix the panic: 573058d

Fixed, thank you, you rock <3

from kitty.

adriandelgg avatar adriandelgg commented on August 15, 2024

When I try to use Monaspice Nerd Font I'm unable to find it when I select the fonts. Does this fix that? They are .otf fonts.

from kitty.

kovidgoyal avatar kovidgoyal commented on August 15, 2024

Whether a font is monospace or not is decided by the OS, if the OS thought Monaspace is not monospaced then it still wont think so and you still wont be able to select it.

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.