The characters “<=” are rendered as a single “≤” (LESS-THAN OR EQUAL TO) character.
This happens only in the Windows app (Android and Linux do not exhibit this problem), and only in text formatted as inline code or as a code block.
Copying the text results in the correct “<=” sequence.
A number of character sequences are similarly affected, including at least “<=”, “>=”, “=>”, “!=”, “/=”, “<>”, “<=>”, “<==>”.
Environment
SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.5.12
Operating system: Windows 10 Home 10.0.22621
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
Rendering “<=” as “≤” is particularly problematic in code blocks, since in many programming languages “<=” is a valid operator but “≤” is a syntax error.
The debug info says “Windows 10 Home 10.0.22621”, but I’m running Windows 11.
You can surround 3 backticks with 4 backticks to show 3 backticks in this forum. You can surround 4 with 5 to show 5, etc.
````
```
x <= y
```
````
I see this in Windows too, but not MacOS. It’s likely that the font you are using is rendering “ligatures”. What font are you set to? (The font that is being used in your code blocks is probably the one in Appearance → Font → Monospace Font.
If you have nothing set, it will be using a default. I don’t know what the default is. For Windows it seems like it should be “Consolas”, but if I set it to Consolas, the ligatures disappear.
So that’s your workaround if you don’t like the ligatures. Set your own font, and Consolas might be a good choice.
(And this might be a bug if Obsidian is supposed to use the Windows default. I’m just giving you explanation and workaround for now.)
If you copy from the code block, it should copy the individual characters, even if it’s rendering a ligature. It should only copy the ≤ character if you copy from Reading mode.
Glad to hear this will be fixed, and that there’s a workaround.
I can confirm that, with Obsidian 1.5.12 on Windows, setting the monospace font to Obsidian Mono works around the problem. “<=” is displayed as “<=” with Obsidian Mono, and setting it to Obsidian Code triggers the problem. (No custom font is applied initially, so I suppose it’s using a system default.)
(It’s odd that MS Word renders “<=” as “<=” using either Cascadia Code or Cascadia Mono.)