Fonts & Character Setsarfonts 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

Post by AleCes »

Hello,

Code: Select all

\documentclass{article}
% Remember that 'arfonts.sty' must be in the same directory as this file
\usepackage[utf8]{inputenc}
\usepackage[LAE, T1]{fontenc}
\usepackage[arabic]{babel}
\usepackage[free]{arfonts}

\begin{document}

\section{مقدمة}

\end{document} 
Gives me the following error:

Code: Select all

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

arfonts package can't find fonts

Post by rais »

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)

Code: Select all

ln -s /usr/local/texlive/2015/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb ae_AlMohanad_xxbold.pfb
(assuming Linux with TL standard path)

KR
Rainer
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

arfonts package can't find fonts

Post by AleCes »

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:

Code: Select all

LaTeX Warning: You have requested package `arfonts',
               but the package provides `ARfonts'.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

arfonts package can't find fonts

Post by Stefan Kottwitz »

Hi AleCes!
AleCes wrote:Yes, I also get this warning:

Code: Select all

LaTeX Warning: You have requested package `arfonts',
               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:

Code: Select all

\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
LaTeX.org admin
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Re: arfonts package can't find fonts

Post by AleCes »

Hello Stefan_K,

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

Thanks
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

arfonts package can't find fonts

Post by rais »

AleCes wrote: OK, so how can I do so that it compiles?
check the path to the pfb file

Code: Select all

kpsewhich ae_almohanad_xxbold.pfb
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

Code: Select all

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

arfonts package can't find fonts

Post by AleCes »

Hi, I tried what you suggested yet it still doesn't work.

Code: Select all

kpsewhich ae_almohanad_xxbold.pfb
returns:

Code: Select all

/usr/share/texlive/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

arfonts package can't find fonts

Post by rais »

well then, first check, if type1 fonts are searched for in current folder

Code: Select all

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

Code: Select all

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

Code: Select all

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

arfonts package can't find fonts

Post by AleCes »

The paths do not match.

Code: Select all

ls -l
returns

Code: Select all

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

Code: Select all

kpsewhich ae_almohanad_xxbold.pfb
returned

Code: Select all

    /usr/share/texlive/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

arfonts package can't find fonts

Post by rais »

AleCes wrote:The paths do not match.
Mea culpa, I did not think about a link name already in existance...
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.

Code: Select all

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
Post Reply