On 3/5/2012 10:25 AM, Andreas Prilop wrote:
I think the zero-width joiner (ZWJ, U+200D) should join
regardless of typeface. But Internet Explorer 8 won't join
if the ZWJ is taken from another font than surrounding text.

Normally, there's a bit of a rationale for limiting the action of the ZWJ to the same font run, because the result of applying the joiner is a glyph-level change.

Now you've found what looks like the perfect "edge case":

In MS Windows, the font Mangal contains the zero-width joiner
but not Arabic letters. When I specify "font-family: Mangal"
then Internet Explorer 8 takes the ZWJ from Mangal but
Arabic letters from another font and the result is non-joining.


In this case, the results would clearly be better if the font assignment for the format character (ZWJ) were to be ignored. If that was done, the two font runs surrounding it could have been merged.

However, the problem is made worse by the fact that the style run and the font run do not actually align. This is because fo the invisible substitution of fonts when the style run specifies a font not containing the glyphs needed to show the characters.

In this case, when determining runs for font substitution, a "greedy" algorithm would have helped, but normally, the minute the font specified in the style run can handle any character you do want to stop the substitution.

My question would be this: do you know of any browser that can handle your test case?

If not, I'd be inclined to say "tough luck", because font substitution is something that's done on a "best effort". You simply can't expect everything to work out as perfectly as if you had provided correct font bindings explicitly.

If every other browser substitutes the fonts and gets the ZWJ to act correctly, then it's perhaps something that should be considered "best practice" and could be noted in the Standard.

In any case, it might be worth filing as a bug with your favorite vendor...

A./


Reply via email to