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

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

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”

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.

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”

I tried doing this, but can’t get Obsidian to recognise the “Inter” font. I went to 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.