Sampradaya: a Grantha typeface

68 views
Skip to first unread message

Ambarish Sridharanarayanan

unread,
Jul 25, 2021, 3:13:01 AM7/25/21
to sanskrit-programmers
I wanted to share with folks here a Free/Opensource Grantha typeface, Sampradaya, that I've been working on for a few years now.


The glyphs are hand-drawn (and partly sourced with permission from the non-Unicode IITMGrantha typeface), but the main contribution of this typeface is correct rendering of complex Sanskrit strings, including triple/quadruple conjuncts and Vedic accent marks. I don't know of another Grantha typeface available today that renders all these correctly. Here is a sample rendering of some of the complex cases:

Screenshot 2021-07-25 at 00.07.45.png

In the process of testing this typeface, I ended up writing lots of string test cases that should be useful for any Grantha typeface developer:


[As an aside, I also had to write a cross-platform rasteriser to render text strings using different rendering engines like Windows/DirectText, Macos/CoreText and Macos/Qt. I used this a lot to test rendering for Sampradaya as well for a couple of other Grantha typefaces I worked on recently. This rasteriser is now a separate repository.]

The next step for Sampradaya is support for Manipravalam. I'm hoping to not just include Tamil glyphs but also support cross Tamil/Grantha rendering; Manipravalam would require, say, a Tamil vowel marker to attach correctly to a Grantha consonant.

Feedback and other help welcome!

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Jul 25, 2021, 5:41:56 AM7/25/21
to sanskrit-programmers
Thanks! Added it to https://github.com/indic-transliteration/sanskrit-fonts/tree/master/fonts/ttf-grantha , whence it will be made available as part of this arch linux package : https://github.com/indic-transliteration/sanskrit-fonts-aur 

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sanskrit-programmers/e5d329a6-5eee-4e96-b494-0ef5d3e80e32n%40googlegroups.com.


--
--
Vishvas /विश्वासः

Shreevatsa R

unread,
Jul 25, 2021, 5:29:50 PM7/25/21
to sanskrit-programmers, Ambarish Sridharanarayanan
On Sun, 25 Jul 2021 at 00:13, Ambarish Sridharanarayanan <amba...@samskritabharatiusa.org> wrote:
In the process of testing this typeface, I ended up writing lots of string test cases that should be useful for any Grantha typeface developer:


[As an aside, I also had to write a cross-platform rasteriser to render text strings using different rendering engines like Windows/DirectText, Macos/CoreText and Macos/Qt. I used this a lot to test rendering for Sampradaya as well for a couple of other Grantha typefaces I worked on recently. This rasteriser is now a separate repository.]

Wow, thanks for sharing these as well! 
I cannot read Grantha but looked at some of the test cases using Aksharamukha / r12a-Uniview to understand them, and many of them look like they can be the basis of good test cases for fonts in other scripts too.

This is what I understand about the rasteriser; let me know if my understanding is incorrect: it produces bitmap images as output, and it takes a font and Unicode text as input. It relies on the platform (Qt6, CoreText, Directwrite) to do the font loading and text layout etc, and calls their APIs in the proper respective ways, thereby providing a uniform way to do "(font + text) → image" across the different platforms it supports. 

So this sounds useful for testing fonts on those platforms; thank you. (It may be useful to add support for other commonly used stacks as well, like Freetype+HarfBuzz or whatever it is on Android/Chrome/etc… don't know how feasible that is.)
 

श्रीमल्ललितालालितः

unread,
Jul 25, 2021, 6:52:07 PM7/25/21
to sanskrit-programmers
Just in case for testing purposes:
श्रीमल्ललितालालितः
www.lalitaalaalitah.com


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.

Ambarish Sridharanarayanan

unread,
Jul 26, 2021, 2:46:58 AM7/26/21
to sanskrit-p...@googlegroups.com
Thanks, lalitaalaalita, for the Python script; will check it out.

Shreevatsa,

> some of the test cases ... can be the basis of good test cases for fonts in other scripts too.

Yes! Some of the cases are specific to Grantha (which has a specific conjunct-form of ya like in the Malayalam script), but many of them would be applicable to Devanagari and other Brahmic scripts too. I'm not aware of a corpus of font test cases; if there's one, happy to contribute.

> This is what I understand about the rasteriser; let me know if my understanding is incorrect: it produces bitmap images as output, and it takes a font and Unicode text as input. It relies on the platform (Qt6, CoreText, Directwrite) to do the font loading and text layout etc, and calls their APIs in the proper respective ways, thereby providing a uniform way to do "(font + text) → image" across the different platforms it supports. 

Yep, this is exactly it. I might steal your phrasing and update the README; it's much clearer than the description I had :-)

> So this sounds useful for testing fonts on those platforms; thank you. (It may be useful to add support for other commonly used stacks as well, like Freetype+HarfBuzz or whatever it is on Android/Chrome/etc… don't know how feasible that is.)

Qt uses Freetype+HarfBuzz, so I have coverage there, but only on Macos. Linux is a gap, as is Android. Qt/Linux is straightforward; other Linux text rendering libraries are also feasible, and I'll probably get to them at some point of time this year, but I have zero Android skills, so I'm hoping someone more familiar may contribute a pull request.




विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Jul 28, 2021, 12:07:04 AM7/28/21
to sanskrit-programmers
Another question - is this font in any area inferior to the Noto font? 

Ambarish Sridharanarayanan

unread,
Jul 28, 2021, 1:02:39 AM7/28/21
to sanskrit-p...@googlegroups.com
I'd say, in a few different ways:
  1. The splines in the glyphs are hand-drawn and not mathematically generated, which tends to mean some asymmetry and some lack of stylistic uniformity here and there. Usually not visible at normal point sizes, but if you open up the typeface you can see the quirks.
  2. Noto Sans Grantha's GPOS (glyph positioning) uses the more modern anchor-points mechanism; Sampradaya still uses relative pixel positioning and manual rearrangement, leading to sometimes imperfect positioning of marks (like not exactly over the centre of the base glyph).
  3. I'm an amateur at typography, and there could well be other OpenType features missing in Sampradaya. Noto Sans Grantha likely benefits from all of the combined typographic knowledge at Google.
  4. Less real-world usage and the Linus's law effect.
That said, there are many ways in which it renders better (and looks better). I'm also happy to continue working on it as folks find issues, and would also love pull requests. I want a functional high-fidelity Grantha typeface, and I'm hoping Sampradaya can help get us there :-)

Ambarish Sridharanarayanan

unread,
Jan 3, 2022, 4:49:31 AMJan 3
to sanskrit-p...@googlegroups.com
Hey folks,

The latest release of Sampradaya, the Grantha typeface, now supports Rgveda and Samaveda accent marks! Here's a short list of changes in this v0.5.0 release:

  • Use anchors everywhere possible.
    • Eliminate separate 3rd stack glyphs.
  • Simplify reordering without using extra glyphs.
  • Samavedic and Rgvedic accent support.
  • A ton of misc. bugfixes.

Below is some sample rendering from the Rgveda and Samaveda (the text samples are from Sri. Shriramana Sharma's Vedic accents proposal).

Ambarish

Screenshot 2022-01-03 at 15.07.11.png
Screenshot 2022-01-03 at 15.06.30.png

For comparison, based on previous feedback, here's the Noto Sans rendering. You can see many of the accent marks are overstruck or otherwise misplaced.
Screenshot 2022-01-03 at 15.12.20.png
Screenshot 2022-01-03 at 15.13.12.png

Reply all
Reply to author
Forward
0 new messages