1

I wanted to use a custom arabic otf font symbols, which you can find a table of the characters here

\documentclass{article}
\usepackage{fontspec}

\newfontfamily\arbsym{arabic_symbols.otf}

\begin{document}
{\arbsym z}
\end{document}

the displayed output of the code above is just a plain square of an undefined symbol.

How can i use this font in my document ?.

4
  • I'm not sure that character table refers to the font you mention.
    – egreg
    May 16, 2018 at 9:06
  • i tested the font in the link on text editors, and the corresponding ascii characters maps to the symbols. May 16, 2018 at 9:13
  • As far as I can see, XeTeX is not able to see any character in the font.
    – egreg
    May 16, 2018 at 9:23
  • Yes, that's the problem, the font works well installed on my system in text editors, so I'm wondering why it doesn't work on XeLatex (or LuaTex) May 16, 2018 at 10:09

1 Answer 1

1

I downloaded the font, which comes under the name Symbols1_Ver02.otf.

Apparently, the glyphs are not encoded into specific slots and the developers were confident that the operating system is fooled into using the glyphs in the ASCII slots. This doesn't happen with XeTeX.

However, you can call the glyphs by their number in the table.

\documentclass{article}
\usepackage{fontspec}

\newfontface\arbsym{Symbols1_Ver02.otf}
\newcommand{\arabicsymbol}[1]{{\arbsym\XeTeXglyph #1}}

\begin{document}

\arabicsymbol{1}
\arabicsymbol{2}
\arabicsymbol{3}
\arabicsymbol{4}

\end{document}

enter image description here

This works with XeLaTeX. There should be also some method with LuaLaTeX.

1
  • I thought that the problem was from the font, thanks. May 16, 2018 at 12:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .