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

Displaying text in larger size causes certain characters to always have larger size #8286

Closed
mfontanini opened this issue Feb 5, 2025 · 5 comments
Labels

Comments

@mfontanini
Copy link

Describe the bug
I'm introducing #8226 to presenterm using the latest nightly and I can't say exactly what is it that causes this but I can consistently reproduce this: after printing some text using s=3 I end up getting certain characters always showing up with a larger font size

To Reproduce
I can't say exactly. I'm not doing anything crazy, namely, enter alternate screen, clear screen, using synchronized updates, printing some text with a larger size, some without, using colors + s=3, etc. I tried to simply do some printfs printing text using s=N and colors but it doesn't reproduce the issue.

You can see the WIP code I have for this here https://github.com/mfontanini/presenterm/compare/feat/font-size?expand=1. This part is where the string to be printed is created.

Screenshots

See in this screenshot how certain characters are now always shown in a larger font.

Image

Environment details

kitty 0.39.1 (ea5db4ec09) created by Kovid Goyal
Linux fontarebook 6.8.0-52-generic #53-Ubuntu SMP PREEMPT_DYNAMIC Sat Jan 11 00:06:25 UTC 2025 x86_64
Linux Mint 22.1 Xia fontarebook /dev/tty

DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=22.1
DISTRIB_CODENAME=xia
DISTRIB_DESCRIPTION="Linux Mint 22.1 Xia"
Running under: X11
OpenGL: '3.1.0 NVIDIA 550.120' Detected version: 3.1
Frozen: True
Fonts:
  medium: DejaVuSansMNFM: /home/matias/.fonts/DejaVuSansMono/DejaVuSansMNerdFontMono-Regular.ttf:0
          Features: ()
    bold: DejaVuSansMNFM-Bold: /home/matias/.fonts/DejaVuSansMono/DejaVuSansMNerdFontMono-Bold.ttf:0
          Features: ()
  italic: DejaVuSansMNFM-Oblique: /home/matias/.fonts/DejaVuSansMono/DejaVuSansMNerdFontMono-Oblique.ttf:0
          Features: ()
      bi: DejaVuSansMNFM-ObliqueBold: /home/matias/.fonts/DejaVuSansMono/DejaVuSansMNerdFontMono-BoldOblique.ttf:0
          Features: ()
Paths:
  kitty: /home/matias/.local/kitty.app/bin/kitty
  base dir: /home/matias/.local/kitty.app/lib/kitty
  extensions dir: /home/matias/.local/kitty.app/lib/kitty-extensions
  system shell: /usr/bin/fish
System color scheme: no_preference. Applied color theme type: none
Loaded config files:
  /home/matias/.config/kitty/kitty.conf

Config options different from defaults:
click_interval            0.5
cursor_blink_interval     (0.5, kitty.options.utils.EasingFunction(), kitty.options.utils.EasingFunction())
editor                    lvim
enable_audio_bell         False
font_family               DejaVuSansM Nerd Font Mono
font_size                 12.0
initial_window_height     (1800, 'px')
initial_window_width      (3200, 'px')
mouse_hide_wait           0.0
remember_window_size      False
scrollback_lines          10000
scrollback_pager          ['less', '+G', '-R']
select_by_word_characters :@-./_~?&=%+#
shell_integration         frozenset({'no-cursor'})
tab_bar_style             slant
tab_title_max_length      40
update_check_interval     0.0
window_border_width       (0, 'pt')
Added mouse actions:
	ctrl+left click ungrabbed →  mouse_click_url
Removed mouse actions:
	left click ungrabbed →  mouse_handle_click selection link prompt
Added shortcuts:
	alt+h →  previous_tab
	alt+j →  scroll_page_down
	alt+k →  scroll_page_up
	alt+l →  next_tab
	ctrl+- →  decrease_font_size
	ctrl+= →  increase_font_size
	ctrl+page_down →  next_tab
	ctrl+page_up →  previous_tab
	shift+page_down →  scroll_page_down
	shift+page_up →  scroll_page_up
Changed shortcuts:
	kitty_mod+backspace →  restore_font_size
	kitty_mod+page_down →  move_tab_forward
	kitty_mod+page_up →  move_tab_backward
	kitty_mod+t →  launch --cwd last_reported --type tab
Colors:
	active_border_color       #ffffff   
	active_tab_background     #7aa2f7   
	active_tab_foreground     #1f2335   
	background                #24283b   
	color0                    #1d202f   
	color1                    #f7768e   
	color10                   #9ece6a   
	color11                   #e0af68   
	color12                   #7aa2f7   
	color13                   #bb9af7   
	color14                   #7dcfff   
	color15                   #c0caf5   
	color16                   #ff9e64   
	color17                   #db4b4b   
	color2                    #9ece6a   
	color3                    #e0af68   
	color4                    #7aa2f7   
	color5                    #bb9af7   
	color6                    #7dcfff   
	color7                    #a9b1d6   
	color8                    #414868   
	color9                    #f7768e   
	cursor                    #c0caf5   
	foreground                #c0caf5   
	inactive_tab_background   #292e42   
	inactive_tab_foreground   #545c7e   
	selection_background      #364a82   
	selection_foreground      #c0caf5   
	url_color                 #73daca   

Important environment variables seen by the kitty process:
	PATH                                <redacted>
	LANG                                en_US.UTF-8
	EDITOR                              nvim
	SHELL                               /usr/bin/fish
	DISPLAY                             :0.0
	USER                                matias
	XDG_GREETER_DATA_DIR                /var/lib/lightdm-data/matias
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_SESSION_DESKTOP                 mate
	XDG_DATA_DIRS                       <redacted>
	XDG_CURRENT_DESKTOP                 MATE
	XDG_SESSION_ID                      c2
	XDG_VTNR                            7
	XDG_SEAT                            seat0
	XDG_SESSION_TYPE                    x11
	XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session0
	XDG_CONFIG_DIRS                     /etc/xdg/xdg-mate:/etc/xdg
	XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
	XDG_SESSION_CLASS                   user

Additional context
I can reproduce this with kitty --config NONE.

@mfontanini mfontanini added the bug label Feb 5, 2025
@kovidgoyal
Copy link
Owner

Run kitty with --dump-bytes. Do the minimum needed to repro the issue and post the dump. I will ttry to reproduce with that.

@mfontanini
Copy link
Author

Do the minimum needed to repro the issue

Sure!

  1. Run
git clone https://github.com/mfontanini/presenterm
cd presenterm
git checkout feat/font-size
cargo run examples/demo.md
  1. Once it starts, press q.
  2. Type capital letters, they'll surely look almost all broken

@kovidgoyal
Copy link
Owner

OK, I can repro with that, I will take a look.

@kovidgoyal
Copy link
Owner

Yes, the issue is caused by using bold, this is a bug in kitty.

@kovidgoyal
Copy link
Owner

Minimal reproducer

kitty sh -c 'printf "\e[1m\e]66;s=2;ABCD\a\e[m\n\nABCDEF"; read'

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