I'm very confused here.
On Friday, March 17, 2023 at 10:55:27 AM UTC-4 Edward K. Ream wrote:

PR #3150 <https://github.com/leo-editor/leo-editor/pull/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


- There is no *default_font_dict *in leoColorizer.py. There is only 
*leo_color_database.*
- There is no color *comment1* in that dictionary.  I think you may have 
meant to word the sentence differently.
 

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


 - Just above, you wrote that the syntax was rest.comment1.  Now you write 
that it is rest_comment1_family.  ???
- Why would an @color node contain font specifications?  Shouldn't they be 
in an @font node?

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.


It's not documented in leoSettings.leo.  The only documentation I can find 
(in the referenced PR) is

"@font settings for particular languages must have the form @font 
<language-name>.<tag>
where <tag> is one of the tags in the default_font_dict in leoColor.py." 

Please give us some actual working examples.  For example, suppose I want 
rest headlines to be 16 pt cyan Boldoni font.  What settings do I need to 
add to a theme file to achieve that?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c77172c1-1ad2-4df0-9227-951072c40250n%40googlegroups.com.

Reply via email to