source-code-pro icon indicating copy to clipboard operation
source-code-pro copied to clipboard

\t weirdness in BBEdit

Open otter451 opened this issue 4 years ago • 4 comments

I am having problems with Source Code Pro in BBEdit.

It may be a BBEdit thing but I only experience the problem in BBEdit with SCP.

The issue is that \t gets replaced with what looks like a capital ‘A' - if I set bbedit to display invisibles, I get the usual capital delta ‘𝝙' wherever there is a \t.

Normal behaviour (with Menlo for example) image001

Menlo (with show invisibles set) image002

Source Code Pro image003

Source Code Pro (show invisibles) image004

otter451 avatar Mar 06 '21 17:03 otter451

This doesn't happen for me. Which exact font is this with? OTF or TTF? Which weight?

punchcutter avatar Mar 07 '21 00:03 punchcutter

I am using TTF and the issue effects all weights/variants

Running latest versions of Catalina + SCP + BBEdit

I don't get the issue on my production machine which runs latest Mojave + BBEdit and SCP v1.1017

EDIT: I just removed SCP from the Catalina machine, restarted and installed the ancient SCP v1.017 and the issue goes away. Rinse and repeat with SCP v2.030 and the issue is back (all variants). I tried it a few more times just to be sure it is repeatable. Something about \t has changed in SCP that BBEdit doesn't like...

I am loath to mess around with my production machine, but will do so if that would be helpful.

Is it possibly the same issue as https://github.com/microsoft/cascadia-code/issues/183 ?

otter451 avatar Mar 07 '21 04:03 otter451

Yes, that's exactly the same issue. Most fonts don't actually contain the encoded tab character, but for some reason the old Apple ATSUI seems to want U+000D (which has nothing to do with the tab character) which was removed from Source Code Pro almost 5 years ago. I think we can probably put it back in without any issues and that should solve the issue for you. Here's a quick test of adding that character back if you want to try using these TTFs. TTF.zip

punchcutter avatar Mar 07 '21 07:03 punchcutter

That fixes it!

Thanks for your help & time @punchcutter

otter451 avatar Mar 07 '21 08:03 otter451