[XeTeX] xelatex not connecting letters in awami nastaliq font
Jonathan Kew
jfkthame at gmail.com
Sun Feb 21 19:28:28 CET 2021
On 21/02/2021 14:55, Kamal Abdali wrote:
> Thank you Lorna and Jonathan for solving the problem.
>
> Jonathan, I almost always need fontspec options like
> [Script=Arabic,Scale=xx,WordSpace=yy] because different nastaliq fonts
> seem to have very different letter sizes and word spacing behaviors.
> Moreover, for some reason the Noto Nastaliq Urdu font doesn't connect
> letters if the Script=Arabic option is omitted.
Noto Nastaliq Urdu is an OpenType font; OpenType requires that the
correct script is specified so that it knows what shaping engine to use.
(There's a default "generic" shaper that is used for Latin & other
simple scripts, so in that case nothing needs to be explicitly
specified, but Arabic and other "complex" scripts require the script to
be specified so that script-specific rules can be applied.)
Awami Nastaliq is a Graphite font; no script option is required as the
shaping behavior is encoded entirely within the font; the engine is
script-independent.
So the Script option is not relevant for Awami, but you do need the
Renderer=Graphite option to use the proper font engine. (The default
word spacing in Awami should generally be quite good, especially if you
use the \XeTeXinterwordspaceshaping=1 setting, but I assume it would
still work to adjust it if you wish.)
JK
>
> Kamal Abdali
>
> On Sun, Feb 21, 2021 at 5:33 AM Jonathan Kew <jfkthame at gmail.com
> <mailto:jfkthame at gmail.com>> wrote:
>
> On 21/02/2021 03:27, Lorna Evans wrote:
> > Awami Nastaliq is a Graphite font. In XeTeX you would need to say
> "Awami
> > Nastaliq/GR". I'm not sure if that syntax would work in XeLaTeX, but
> > somehow you have to indicate Graphite.
> >
>
> The xelatex/fontspec way to say this would be
>
> \newfontfamily\urdufont[Renderer=Graphite]{Awami Nastaliq}
>
> (You might also want to add the option
>
> \XeTeXinterwordspaceshaping=1
>
> to your document, for better word spacing results.)
>
> JK
>
> > On Sat, Feb 20, 2021, 6:24 PM Kamal Abdali <kabdali at gmail.com
> <mailto:kabdali at gmail.com>
> > <mailto:kabdali at gmail.com <mailto:kabdali at gmail.com>>> wrote:
> >
> > XeLaTeX (in combination with Polyglossia) is not rendering
> the Awami
> > Nastaliq font properly. The letters in this font are being
> displayed
> > without being connected together. I haven't encountered this
> problem
> > with any other nastaleeq font. Nor have I seen this problem when
> > using Awami in word processors.
> >
> > %demo.tex
> > \documentclass[letterpaper]{article}
> > \usepackage{polyglossia}
> > \setmainlanguage{urdu}
> > \newfontfamily\urdufont[Script=Arabic]{Awami Nastaliq}
> > \newfontfamily\altnast[Script=Arabic]{Jameel Noori Nastaleeq}
> % or
> > any other nastaliq font
> > \setlength\parindent{0pt}
> > \begin{document}
> > عوامی نستعلیق\\
> > \altnast{جمیل نوری نستعلیق}
> > \end{document}
> >
> > demo.pdf attached.
> >
> > Kamal Abdali
> >
>
More information about the XeTeX
mailing list.