Easily load custom fonts, even on mobile.
Obsidian itself makes it quite easy to load custom system fonts, but mobile platforms make it quite difficult to install system fonts in the first place, meaning it's hard to use a consistent font across platforms. Easy Fonts makes it easy!
After installing the plugin as usual, follow the steps below:
Fonts/)Reload fonts in the plugin's settings or use the Easy Fonts: Reload fonts commandFor example: if I want to use Iosevka.ttf as my monospace font, I'll put it into Fonts/Iosevka.ttf, set that path under the relevant setting, and then reload. That's it!
Obsidian uses web technologies for rendering, so only the following formats are supported:
ttfotfwoffwoff2If your font is in a different format, you can try conversion tools like Convertio, but your mileage may vary.
If you have a single font file that contains multiple variants, make sure that file is specified as the bold / italic font in the plugin's settings. Due to how Obsidian's styling works, it can't pick up multiple variants from the same font.
The plugin does a lot of work to ensure that loading fonts is as quick as possible, and loading only occurs on startup (or on demand). You can see how long it takes to load each font in the developer console, which you can open on desktop using Control + Shift + I / Command + Option + I.
If your font is especially large (>500kb), you can try removing unnecessary symbols using a tool like pyftsubset. This simple Ruby wrapper demonstrates how to remove unnecessary Unicode symbol ranges.
Also, if you have the option, prefer woff2 files, which have better compression.
Once fonts have been loaded, the plugin does not affect Obsidian's performance in any way.
The plugin caches decoded font data, so each font in use will take roughly double the space (fonts not in use are not cached). If this is an issue, I recommend resizing large fonts using the instructions above.
Fonts must be placed in a folder visible to Obsidian itself, meaning that hidden folders like .obsidian/ will not work. The Obsidian API doesn't consider files in these folders to belong to a vault, so there's nothing I can do about this.
Make sure the path to your font(s) matches the exact path on disk, since some platforms have case-sensitive file systems.