#246 bold black and dim white

open
nobody
None
5
2008-11-05
2008-11-05
No

After seeing the "Invisible keywords" bug (2211412), I grep'ed for "white" and "black" in the .jsf files. mail.jsf has several uses, but they don't cause a problem because they set both the foreground and background. However, diff.jsf and spec.jsf use "dim white", and sml.jsf uses "bold black", without setting the background. Both "dim white" and "bold black" are visible on white and black backgrounds, respectively, but just barely. Try highlighting the attached files with the (un)appropriate background.

I think replacing the "dim white"s with "bold" should work fine. I'm not sure about the "bold black" in sml.jsf, since it already uses "bold" for keywords.

Discussion

  • Highlight this file with "diff" on a white background.

     
    Attachments
  • Highlight this file with "spec" on a white background.

     
    Attachments
  • Highlight this file with "sml" on a black background.

     
    Attachments
  • Jan Engelhardt
    Jan Engelhardt
    2008-11-08

    Non-authoritative answer follows.

    I would say there are always users with odd color configurations that cause syntax highlighting rules to go haywire on that specific configuration. mcedit for example (rules tuned for blue background), and similarly, joe (tuned for black it seems). Since I modified my copy of joe to also use a blue one, I had to throw out many a non-bold blue definitions in the .jsf files.

     
  • Right. This is a case of trying to please the most people with the least effort, and most people use black or white backgrounds.

    My guess is that the global colors feature is supposed to address the problem of other background colors. You could, for instance, put "=Preproc black" in your ftyperc. That would fix most uses of "blue" without having to make local copies of every .jsf file. However, for the global colors feature to be most useful, the names given to colors in the different .jsf files need to be consistent. matlab.jsf defines "Keyword" to "blue", whereas every other .jsf file that defines "Keyword" defines it to "bold". Perhaps matlab.jsf should be changed, but I'm sure there are plenty more inconsistencies.

    If we really wanted to please everyone by default, then we could have a way to define colors conditionally based on the default background and foreground. But that seems like overkill.