Hi all,
I’m working on a plugin that requires changing the coloring and font style (bold and italicized) of text arbitrarily. My plan was to have a color scheme file which would associate unique scopes with all the possible colors and font styles I’d be using, and then use view.add_regions to associate a region of text with the appropriate scope and thus color/font_style.
However, I’m running into a few issues. First, I’ve noticed that if I specify just the foreground or just the background of a scope in the color scheme, any regions added with that scope are not colored correctly. This same incorrect coloring occurs if the scope’s foreground or background color matches that of the color scheme’s global settings. The only way I’ve figured to get around this issue is to specify a foreground or background color which is off by 1 from the one in the color scheme’s global settings. Only in this case is the text is colored “correctly”. In addition, specifying a font style of bold or italic seems to have no effect.
Can anyone shed some light on this issue?
Thanks!