Subject: Re: bug#11860: 24.1; Arabic - Harakat (diacritics, short vowels) don't appear

From: Eli Zaretskii <[email-masked]>
Date: Mon, 20 Aug 2012 20:24:14 +0300

> Date: Sun, 19 Aug 2012 21:44:56 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> >     2. Pass this array to ScriptLayout to generate a map of
> >        visual positions to logical positions.
> > 
> > There's no place in Emacs that calls ScriptLayout.  Isn't it
> > a problem?
> 
> I don't think so, at least not directly.  ScriptLayout actually draws
> the shaped glyphs on the screen.  Emacs doesn't use it because it
> draws the glyphs by itself, using the information in the glyph-strings
> generated from the data returned by the shaping engine.  Or am I
> missing something?

Answering my own question here: yes, I did miss something.  We do call
the 'draw' method of the font driver, in w32term.c.  However, the
Windows implementation of this is on w32font.c, and it calls
ExtTextOutW, not ScriptTextOut.  Which might be a problem, hmm...

As for ScriptLayout, it is only needed for logical-to-visual
reordering of _items_, whereas we always pass to Uniscribe a chunk of
text that can only become a single item.