Giter Club home page Giter Club logo

Comments (24)

kovidgoyal avatar kovidgoyal commented on July 22, 2024 6

Yes, it's correct, but there is no need, I have pushed the correct fix, see my latest commit.
4878b7c

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024 1

yes you can, and symbol_map is disjoint in your case anyway, which means it will only use menlo for that codepoint. And no I cant reproduce it. I should note my mac is 14.4 Sonoma.

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

I need to know which characters there are as in their unicode code points. Which you can get by pressing ga in vim with the cursor over the character. Once you know which character run

kitty --debug-font-fallback zsh -c 'printf "\uABCD"; read'

replace ABCD above with the hex code for the character and post the output.

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024
kitty --debug-font-fallback zsh -c 'printf "\u279c"; read'                                                        ─╯
[082 16:05:09.109146] Symbol map: U+26FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A2,U+E0A3,U+E0B0-U+E0B3,U+E0B4-U+E0C8,U+E0CA,U+E0CC-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6B1,U+E600-U+E6C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F373,U+F400-U+F532,U+F0001-U+F1AF0 Symbols Nerd Font Mono is invalid, ignoring
[082 16:05:09.489706] Preloaded font faces:
[082 16:05:09.489752] normal face: /Users/lucky/Library/Fonts/Hack-Regular.ttf
[082 16:05:09.489763] bold face: /Users/lucky/Library/Fonts/Hack-Bold.ttf
[082 16:05:09.489772] italic face: /Users/lucky/Library/Fonts/Hack-Italic.ttf
[082 16:05:09.489780] bi face: /Users/lucky/Library/Fonts/Hack-BoldItalic.ttf

My Font Configuration:

font_family      Hack
italic_font      auto
bold_font        auto
bold_italic_font auto

font_size 13
disable_ligatures never

symbol_map U+26FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A2,U+E0A3,U+E0B0-U+E0B3,U+E0B4-U+E0C8,U+E0CA,U+E0CC-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6B1,U+E600-U+E6C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F373,U+F400-U+F532,U+F0001-U+F1AF0 Symbols Nerd Font Mono

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

To be clear is it not rendering with the above? Because it renders fine for me. With default configuration. Which font exactly is hack? And if it is not rendering, does it render without using Hack?

from kitty.

medicm avatar medicm commented on July 22, 2024

Yes, I have also noticed when upgrading from 0.33.0 to 0.33.1 that Symbols Nerd Font starts rendering as blocks.

0.33.0 output

✦ 09:11:54.715 +0100 ❯ kitty --debug-font-fallback zsh -c 'printf "\u❯✦"; read'
[082 09:12:26.045762] Ignoring unknown config key: share_connections
[082 09:12:26.045782] Ignoring unknown config key: askpass
[082 09:12:26.297254] Preloaded font faces:
[082 09:12:26.297272] normal face: /Users/marko/Library/Fonts/SFMono Regular Nerd Font Complete.otf
[082 09:12:26.297277] bold face: /Users/marko/Library/Fonts/SFMono Semibold Nerd Font Complete.otf
[082 09:12:26.297282] italic face: /Users/marko/Library/Fonts/SFMono Regular Italic Nerd Font Complete.otf
[082 09:12:26.297286] bi face: /Users/marko/Library/Fonts/SFMono Semibold Italic Nerd Font Complete.otf
[082 09:12:26.297294] Symbol map faces:
[082 09:12:26.297299] /Users/marko/Library/Fonts/SymbolsNerdFontMono-Regular.ttf
U+276f Face(family=Zapf Dingbats, full_name=Zapf Dingbats, postscript_name=ZapfDingbatsITC, path=/System/Library/Fonts/ZapfDingbats.ttf, units_per_em=2048, ascent=10.6, descent=2.3, leading=0.0, scaled_point_sz=13.0, underline_position=-1.3 underline_thickness=0.8) (new face)
U+2726 0 (new face)

CleanShot 2024-03-22 at 09 19 18

0.33.1 output

✦ 09:15:41.595 +0100 ❯ kitty --debug-font-fallback zsh -c 'printf "\u❯✦"; read'
[082 09:15:50.627165] Ignoring unknown config key: share_connections
[082 09:15:50.627186] Ignoring unknown config key: askpass
[082 09:15:50.876766] Preloaded font faces:
[082 09:15:50.876783] normal face: /Users/marko/Library/Fonts/SFMono Regular Nerd Font Complete.otf
[082 09:15:50.876788] bold face: /Users/marko/Library/Fonts/SFMono Semibold Nerd Font Complete.otf
[082 09:15:50.876794] italic face: /Users/marko/Library/Fonts/SFMono Regular Italic Nerd Font Complete.otf
[082 09:15:50.876798] bi face: /Users/marko/Library/Fonts/SFMono Semibold Italic Nerd Font Complete.otf
[082 09:15:50.876805] Symbol map faces:
[082 09:15:50.876810] /Users/marko/Library/Fonts/SymbolsNerdFontMono-Regular.ttf
U+276f 
The font chosen by the OS for the text: U+276f is  but it does not actually contain glyphs for that text
U+2726 
The font chosen by the OS for the text: U+2726 is  but it does not actually contain glyphs for that text
ValueError: character U+656e6f4e is not in range [U+0000; U+10ffff]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "lib/python3.11/kitty/boss.py", line 1156, in on_window_resize
SystemError: <method 'get' of 'dict' objects> returned a result with an exception set

CleanShot 2024-03-22 at 09 17 36

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

To be clear is it not rendering with the above?

I don't think it's unrenderable, because it's not a problem in kitty's version 0.33.
image

Which font exactly is hack

The Hack font is a little old, but it's always worked well before.

does it render without using Hack

I've tried other fonts, but the problem is still not solved.

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

I think the issue is caused by the Zapf Dingbats font. Try removing it from your system temporarily to confirm.

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

This is the result of running in v0.33

kitty --debug-font-fallback zsh -c 'printf "\u279c"; read'                                                                                    ─╯
[082 16:26:22.009140] Preloaded font faces:
[082 16:26:22.009187] normal face: /Users/lucky/Library/Fonts/Hack-Regular.ttf
[082 16:26:22.009198] bold face: /Users/lucky/Library/Fonts/Hack-Bold.ttf
[082 16:26:22.009206] italic face: /Users/lucky/Library/Fonts/Hack-Italic.ttf
[082 16:26:22.009215] bi face: /Users/lucky/Library/Fonts/Hack-BoldItalic.ttf
[082 16:26:22.009224] Symbol map faces:
[082 16:26:22.009232] /Users/lucky/Library/Fonts/SymbolsNerdFontMono-Regular.ttf

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

The changes in 0.33.1 to try to get coretext to return fallback fonts matching the bold/italic attributes are for some reason causing it to return Zapf Dingbats on your systems. Which doesn't actually contain those codepoints.

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

It's a system font that can't seem to be removed.
I'm worried that forcing it to be removed will have an effect on other programs.
image

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

its a font, it cant cause any problem beyond some charactes not
rendering. Do something like

sudo mv /System/Library/Fonts/ZapfDingbats.ttf /tmp

run the test

and move it back.

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

its a font, it cant cause any problem beyond some charactes not rendering. Do something like

sudo mv /System/Library/Fonts/ZapfDingbats.ttf /tmp

run the test

and move it back.

This operation seems to be interfered by the System Integrity Protection, unless I disable the SIP and reboot.
image
I can try. I'll have to get back to you.

from kitty.

medicm avatar medicm commented on July 22, 2024

I can try. I'll have to get back to you.

https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection

I currently haven't the time, but you have to disable system integrity checks to do that

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

@medicm @kovidgoyal
I've turned off SIP, but I still can't remove the font.
image

The changes in 0.33.1 to try to get coretext to return fallback fonts matching the bold/italic attributes are for some reason causing it to return Zapf Dingbats on your systems. Which doesn't actually contain those codepoints.

Would such a matching rule bypass the symbol_map configuration?

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

No, it doesnt. symbol_map has highest priority. hack does not contain U+2726. On my system COreText returns Menlo as the fallback for it. Dont know why its returning Zapf Dingbats on yours. In any case a temporary fix you can use symbol_map to map U+2726 to Menlo

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

It seems we've had a misunderstanding. You replied to @medicm .

About my character problem I tried to configure U+279C with symbol_map, but it still doesn't match
image

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

U+279c not in NERD fonts. You want to symbol_map it to Menlo. And note that the fix in the commit is speculative as I cant reproduce the issue, so YMMV.

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

And interestingly, all three of ❯✦➜ are present in zapf dingbats as well in my system. So I really have no clue whats going on.

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

U+279c not in NERD fonts. You want to symbol_map it to Menlo. And note that the fix in the commit is speculative as I cant reproduce the issue, so YMMV.

Can symbol_map be configured with multiple fonts?
In my case, I want to configure the nerd font as the first choice, and then match the Menlo, I do not know how to config

And interestingly, all three of ❯✦➜ are present in zapf dingbats as well in my system. So I really have no clue whats going on.

I don't know why, but it's a good start if you can reproduce it 😄

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

yes you can, and symbol_map is disjoint in your case anyway, which means it will only use menlo for that codepoint. And no I cant reproduce it. I should note my mac is 14.4 Sonoma.

I have the same version of the OS.


Am I configuring this correctly? It seems to be working. I just wanted to make sure.

symbol_map  codepoints  Symbols Nerd Font Mono
symbol_map  codepoints  Menlo

Can you tell me how to determine what fonts the codepoints are in, so I can deal with a similar problem myself next time?
Sorry. I'm a bit of a babbler.

from kitty.

infogrind avatar infogrind commented on July 22, 2024

This is great, thank you Kovid!

from kitty.

0x7a7a avatar 0x7a7a commented on July 22, 2024

Yes, it's correct, but there is no need, I have pushed the correct fix, see my latest commit. 4878b7c

Thank you very much for your quick response, I really like kitty

from kitty.

gwenwindflower avatar gwenwindflower commented on July 22, 2024

thank you for this thread! been going batty trying to figure this out! much appreciated. just downloaded the nightly build and can confirm, same issue is fixed. thank you. 💗🙏🏻

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.