Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

character decorations such as bar/hat not showing #6898

Closed
daviehh opened this issue Dec 10, 2023 · 5 comments
Closed

character decorations such as bar/hat not showing #6898

daviehh opened this issue Dec 10, 2023 · 5 comments
Labels

Comments

@daviehh
Copy link

daviehh commented Dec 10, 2023

Describe the bug
With some programming languages, it is common to see unicode characters such as characters with bar or hats, e.g. in julia

θ̂ = 1; θ̄ = 2; θ̂ - θ̄

To Reproduce
Steps to reproduce the behavior:

  1. copy/paste the code above
  2. (or, if you have julia repl, type in \theta tab \hat tab
  3. hat/over bar not showing

Screenshots
See screenshot, both iterm(right) and kitty(left) configured to use FiraCode Nerd Font Mono

Screenshot 2023-12-10 at 12 33 56 AM

Environment details

kitty 0.31.0 (b247fda672) created by Kovid Goyal
Darwin david-MacbookPro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64
ProductName:		macOS ProductVersion:		14.1.2 BuildVersion:		23B92
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /opt/homebrew/bin/zsh
Loaded config files:
  /Users/david/.config/kitty/kitty.conf

Config options different from defaults:
bold_font                  FiraCode Nerd Font Mono
bold_italic_font           FiraCode Nerd Font Mono
copy_on_select             clipboard
cursor_blink_interval      0.9
cursor_shape               2
cursor_stop_blinking_after 0
font_family                FiraCode Nerd Font Mono
font_size                  12.0
italic_font                FiraCode Nerd Font Mono
tab_bar_edge               1
tab_bar_style              powerline
tab_powerline_style        round
Colors:
	active_border_color        #b7bdf8   
	active_tab_background      #c6a0f6   
	active_tab_foreground      #181926   
	background                 #24273a   
	bell_border_color          #eed49f   
	color0                     #494d64   
	color1                     #ed8796   
	color10                    #a6da95   
	color11                    #eed49f   
	color12                    #8aadf4   
	color13                    #f5bde6   
	color14                    #8bd5ca   
	color15                    #a5adcb   
	color2                     #a6da95   
	color3                     #eed49f   
	color4                     #8aadf4   
	color5                     #f5bde6   
	color6                     #8bd5ca   
	color7                     #b8c0e0   
	color8                     #5b6078   
	color9                     #ed8796   
	cursor                     #f4dbd6   
	cursor_text_color          #24273a   
	foreground                 #cad3f5   
	inactive_border_color      #6e738d   
	inactive_tab_background    #1e2030   
	inactive_tab_foreground    #cad3f5   
	mark1_background           #b7bdf8   
	mark1_foreground           #24273a   
	mark2_background           #c6a0f6   
	mark2_foreground           #24273a   
	mark3_background           #7dc4e4   
	mark3_foreground           #24273a   
	selection_background       #f4dbd6   
	selection_foreground       #24273a   
	tab_bar_background         #181926   
	url_color                  #f4dbd6   

Important environment variables seen by the kitty process:
	PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
	LANG                                en_US.UTF-8
	SHELL                               /opt/homebrew/bin/zsh
	USER                                david

Thanks!

@daviehh daviehh added the bug label Dec 10, 2023
@kovidgoyal
Copy link
Owner

this is something specific to macOS for whatever reason CoreText doesn't
seem to want to draw these specific combining chars as best as I can
tell. They render fine on my Linux system. Not sure what to do to
convince it to draw them. I will investigate in more depth when I have
some time.

@kovidgoyal
Copy link
Owner

Yeah we can see that its the combination of the theta and the combinging char. Probably because of the font the theta comes from. â renders correctly, but θ̂ does not. Sigh, more of my life burnt on reverse engineering apple's nonsense.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 10, 2023

minimal reproducer:

kitty --hold --debug-font-fallback --config NONE kitty +runpy 'print("\u03b8\u0302 a\u0302")'

@kovidgoyal
Copy link
Owner

Issue seems to be with advances not being reset for glyphs to be rendered as a combined group. Even more minimal reproducer:

kitty --hold --config NONE kitty +runpy print("Q\u0302")

@daviehh
Copy link
Author

daviehh commented Dec 10, 2023

thanks for the quick update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants