## LaTeX forum ⇒ Fonts & Character Sets ⇒ arfonts package can't find fonts

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

### arfonts package can't find fonts

Hello,

1. \documentclass{article}
2. % Remember that 'arfonts.sty' must be in the same directory as this file
3. \usepackage[utf8]{inputenc}
4. \usepackage[LAE, T1]{fontenc}
5. \usepackage[arabic]{babel}
6. \usepackage[free]{arfonts}
7.
8. \begin{document}
9.
10. \section{مقدمة}
11.
12. \end{document}

Gives me the following error:

1. !pdfTeX error: /usr/bin/pdflatex (file ae_AlMohanad_boldItalic.pfb): cannot ope
2. n Type 1 font file for reading
3. ==> Fatal error occurred, no output PDF file produced!
Attachments
arfonts.sty
This file must be in the same directory as the .tex file

rais
Posts: 263
Joined: Sun Nov 16, 2014 8:51 pm
Hi,
just the style file isn't enough, you need to install all of the Arabi package.
In TeXLive, it's part of collection-langarabic.
If you still get that message, do you also get this?
LaTeX Warning: You have requested package arfonts',
but the package provides ARfonts'.

You could try (in the folder your .tex file sits in)

(assuming Linux with TL standard path)

KR
Rainer

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm
Hello rais,

I have texlive-full installed, I think that's enough.

I also executed the command ln -s from the directory where my .tex file is found but it still refuses to compile.

Yes, I also get this warning:

1. LaTeX Warning: You have requested package arfonts',
2. but the package provides ARfonts'.

Stefan Kottwitz
Posts: 9565
Joined: Mon Mar 10, 2008 9:44 pm
Hi AleCes!

AleCes wrote:Yes, I also get this warning:
1. LaTeX Warning: You have requested package arfonts',
2. but the package provides ARfonts'.

I think that's just a small error of the package, since the file name is small letters but the file arfonts.sty writes:

1. \ProvidesPackage{ARfonts}[2006/01/01 Part of the Arabi package]

It's just a warning, you can ignore it here. Generally, it's a warning to not load a package by mistake, but here it's no mistake.

Stefan

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm
Hello Stefan_K,

OK, so how can I do so that it compiles?

Thanks

rais
Posts: 263
Joined: Sun Nov 16, 2014 8:51 pm
AleCes wrote:OK, so how can I do so that it compiles?

check the path to the pfb file

if this doesn't return the path to that file, Arabi may not be complete; however, I'd suspect it's in a different location on your system.
Adapt the ln -s call accordingly, or use backticks
1. ln -s kpsewhich ae_almohanad_xxbold.pfb ae_AlMohanad_xxbold.pfb

The trouble is, this pfb file is searched for with mixed lower/uppercase letters, but provided is a file all in lowercase letters...

KR
Rainer

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm
Hi, I tried what you suggested yet it still doesn't work.

returns:

rais
Posts: 263
Joined: Sun Nov 16, 2014 8:51 pm
well then, first check, if type1 fonts are searched for in current folder
1. kpsewhich -show-path="type1 fonts"

Several entries are separated by a colon (:), the current folder or working directory is represented by a single period (.), which is usually the first entry, so the output should start with .:

If that's the case, check the link you have created in the folder with your TeX-file
1. ls -l

there should be one entry starting with lrwxrwxrwx, ending with ae_AlMohanad_xxboldx.pfb -> /usr/share/texlive/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb

Take great care in checking the path right of the arrow (->) really matches the output from the kpsewhich ae_almohanad_xxbold.pfb' above and confirm the name left of the arrow really matches the name from your error message.

And try to compile your TeX-file from the console
1. pdflatex name-of-your-TeX-file

(all commands above to be called from the same directory your TeX-file resides in)

KR
Rainer

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm
The paths do not match.

1. ls -l

returns

1. lrwxrwxrwx 1 alessandro alessandro 85 mars 1 21:24 ae_AlMohanad_xxbold.pfb -> /usr/local/texlive/2015/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb

while

returned

rais
Posts: 263
Joined: Sun Nov 16, 2014 8:51 pm
AleCes wrote:The paths do not match.

You have to delete the link name (rm ae_AlMohanad_xxbold.pfb), before attempting to link it to a different location ... or add -f' as in force' to the ln call, e.g.
1. ln -sf kpsewhich ae_almohanad_xxbold.pfb ae_AlMohanad_xxbold.pfb

OTOH, you should have gotten a message from ln (without -f) such as
ln: creating symbolic link ae_AlMohanad_xxbold.pfb': File exists''
after the first attempt (with the wrong path)

KR
Rainer