fontspec icon indicating copy to clipboard operation
fontspec copied to clipboard

Weird annoying fontspec BUG

Open vafa-khalighi opened this issue 3 years ago • 1 comments
trafficstars

Description

If you use Graphite Renderer and arabic script, then fontspec complain that the selcted font does not contain arabic script and the text is not rendered correctly.

For the purpose of this bug report, you can test using AWAMI NASTALIQ font.

This issue does not happen in Plain TeX or when using \font control sequence directly in LaTeX. See my second minimal example.

The Script=Arabic is needed since XeTeX does some unicode bidi; without this, parentheses, etc will be wrong.

Check/indicate

  • [x] Relevant for XeTeX
  • [ ] Relevant for LuaTeX
  • [ ] Issue tracker has been searched for similar issues?
  • [ ] Links to <tex.stackexchange.com> discussion if appropriate

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{fontspec}
\setmainfont{AwamiNastaliq-Regular}[Path,Renderer=Graphite,Script=Arabic]
\begin{document}
وفا
\end{document}

and here is the plain tex one.

\font\test="[AwamiNastaliq-Regular]/GR:script=arab" at 20pt
\test
وفا
\bye

Further details

vafa-khalighi avatar Feb 19 '22 16:02 vafa-khalighi

Well the documentation of fontspec writes

Currently fontspec does not support a convenient interface to select Graphite font features and all selection must be done via ‘raw’ font feature selection.

so use

  \setmainfont{AwamiNastaliq-Regular}[Path,Renderer=Graphite,RawFeature={script=arab;}]

u-fischer avatar Feb 19 '22 16:02 u-fischer

@wspr Please have a look at this.

niruvt avatar May 04 '24 04:05 niruvt

@niruvt — thanks for making the connection

wspr avatar May 06 '24 00:05 wspr

@wspr Thanks a lot for the fix!

niruvt avatar May 06 '24 04:05 niruvt