[HarfBuzz] 'calt' in Indic shaper

Andrew Glass (WINDOWS) Andrew.Glass at microsoft.com
Fri Aug 9 10:22:55 PDT 2013


Thanks for including me in this thread. In principle I would prefer that explicitly discretionary features are off by default and can be turned on, e.g., <dlig>, Other standard features would be on by default and can be turned off, e.g., <liga>. While required features cannot be turned off, e.g., <rlig>. I would expect <calt> should belong to the second category. Unfortunately, I don't have much time at the moment to research this issue and I'm not familiar with the history of <calt> in the Indic engine, so I cannot say for the time being why this is different. A quick look at our published documentation shows:

	Contextual Alternates

	Feature Tag: "calt"

	Unlike the previous presentation lookups, the 'calt' feature is optional and is used to substitute discretionary contextual alternates. It is important to note that an application may allow users to turn off this feature, therefore should not be used for any obligatory Gujarati typography.

From the wording in the published spec, it sounds like <calt> is supposed to be on by default. The use of the term discretionary seems inappropriate in the context of the spec if we consider that to be something which is off by default and can be turned on. I have a work item to revise our current specs. I'll also look into this issue as a possible bug in Uniscribe.

Cheers,

Andrew

-----Original Message-----
From: John Hudson [mailto:john at tiro.ca] 
Sent: Wednesday, August 7, 2013 5:28 PM
To: Jonathan Kew
Cc: Behdad Esfahbod; Harfbuzz; Andrew Glass (WINDOWS)
Subject: Re: 'calt' in Indic shaper

Dear Jonathan,

> Yes, all this arose as a result of running comparisons (harfbuzz vs
> uniscribe) with Nirmala.

In that case I can safely say that Harfbuzz is doing what I consider the right thing, and if the result looks wrong it is because there is a bug in the font lookups. Since I couldn't test the lookups in any real world shaping engines at that time, it doesn't surprise me that there are bugs.

Luckily, this has come at just the right time, as I'm fixing Nirmala UI bugs at the moment.

> For examples of the Gujarati issue in Nirmala (when harfbuzz applies 
> 'calt', see
>
> http://people.mozilla.org/~jkew/hb-test/testcase-view.html?file=out/fo
> nts/win8/Nirmala.ttf/gu.txt.ot-vs-uniscribe#G_0_866

Now fixed.

> and many of the other testcases in the list there.
>
> And regarding the Devanagari line-extender, again inserted by 'calt' 
> as I understand it, see examples such as
>
> http://people.mozilla.org/~jkew/hb-test/testcase-view.html?file=out/fo
> nts/win8/Nirmala.ttf/hi.txt.ot-vs-uniscribe#L_1_805

That and some related ones really surprise me, because these head line extensions should only be happening when the second letter is carrying a left-leaning vowel sign. Possibly I'm missing part of a context statement, and hopefully I can fix most of these with a simple change in the lookups.


J.



-- 

Tiro Typeworks        www.tiro.com
Gulf Islands, BC      tiro at tiro.com

Getting Spiekermann to not like Helvetica is like training a cat to stay out of water. But I'm impressed that people know who to ask when they want to ask someone to not like Helvetica. That's progress. -- David Berlow



More information about the HarfBuzz mailing list