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

Scaling font size without altering window dimensions #25

Open
msiism opened this issue Dec 5, 2020 · 17 comments
Open

Scaling font size without altering window dimensions #25

msiism opened this issue Dec 5, 2020 · 17 comments

Comments

@msiism
Copy link
Contributor

msiism commented Dec 5, 2020

Could you also provide a way to scale the font size without altering the window
dimensions at the same time? I'd find that quite useful.

@simmel
Copy link
Owner

simmel commented Dec 8, 2020

Hm, I've definitely experienced that! But I can't reproduce it here in OS X.

What OS/dist do you use?

What output does urxvt --help 2>&1 | head give you?

@msiism
Copy link
Contributor Author

msiism commented Dec 8, 2020

Well, this was meant as a feature request, not a bug report, just to be clear.

I think we've had an e-mail discussion about this a while back.

Anyway, I use the Devuan and Void Linux distributions, and here's the requested output on my Devuan machine:

$ urxvt --help 2>&1 | head
rxvt-unicode (urxvt) v9.22 - released: 2016-01-23
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
Usage: urxvt [options] [-e command args]

where resources (long-options) include:
  termName:                       string
  geometry:                       geometry
  chdir:                          string
  reverseVideo:                   boolean
  loginShell:                     boolean

@simmel
Copy link
Owner

simmel commented Dec 8, 2020 via email

@simmel
Copy link
Owner

simmel commented Dec 9, 2020

I tried it on OpenBSD as well and got the same result: the window stays the
same size when the font is being resized.

I have no idea what to try next. Ideas?

@scourii
Copy link

scourii commented Jan 29, 2021

I have the same exact issue, I am using OpenSuse Tumbleweed, and the window size increases or decreases alongside the font.
This doesn't happen when the terminal is fullscreen, but when its not fullscreen, the window does change.

urxvt --help 2>&1 | head
rxvt-unicode (urxvt) v9.22 - released: 2016-01-23
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm

where resources (long-options) include:
  termName:                      string
  geometry:                      geometry
  chdir:                         string
  reverseVideo:                  boolean
  loginShell:                    boolean

@simmel
Copy link
Owner

simmel commented Feb 3, 2021

Can you both paste your .Xresources here?

@scourii
Copy link

scourii commented Feb 6, 2021 via email

@simmel
Copy link
Owner

simmel commented Feb 6, 2021

No problem!

I don’t think GitHub can handle attachments though so you’re gonna have to paste it here. 🤷‍♂️

@scourii
Copy link

scourii commented Feb 6, 2021

URxvt.boldFont:xft: JetBrains Mono Light:bold:size=12.5
URxvt.italicFont:xft: JetBrains Mono Light:italic:size=12.5
URxvt.boldItalicfont: JetBrains Mono Light Italic:bold:size=12.5
URxvt.geometry: 88x25
URxvt.internalBorder:             20
URxvt.cursorBlink:                true
URxvt.cursorUnderline:            true
URxvt.saveline:                   32768
URxvt.scrollBar:                  false
URxvt.scrollBar_right:            true
URxvt.scrollBar_floating:         false
URxvt.scrollstyle:                plain
URxvt.urgentOnBell:               false
URxvt.depth:                      24
URxvt.iso14755:                   false
URxvt.letterSpace: -1

! Keybinds
URxvt.perl-ext-common: default, resize-font

URxvt.resize-font.step: 1
URxvt.keysym.Control-minus:       resize-font:smaller
URxvt.keysym.Control-plus:        resize-font:bigger
URxvt.keysym.Control-equal:       resize-font:reset
URxvt.keysym.Control-question:    resize-font:show
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
URxvt.keysym.Control-Meta-c: builtin-string:
URxvt.keysym.Control-Meta-v: builtin-string:
URxvt.keysym.Control-w: exit\n


My bad, haha

@simmel
Copy link
Owner

simmel commented Mar 2, 2021

I found out why I and others don't have this problem (anymore), the tabbed plugin some how keeps the window size.

urxvt.perl-ext-common: default,tabbed,resize-font

will make the window not resize.

I'll look into the code behind tabbed to see why it doesn't resize later.

@teleshoes
Copy link

bump. i would LOOOOVE to have this work. i hate when rxvt resizes my X window.

@crpb
Copy link

crpb commented Oct 18, 2021

for anyone who only needs font-resizing and no _window_resizing.
Here is a patch for main.C

@owl4ce
Copy link

owl4ce commented Jan 15, 2022

@simmel
Copy link
Owner

simmel commented Jan 17, 2022

Mkay, it has something to do with PResizeInc then. ty @owl4ce

@teleshoes
Copy link

is this patch something that will be upstream eventually?

@bertbesser
Copy link

bertbesser commented Oct 25, 2023

let me bump this and chime in

the tabbed extension did not work fully for me: decreasing the font size on the fly makes the usable portion of the window smaller: the scrollbar moves and shrinks away from the window edge
image

=> fixing this would be highly appreciated 🙂

cheers.

@MegaManSec
Copy link

MegaManSec commented Jun 14, 2024

I've forked urxvt-resize-font and added a pure Perl fix for the scaling without resizing the window dimensions problem: https://github.com/MegaManSec/urxvt-resize-font

The commit adding that functionality: MegaManSec@e39c994

It works for me (TM).

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

No branches or pull requests

8 participants