adobe-fonts / source-serif

Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans.
https://adobe-fonts.github.io/source-serif
SIL Open Font License 1.1
2.15k stars 161 forks source link

Support for Sanskrit and Pali, especially ṁ #97

Open sujato opened 2 years ago

sujato commented 2 years ago

The ISO standard for Sanskrit/Pali requires ṁ, which is still missing for Source Serif. There are very few quality fonts for ancient Indian languages, and in the free world, none with Source's qualities.

The blog post for Source Serif 4 indicates that AL-5 support is upcoming, which includes ṁ. Yay! So +1 for this! :+1:

Meanwhile, thanks to everyone who has made Source Serif happen. I'm using variable fonts with optical sizing on the web. For free! And it just works! Amazing how far we've come. :pray:

projectshifter commented 2 years ago

Even though it’s not encoded as a precomposed glyph, Source Serif already supports ṁ. You can use m followed by U+0307 COMBINING DOT ABOVE, which is defined by Unicode to be canonically identical.

projectshifter commented 2 years ago

image

sujato commented 2 years ago

Thanks for the help, I didn't realize this.

What i have found is that using the precomposed glyph ṁ it "just works" in HTML, so presumably the browser is clever enough to compose the glyph. However in LuaLaTex that doesn't work; you have to add m + U+0307. Which is okay as a workaround, but still, it'd be nicer without this gotcha.

dpk commented 1 year ago

What i have found is that using the precomposed glyph ṁ it "just works" in HTML, so presumably the browser is clever enough to compose the glyph. However in LuaLaTex that doesn't work; you have to add m + U+0307. Which is okay as a workaround, but still, it'd be nicer without this gotcha.

You should be able to use the newunicodechar package to work around this:

\usepackage{newunicodechar}
\newunicodechar{ṁ}{m\char"0307}

(Incidentally, when do you use ṁ? I’m familiar with IAST which uses ṃ for the anusvara)

sujato commented 1 year ago

You should be able to use the newunicodechar package to work around this:

Thanks for the tip.

(Incidentally, when do you use ṁ? I’m familiar with IAST which uses ṃ for the anusvara)

I run SuttaCentral, which uses ISO 15919. It's technically superior on several grounds, not least in maintaining consistency between multiple Indic languages.

Incidentally, I was just doing some background research today, and I discovered to my surprise that ṁ overdot was, in fact, the recommended character for anusvāra at the Geneva Orientalist Congress of 1894, and therefore is the official IAST form. No idea how everyone started using ṃ underdot!

https://discourse.suttacentral.net/t/it-seems-anusvara-was-represented-by-not-at-the-geneva-congress-of-1894/28164