Arrow (->) ligature is no longer rendered in 0.15+ preview or live preview

Since updating to 0.15.x, I noticed in preview mode / live preview Obsidian no longer renders the right-arrow ligature that used to automatically show up when typing ->

example

2 Likes

not a bug. this is a change of font issue.
Use a font with ligatures.

But I didn’t change my font… and it does have ligatures… ok I see what you mean, will check

I played around with this more (now on 0.15.1) and still can’t get the pre-0.15 behavior back. I have not specified any non-default values for Interface font / Text font in my settings. So I was using the defaults. Always rendered → as a ligature.

I don’t know “how” it was doing that, I just know it was, and I used → extensively throughout my vault.

I played around with CSS and tried to do e.g.

.markdown-preview-view {
  -webkit-font-variant-ligatures: common-ligatures;
  font-variant-ligatures: common-ligatures;
}

but it did not help. If I specifically choose a font that has ligatures e.g. JetBrainsMono then the arrows are shown in preview mode. But I want to use a proportional font for preview like I have since Obsidian 0.5. Something definitely changed in 0.15+

Maybe related to specialChars? see specialCharPlaceholder / specialChars on multiple character - discuss.CodeMirror

1 Like

What changed is that the we use the default OS font. On mac the default OS font doesn’t have ligatures. If you want the old font, manually install and pick “inter”

4 Likes

Yes that worked, thanks!

It would have been cool if that was mentioned in the release notes next to the “Will now use your system font by default…” since I didn’t realize the implication.

4 Likes

What changed is that the we use the default OS font. On mac the default OS font doesn’t have ligatures. If you want the old font, manually install and pick “inter”

I tried doing this, but can’t get Obsidian to recognise the “Inter” font. I went to Inter - Google Fonts and downloaded and installed this font. Other apps recognise the newly-downloaded font, but Obsidian doesn’t for some reason.

The font I downloaded is a TrueType font – does Obsidian have some restrictions as to the types of font it recognises?

@ewestra Hmm. It worked for me. And I did not download any additional fonts.

1 Like

I have the same issue as @ewestra. I did not have Inter on my system, so I tried both the TrueType version, downloaded from Google Fonts, and the OpenType version, from Fontmirror.

Furthermore, I have tried installing the font for my user only (in ~/Library/Fonts) or globally (in /Library/Fonts), but Obsidian just can’t find Inter, even after restarting the app.

=> Update: I did some research and it seems to be some caching issue. I have deleted the file called ~/Library/Application Support/obsidian/obsidian-0.15.2.asar (I am on Mac, the location will be different for Linux or Windows), and now I can find and use Inter without any issues. Ligatures work again! :slight_smile:

My best guess is that this file is generated when you run a new version, and likely it only takes into account the fonts installed at that time. @luckman212 already had the font, so everything was alright, while @ewestra and I installed it later.

@taglia maybe you just needed to restart obsidian after installing the fonts?

I tried that first, didn’t help in my case.

Can someone help me how to get this working on Linux?

I can’t find inter font that I had installed too.

There should have been no change on linux, it should still be using Inter as the default font (since Linux doesn’t have a system font).

I tried to reinstall 0.15.6, but it also doesn’t work.

I did the same and I’m having the same problem. Installed Inter to my the “Computer” in Font Book, deleted the file from “Application Support” mentioned above, and restarted Obsidian. Did not work.

I even tried uninstalling Obsidian, deleting the whole folder within “Application Support”, restarting my computer, and reinstalling. Still did not work.

This makes me sad because I’ve had 0.15.6 on my computer for a while now, but wasn’t having any issue rendering arrows until I restarted my computer this morning. I use arrows a lot in my note taking flow.

I have the same issue on the latest stable build. It’s not possible to select Inter as a font (tried restart, full reinstall) etc. Even setting Inter directly in a CSS snippet -will- update the font, but will not render the - > as →

1 Like

Inter might not show up in the autocompletion because of a bug.
It works when entering it manually though.
Custom themes & snippets might interfere, so try disabling them if it doesn’t work.

1 Like

You’re right! Adding manually works. Thank you!

image

1 Like

I have exactly the same problem: Ligatures stopped rendering. I tried all the things mentioned above to no avail. I, heavily, rely on ligatures for my notes. That being said I appreciate, if this gets resolved quickly.

PS: I’m on macOS Monterey 12.4

Cheers,