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

Resizing window text affected by font size #8287

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

Resizing window text affected by font size #8287

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

Comments

@mfontanini
Copy link

Describe the bug
Trying the code in #8226 if I print size in the middle of the screen using s=3 and then resize the window, the text that shows up when you resize kitty that says "N x M cells" is affected by this font size, presumably because it shows up in the middle of the window. This is not a huge issue but it looks very odd; presumably if you use sub 1 cell text it would show up tiny although I haven't tested this.

To Reproduce
Steps to reproduce the behavior:

  1. Go the middle (vertically and horizontally) of the screen; otherwise simply print a bunch of text such that the center contains non font size 1 text.
  2. Print text with large font size.
  3. Resize window
  4. See the label as you resize being larger than it should.

Screenshots

Note the text being large. Also note the characters don't really seem properly aligned, it's like they're aligned to top?

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
kitty --config NONE reproduces too.

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

Hmm, doesn't repro for me, the position of the text is irrelevant as the
resizing cells message is rendered completely separately and overlaid. I
think this is related to your other issue where somehow the scaled font
size is getting "stuck". I believe once that is fixed this will be fixed
as well. Closing for now, will revisit if the fix for the other issue
doesn't fix this one as well.

@kovidgoyal
Copy link
Owner

Have pushed a fix for #8286 am pretty sure it fixes this as well, but do please let me know if I am wrong.

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