Confused how to change font sizes

37 views
Skip to first unread message

Low Priority Services

unread,
Jun 14, 2024, 12:39:01 PMJun 14
to leo-editor
I've used Leo for quite a few years now, but I don't upgrade very often.
I don't upgrade very often because each time I do I run into issues and it can be quite stressful getting it working again.
Today I got Leo up and running again quite quickly and I'm now running 6.7.9-devel.

However, I seem to have lost my font sizes and there never seems to be a straightforward way of configuring them.  It's so long since I last upgraded I can't remember what I did and it's just not intuitive :-(

In the leoSettings.leo file there are a few items with font sizes:
font-size, medium-font-size, small-font-size.

I've set them all to 7pt with no effect!
It's not particularly an issue for the body window as I can just use Ctrl and the mouse wheel to scroll the size, although I'd like it to be smaller by default.

The real issue is the outline tree.  It's limited for space and there seems like no easy way to change this font size.

Thank you in advance.

Thomas Passin

unread,
Jun 14, 2024, 1:25:02 PMJun 14
to leo-editor
The way to do this is to modify the theme outline you are using.  You should save it with a different name in the .leo/themes directory, and then you can specify that theme in your myLeoSettings.leo file.  Otherwise (if you don't save to your .leo/themes directory) the next time you update Leo, your changes might get lost.

You can edit a theme file most easily from the Settings/Open a Theme File menu item. Search for a node named something like Fonts & text sizes.  If you don't find that, look for string settings like @string font-size-body = 12pt. Change that to what you want. There is a similar one for the tree font, too.  Save the theme file, change myLeoSettings, and restart Leo.

I suggest trying out one of the themes that start with tbp_, or include tbp in their name.  They are ones I developed and the reason I suggest them is that they use a different font family for the tree and other elements except the body.  The tree font, which I label with "ui", is not a monospaced font.  It's been chosen to have good readability at smaller sizes, and because it's not monospaced you can get more characters into a short headline.  When I check out other fonts any more, I can hardly stand looking at them because the tree and menus seem so bulky.

The one I use the most is tbp_dark.  It's a dark theme, and if you would rather have a light theme you could try tbp_light.  As you will notice there are some tbp_ solarized themes as well.  If none of them suit you, you could use them as a starting point for working up your own theme. But be warned!  It can take a lot of time, mostly to get non-main-text colors to work reasonably well with the text foreground and background.

The reason some of my theme file have slightly strange names like minimal-ui-tbp_dark_solarized.leo is because I changed the Qt stylesheet used by many of the themes to use fewer class specifiers (hence "minimal").

I've attached a screen shot so you can see what my tbp_dark theme looks like. Note how the font for the tree (and the menu labels) is different from the font for the body, and how much easier it is to scan the tree's headlines.

tbp_dark_screen_shot.png

Thomas Passin

unread,
Jun 14, 2024, 6:05:33 PMJun 14
to leo-editor
On Friday, June 14, 2024 at 12:39:01 PM UTC-4 low.priori...@gmail.com wrote:
In the leoSettings.leo file there are a few items with font sizes:
font-size, medium-font-size, small-font-size.

I've set them all to 7pt with no effect!

Just as a FYI, it's better never to change anything in leoSettings.leo.  The next version of Leo that gets released will replace your changed outline with a new one.  Instead, add nodes with your changes to myLeoSettings.leo.  They will override the corresponding settings in leoSettings.leo, and they will never be changed by a Leo upgrade.

Low Priority Services

unread,
Jun 15, 2024, 3:36:54 AMJun 15
to leo-e...@googlegroups.com
Sir!  Excellent, thank you very much.  That seems like a much more straightforward way of making the change.  Stuff being overwritten isn't an issue as I have a bash script that moves the entire leo folder first and then basically tries to reinstall it.  It tends to be the pip stuff and dependencies that always cause me the issues, but I solved that fairly quickly this time.

Thank you for your help.

Kind regards,
Richard Twyning

--
You received this message because you are subscribed to a topic in the Google Groups "leo-editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leo-editor/KM-Gp9M30yI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/c64433c6-2c0f-49d6-8d71-32cdee568f57n%40googlegroups.com.

Thomas Passin

unread,
Jun 15, 2024, 5:42:38 AMJun 15
to leo-editor
Since you haven't installed a new version of Leo for quite some time, I wonder if you know that Leo can highlight the current line in the body editor, and also show a right margin guideline. As usual for Leo, you can put these options into effect with settings:

@bool show-rmargin-guide = True
@bool highlight-body-line = True

Thomas Passin

unread,
Jun 15, 2024, 5:46:52 AMJun 15
to leo-editor
If you decide to show the right margin guide, you can set its default location with yet another setting:

@int rguide-col = 80

Its location can be changed for any node or subtree using the pagewidth directive:

@pagewidth 65

low.priority.services

unread,
Jun 15, 2024, 6:21:32 AMJun 15
to leo-e...@googlegroups.com
Wow, yes, I tend to not experiment with settings much, so I'm probably not using it to it's full capacity, but I'll certainly experiment a bit more with these. 

Kind regards, 

Rich.T



Sent from my Galaxy
Reply all
Reply to author
Forward
0 new messages