rainbowth icon indicating copy to clipboard operation
rainbowth copied to clipboard

delimiters overwrite parts of adjacent characters

Open mnewt opened this issue 10 years ago • 11 comments

Parts of characters are getting overwritten.

Example code:

(defn function [mom]
  (map 
    #(make %) [mom dad]))

With rainbowth: screenshot

Without rainbowth: screenshot

Notice that italics make it worse, but it happens with non-italic characters as well.

On ST3 3083, OSX, MacBook Air 13, relevant settings:

    "color_scheme": "Packages/User/Monokai.tmTheme",
    "font_face": "Monaco",
    "font_size": 12,

mnewt avatar Aug 13 '15 23:08 mnewt

I'm afraid there is nothing I can do to fix this. It happens on the intersection of Sublime's rendering engine and the metrics of your font, neither of which I can control in any way.

whitequark avatar Aug 13 '15 23:08 whitequark

Ah, I thought that might be the case. Thanks for clarifying.

Do you know why it only happens when rainbowth colors the delimiters?

mnewt avatar Aug 13 '15 23:08 mnewt

Try turning subpixel antialiasing off (in Sublime or OS X globally)

whitequark avatar Aug 13 '15 23:08 whitequark

Still the same problem. Not as severe, but still there.

rainbowth: screenshot No rainbowth: screenshot

mnewt avatar Aug 14 '15 00:08 mnewt

This doesn't happen at all for me on Linux. Guess it's some kind of OS X-specific bug.

whitequark avatar Aug 14 '15 01:08 whitequark

Fair enough. When I have some more time, I'll try and figure out why this is happening and reply back. In the meantime, I'll keep using rainbowth, because even with this issue it's still awesome.

mnewt avatar Aug 14 '15 17:08 mnewt

Observe the same issue occurring in other operating systems.

Windows 8.1: image

Linux (Arch GNOME 3): screenshot

And without rainbowth: screenshot

Both of these are using the latest respective beta of Sublime Text 3, 3083, default font settings and default Monokai theme.

mnewt avatar Aug 20 '15 23:08 mnewt

Ah. Right. I can reproduce this on my Linux install too.

The problem is that if I leave the background transparent, Sublime draws the border around the letter with the foreground color, instead of changing the color of the letter. My fix to that consisted of extracting the default background color (and for highlighted line too), and setting it explicitly. And some letters, notably % or italic m, are intersecting with the background that it draws. Since my highlighting schemes do not use italic, I did not notice it initially.

I entirely understand how irritating it is. This should be reported and fixed upstream. However, Sublime's channels to report bugs upstream are really terrible and I have never got an useful response before. So I will leave it to someone with more time and motivation on their hands to triage this issue, because right now I have neither, not for this issue.

whitequark avatar Aug 21 '15 03:08 whitequark

It might be possible to rollback to an earlier Sublime version meanwhile, like around 3060 or so. Not satisfactory, I know.

whitequark avatar Aug 21 '15 03:08 whitequark

+1 for this affects me and I want a fix. Just found the package, which I have been desperately wanting, but don't really think I can use it without this fix.

skimania avatar Mar 20 '17 15:03 skimania

Try complaining to the developer of Sublime Text. There's nothing I can do about it.

whitequark avatar Mar 20 '17 15:03 whitequark