leoInteg how to: fonts

83 views
Skip to first unread message

Edward K. Ream

unread,
Jul 21, 2021, 10:11:54 AM7/21/21
to leo-editor
leoInteg #168 suggests making it easier for newbies to adjust fonts. This is surely one of the first thing any newbie is likely to want to do.  At present, it's not obvious how to do this.

It's actually easy, if you know the trick.  Do the following 3 steps, in order.

1. Choose the theme you want to use in vs-code. If, later, you change themes, you will likely have to redo steps 2 and 3. But that's no big deal, as I'll explain.

2. Zoom the entire screen (everything in vs-code) until headlines (in Leo outlines) look good. Use the "View: Zoom In" (Ctrl+=) or "View: Zoom Out" (Ctrl+-) commands.

3. Adjust the size of the body font so it looks good at the present zoom level. In the gui settings panel, search for "font", then set the "Editor: Font Size" setting.

That's all there is to it. vs-code remembers all settings, including the zoom setting.

Edward

tbp1...@gmail.com

unread,
Jul 21, 2021, 10:46:32 AM7/21/21
to leo-editor
Not so fast!  First of all, on my system CTRL + and CRTL - don't work.  They are trying to do something else that requires some text to be selected.  I have to use the View/Appearance/Zoom menu.  Or, I just discovered, use the plus and minus keys on the keypad (with CTRL).  The non-keypad keys that I always use for browser zooming are the ones that don't work.  I don't know what someone without a keypad should do.

Second, the zoom steps are too large.  Third, I don't see any gui settings panel, and I keep forgetting how to find it.  Whenever I do, it's always by accident when I'm doing something else. This morning, no accidents!

Edward K. Ream

unread,
Jul 21, 2021, 1:05:36 PM7/21/21
to leo-editor
On Wed, Jul 21, 2021 at 9:46 AM tbp1...@gmail.com <tbp1...@gmail.com> wrote:

Not so fast! 

:-) Thanks for this detailed report.
First of all, on my system CTRL + and CRTL - don't work.  They are trying to do something else that requires some text to be selected.  I have to use the View/Appearance/Zoom menu.  Or, I just discovered, use the plus and minus keys on the keypad (with CTRL).  The non-keypad keys that I always use for browser zooming are the ones that don't work.  I don't know what someone without a keypad should do.

Don't know what's causing the binding problem.

Second, the zoom steps are too large. 

Zoom step size might depend on what theme is in effect. My remarks here are intended as a quick start. Fine tuning might require a custom theme.
Third, I don't see any gui settings panel, and I keep forgetting how to find it.  Whenever I do, it's always by accident when I'm doing something else. This morning, no accidents!

Use the palette, Luke! The palette is more sophisticated than Leo's minibuffer.  After Ctrl-Shift-P, try searching for "sett" or "sett ui" or "sett json" or "leo set".

Edward

tbp1...@gmail.com

unread,
Jul 21, 2021, 1:14:37 PM7/21/21
to leo-editor
I finally found a way that I may even remember.  At the bottom of the left-hand strip of the leointeg window there is a Settings icon, looking like an asterisk.  Clicking this brings up a menu with a "Settings" item (it also has a Command Palette item).  Selecting Settings, I get a screen marked "Commonly used", and you can select Editor there.  This gives me body fonts settings, among other things.

Félix

unread,
Jul 21, 2021, 10:52:10 PM7/21/21
to leo-editor
Use the palette, Luke!
HAH! I'm going to use this one!! Indeed, before looking elsewhere or wondering  if a particular feature exist, just open the command palette, (ctrl+shift+P) which is vscode's own 'minibuffer' ;) ... and start typing the most relevant about the feature you're thinking about.

For example, if you're wondering if a plugin is needed to preview md files, open an md file, and make sure your cursor focus is into it, (if coming from a Leo outline's, make sure it's external file is opened, not the body pane)... open the command palette and start typing 'preview'! tada!

Context sensitive shortcuts and commands
Reading your exchange also got me thinking I should point out a point about vscode you should be aware:
Vscode is context sensitive with its shortcuts. For example:

Having the focus in a 'Leo' panel (outline, body pane) will react on Leo's shortcuts : 
[ctrl+minus] replace, [ctrl+plus]  replaceThenFind

While having your cursor focus in a regular (non-leointeg) editor, or explorer view, terminal, etc...:
[ctrl+minus] zoom in, [ctrl+plus]  zoom out

It is the case for many other shotcuts, obviously.

to change shortcuts, you guessed it, use the command palette (ctrl+shift+P), and start typing 'key'
--
Félix

Félix

unread,
Jul 21, 2021, 11:24:36 PM7/21/21
to leo-editor
Subtlety important not to miss: the command for previewing MD files won't be in the command palette if your cursor focus is not in an opened MD file!

Edward K. Ream

unread,
Jul 23, 2021, 5:29:50 PM7/23/21
to leo-editor
On Wednesday, July 21, 2021 at 9:46:32 AM UTC-5 tbp1...@gmail.com wrote:

Second, the zoom steps are too large. 

Zoom steps are floats, not int!

At present I use:

Theme: Github dark high contrast.
Zoom level: 1.5
Editor font: 'DejaVu Sans Mono'  (with the single quotes)
Editor font size: 14.

The result is very close to the look I get in Leo.

Edward

tbp1...@gmail.com

unread,
Jul 23, 2021, 6:35:12 PM7/23/21
to leo-editor
Good to know.  I was referring to the steps I got using the keypad CTRL +/- keys.
Reply all
Reply to author
Forward
0 new messages