PR
#3150 fixes problems with `@color` and `@font` settings.
Apparently @font settings have not been working for a year or more. In that sense, the changes are minor. However, I have taken care not to require any changes to theme files. In that sense the changes could have had major consequences.
Changes to some @font settings
Imo there was no way to get everything to work properly without changing some aspect of @font settings. I'll omit the horrendous complications.
The new code enforces (assumes) that @font settings pertaining to syntax coloring must have one of the forms:
@font <tag>
@font <language>.<tag>
where <tag> is one of the values of the default_font_dict in leoColorizer.py. Some examples:
@font comment1
@font rest.comment1
The body of such nodes should contain one or more settings. For example, for the @color rest.comment node:
# Note: the default font size is 12.
rest_comment1_family = None
rest_comment1_size = 12pt
rest_comment1_slant = italic
rest_comment1_weight = None
This is all documented in leoSettings.leo, where the context may be clearer. Note that settings whose values are None have no effect: they use reasonable, unsurprising defaults.
Summary
PR
#3150 shouldn't
break any existing settings, wherever they may be defined (in theme files, myLeoSettings.leo, etc.)
@font settings
for syntax coloring should have one of the forms:
@font <tag>
@font <language>.<tag>
As always, these settings may appear in all the usual places.
There should be no need to change theme files, but the new @font settings should work in theme files.
Please test the new code and report any problems. I'll wait a few days before merging this PR into devel.
Edward