Different fonts for different languages

Things I have tried

I’ve searched the obsidian forum for assigning different fonts for specific languages with no luck.

What I’m trying to do

I use Korean, English, Simplified Chinese, and Japanese text in my work and would like them all to show up in different fonts.
Specifically,
Korean - font-family: ‘NanumSquare’
English - font-family: ‘Roboto Flex’
Simplified Chinese - font-family: ‘adobe-fangsong-std’
Japanese - font-family: ‘Spoqa Han Sans Neo Light’

I’d also like to apply different font weights to each language.

I tried the css snippet route with .markdown-source-view .cm-editor .cm-scroller .markdown-preview-view {} but it only works with individual fonts. I understand that if I put the fonts in order, the preceding font family takes precedence and the following fonts will output glyphs that doesn’t exist in previous font family families. However, the fonts I plan to use partly overlap in glyph coverage. For example, ‘NanumSquare’ covers Korean, English and some Chinese characters. So this plan wouldn’t work in my case.
I was thinking maybe I could use @font-face and assign specific unicode ranges to each language, but from what I understand, this goes beyond css and requires HTML? I don’t know if html files can be added as snippets to Obsidian.

Anyhow, any advice on making this work in Obsidian is welcome.

Thanks in advance!

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.