it‘s something pretty specific that happens when asking the clipboard for specific datatypes. One of the datatypes I used for rich text, doesn’t include the correct font info anymore (I haven’t looked into the details)
I’m still doing some freelance Android and iOS enterprise work from time to time (some projects I started a long time ago and can not just abandon ;-))
Interestingly, copying and pasting the same text from VS Code to Word, and then copying it again from Word works fine. That is to say, BetterTouchTool's Clipboard history preview works fine with rich text from Word.
I'm also not seeing any preview issues copying from Safari or Chrome. So far just VS Code, latest version.
Wait, never mind. Copying from VS Code directly and pasting to a rich text document in Text Edit results in the same issue in Text Edit, even with BetterTouchTool not running.
Subsequently changing the font in Text Edit, even to the same font used in VS Code fixes it in Text Edit.
Pasting into Notes works fine, however.
It looks like copy and pasting from VS Code to some other apps with rich text has the same result. I just tried an RTF document in DEVONthink.
For now, I've just disabled copying with syntax highlighting in VS Code, which works fine. This is probably how I want Code to work anyway, so that should resolve my direct issue. The setting is editor.copyWithSyntaxHighlighting in Code.
I just saw this forum topic, and realized I should have replied there instead. I just happened to find this topic first.
I also wanted to report that I tried a few different fonts in VS Code, and some work and some don't. It looks like it might be happening with any of my user-installed fonts, but not the fonts that are part of macOS.
even if they didn't want to load user fonts, it should fall back to a renderable font when rendering the NSAttributedString in a NSTextView - not to the "LastResort" font. For me this looks very much like a bug - especially as it has worked fine for many years.
BTT already tries to workaround this by requesting a non HTML format like rtfd instead, but some apps only put a HTML version into the clipboard.
I'll add a check to see whether the last resort font is used and if so, use the standard system font instead.