! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Increase/decrease font size for a single terminal tab
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce4-terminal
Component:
General

Comments

Description Ferdinand Vesely 2015-02-12 18:27:57 CET
Created attachment 5933 
Patch implementing shortcuts for increasing/decreasing the terminal font size

This enhancement is strongly related to bug 5605, but it's not based on the concept of a 'zoom factor',

I'm offering a simple patch to resize the font size in a _single_ terminal tab. It does not affect the preferences, although it does resize the window to keep the grid size. As a result the other tabs get more or less space which could be a problem for some. The shortcut is Ctrl+Shift+Up/Down which appears to be convenient for smaller laptop keyboards.

It seems that the VTE in GTK3 handles the font-scale property so this patch might become redundant soon. But in the meantime it could be helpful for people requesting such a feature.
Comment 1 Steve Dodier-Lazaro editbugs 2015-02-15 03:49:45 CET
Problem is the patch will resize the window even when there is "enough room" to display the current text (e.g. zooming up, down, then up again). I understand that's the easy implementation but it does mean that over time my terminal will grow bigger and bigger. In fact, it can even make the terminal window bigger than the screen.

I would, though, support a version that scales the current text, keeps the window size constant, and wraps the text. This would be useful.
Comment 2 Ferdinand Vesely 2015-02-17 23:54:14 CET
(In reply to Steve Dodier-Lazaro from comment #1)
> Problem is the patch will resize the window even when there is "enough room"
> to display the current text (e.g. zooming up, down, then up again). I
> understand that's the easy implementation but it does mean that over time my
> terminal will grow bigger and bigger. In fact, it can even make the terminal
> window bigger than the screen.

Thanks for pointing this out, I failed to trigger this case before.

> I would, though, support a version that scales the current text, keeps the
> window size constant, and wraps the text. This would be useful.

Similarly to the problem above, I couldn't find a way to keep the size of a window with multiple tabs constant. A single tab is fine, but as soon as the tab bar appears, the size starts to jump weirdly upon font resizing. My GTK knowledge is rather limited, but I'll experiment and try to find a solution.

Thanks.
Comment 3 Steve Dodier-Lazaro editbugs 2015-02-18 02:11:32 CET
Note that I don't know how exactly the terminal is implemented, but the tabs are most likely built via a GtkNotebook. The notebook will always adapt to be at least large enough for its largest child.

This means there should be a logic specific to the terminal that is used to wrap text and avoid constantly resizing the terminal. Once you've changed the text font, a possible solution would be to flush the terminal and refeed it whatever content it had, letting the existing text-wrap function do its job.
Comment 4 Igor editbugs 2017-06-01 01:49:00 CEST
Since we can have a multi-tabbed window, there's no sense to increase font in one tab and keep it in others - as this will break the desired terminal geometry.
Closing this one in favor of bug 5605.

Bug #11534

Reported by:
Ferdinand Vesely
Reported on: 2015-02-12
Last modified on: 2017-06-01

People

CC List:
3 users

Version

Version:
unspecified

Attachments

Additional information