Precisely adjust font size to fit a specified column number?

Asked by Lorenzo Farnetani on 2018-02-19

Hello,
I would like to adjust the font size to fit a specified column number in the current window.

In my case i have a 12'' laptop, and i use Vim. I would like to open 3 files side by side when in fullscreen, these files are typically 80 columns wide which means i would need a 3*80 (file width) + 3 * 2 (numbers) + 2 (vertical separators) = 248 columns wide window.
Unfortunately i can only roughly adjust the font size (i tried with the preferences menu and Ctrl++/Ctrl+-) and the columns are or not enough (225) or a bit too much (270). On my small screen looking at a small font like that is a bit tiring and i would like to set it to the maximum possible size while keeping the required column number.
In my example the font size switches from 9 (not enough columns) to 8 (too much) and i would like it to be automatically set at approximately 8.5 and to adjust itself if i change from fullscreen to windowed mode (reducing to ~8.4).

Is there any option that would allow me to precisely adjust the font size for a certain column number?
If not should i open a wish/feature request bug?

If it doesn't exist i would appreciate an option for the local terminal window for example:
Font size -> | Default
                      | Manual
                      | Fit Width : [column number wished]
Another possibility would be to make it profile specific.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Terminator Edit question
Assignee:
No assignee Edit question
Solved by:
Lorenzo Farnetani
Solved:
2018-03-03
Last query:
2018-03-03
Last reply:
2018-02-23

I never even realised fractional font sizes could be used for a mono font in vte like this :-)

An extra modifier could be used (i.e. Alt) to make the increment 0.1 I guess. It would be quite easy to do. Simply add another true/false parameter to the terminal.py zoom_font function arguments i.e. "tenths" which is true or false.

Unfortunately a quick play shows that the font size is stepping. i.e. multiple increments of smaller values don't change the size smoothly. It jumps in big steps, so this wouldn't do what you are after. Maybe newer libraries improve this (I'm on Xenial).

You could open a feature request, but it's not something Terminator can control. Not sure if this would be in Pango, HarfBuzz, FreeType or what.

Lorenzo Farnetani (florenzo) said : #2

Thanks for your answer, i will deal with it.