Skip to content

Private Use Unicode characters not rendered on macOS with bold/italic set #6043

@antoineco

Description

@antoineco

Describe the bug

With Symbols Nerd Font Mono used as fallback font, characters in the Private Use Unicode range disappear or are rendered improperly when the italic or bold attributes are set.

For example:

  • The character U+E725 — which is used for nf-dev-git_branch — becomes invisible.
  • The character U+E0A0 — which is used for nf-pl-branch — turns into a different symbol.

I assume this is happening because the fallback font doesn't have a Bold or Italic variant installed, which might not even be true because things work fine with a Regular patched font (see additional comments).

To Reproduce

  1. Install Symbols Nerd Font Mono 2048-em, which kitty should automatically fall back to.

  2. Open (Neo)vim (defaults)

  3. Ensure the StatusLine highlight group has cterm=bold or cterm=italic.

  4. :set statusline=\ main
    :set statusline=\ main

Screenshots

default_status_hl
nf_merge
nf_branch

Below, there should be a U+E725 symbol between the two x, but not when the line is commented:
default_comment_italic

Environment details

Debug output
kitty 0.27.1 () created by Kovid Goyal
Darwin acotten-mbp13 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 arm64
ProductName:		macOS ProductVersion:		13.1 BuildVersion:		22C65
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: /bin/zsh
Loaded config files:
  /Users/acotten/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_font_style   (True, False)
disable_ligatures       1
font_family             Cascadia Code
font_size               15.0
initial_window_height   (32, 'cells')
initial_window_width    (140, 'cells')
remember_window_size    False
tab_bar_style           powerline
tab_powerline_style     slanted
Colors:
	active_border_color     #a7c080   
	active_tab_background   #2d353b   
	active_tab_foreground   #d3c6aa   
	background              #2d353b   
	bell_border_color       #e69875   
	color0                  #343f44   
	color1                  #e67e80   
	color10                 #a7c080   
	color11                 #dbbc7f   
	color12                 #7fbbb3   
	color13                 #d699b6   
	color14                 #83c092   
	color15                 #9da9a0   
	color2                  #a7c080   
	color3                  #dbbc7f   
	color4                  #7fbbb3   
	color5                  #d699b6   
	color6                  #83c092   
	color7                  #859289   
	color8                  #3d484d   
	color9                  #e67e80   
	cursor                  #d3c6aa   
	cursor_text_color       #343f44   
	foreground              #d3c6aa   
	inactive_border_color   #56635f   
	inactive_tab_background #3d484d   
	inactive_tab_foreground #9da9a0   
	mark1_background        #7fbbb3   
	mark1_foreground        #2d353b   
	mark2_background        #d3c6aa   
	mark2_foreground        #2d353b   
	mark3_background        #d699b6   
	mark3_foreground        #2d353b   
	selection_background    #543a48   
	selection_foreground    #9da9a0   
	tab_bar_background      #343f44   
	url_color               #7fbbb3   

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                               /bin/zsh
	USER                                acotten

Additional context

Can't reproduce with a patched Nerd Font, even if I only install the Regular style.

image

$ kitty +list-fonts
CaskaydiaCove Nerd Font Mono
    CaskaydiaCove Nerd Font Mono Regular

Symbols Nerd Font Mono
    Symbols Nerd Font Mono 2048-em
# kitty.conf
font_family CaskaydiaCove Nerd Font Mono
font_size   15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions