[XeTeX] xetexref updated
Jonathan Kew
jonathan_kew at sil.org
Mon Jun 25 23:18:56 CEST 2007
On 25 Jun 2007, at 9:28 pm, François Charette wrote:
> I had tried to typeset sample Urdu text with Nafees Nastaleeq
> (http://www.crulp.org/nafeesNastaleeq.html) without much success.
> With earlier versions of XeTeX/xdvipdfmx, this font lead to a
> crash. Now it compiles fine, but certain glyphs are often missing
> in the output (see example). I did not know Pak Nastaleeq, but the
> webpage says it is beta. However I would not be surprised if
> nastaʿlīq fonts are not handed well by ICU...
Yes, I've tried Nafees Nastaleeq as well, and seen that there are
some problems. The only OpenType Nastaliq font I'm aware of that
currently renders properly with ICU in XeTeX is the OpenType version
of Monotype's Noori Nastaliq, which is not freely available... but
looks beautiful (see attached).
> In a different matter, I see how \XeTeXcharclass could be useful
> for other things... For example, someone wrote an extension to
> ArabTeX to colorize certain categories of graphemes, e.g. vowel
> signs. This can be done manually with XeTeX as follows:
>
> \usepackage{xltxtra,fontspec}
> \usepackage{arabxetex}
> \newcommand{\colorblue}{\addfontfeature{Color=0000FF}}
> \newcommand{\colorred}{\addfontfeature{Color=FF0000}}
> \newcommand{\colorblack}{\addfontfeature{Color=FFFFFF}}
> \setmainfont{Junicode}
> \newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
> \begin{document}
> \begin{Arabic}[voc]\Large % The name Muṣṭafā مُصطَفَى ...
> m\char"200D\colorred\char"200D u\char"200D\colorblack\char"200D
> % .s.t\char"200D\colorred\char"200D a\char"200D\colorblack\char"200D
> % f\char"200D\colorred\char"200D a\char"200D\colorblack\char"200D "Y
> \end{Arabic}
> \end{document}
While this will "sort of" work, note that breaking up an Arabic word
like this will prevent any OpenType features that rely on context
being used properly. The insertion of \char"200D can give you
connecting forms of the letters (though you'd have to be careful not
to insert them after right-linking letters), but a font with more
complex cursive forms than the "basic 4" shapes will lose the context
needed for proper glyph selection. Even in a simple font like
Scheherazade, you'll lose the proper positioning of vowel signs via
mark-to-base positioning rules.
> If the insertion of font features at the level of font mappings
> were possible (is this at all feasible, Jonathan?), this could be
> implemented quite easily with TECkit...
No, not at present. Font mappings operate strictly on the character
sequence that is actually going to be rendered in a given font --
where a "font" is a specific instance within XeTeX of a font at a
particular size and with a certain set of features.
> Now I have tried to achieve the same with \XeTeXcharclass ...
> [snip]
> Unfortunately, as you can see in the attached output
> (xetexcharclass.pdf), the insertion of tokens within an Arabic word
> cuts it into many disconnected pieces... Is there any way to avoid
> this?
Again, not under the current implementation of OpenType shaping.
As soon as you start breaking the character sequence, inserting any
kind of commands, changing font attributes, etc, between the letters,
the resulting segments of the text will be shaped separately. To do
anything different raises all sorts of questions as to how context is
propagated across the "gaps" in the character stream, and what
attribute changes can reasonably be allowed without necessarily
breaking the shaping rules.
All this is something that would be interesting to explore in the
future, but it is a complex area.
JK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arabxetex-urdu.pdf
Type: application/pdf
Size: 13563 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070625/f82c5cf4/attachment.pdf
-------------- next part --------------
More information about the XeTeX
mailing list