LaTeX forum ⇒ 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

Postby AleCes » Mon Feb 29, 2016 11:06 pm

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
(8.7 KiB) Downloaded 202 times

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

Postby rais » Tue Mar 01, 2016 10:15 am

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)
  1. 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

Postby AleCes » Tue Mar 01, 2016 10:37 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'.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9501
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Mar 02, 2016 12:57 am

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
Site admin

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

Postby AleCes » Wed Mar 02, 2016 1:37 am

Hello Stefan_K,

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

Thanks

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

Postby rais » Wed Mar 02, 2016 11:33 am

AleCes wrote:OK, so how can I do so that it compiles?

check the path to the pfb file
  1. 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
  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

Postby AleCes » Wed Mar 02, 2016 11:09 pm

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

  1. kpsewhich ae_almohanad_xxbold.pfb


returns:

  1. /usr/share/texlive/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb

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

Postby rais » Thu Mar 03, 2016 11:15 am

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

Postby AleCes » Fri Mar 04, 2016 1:18 am

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

  1. kpsewhich ae_almohanad_xxbold.pfb


returned

  1. /usr/share/texlive/texmf-dist/fonts/type1/arabi/arabeyes/ae_almohanad_xxbold.pfb

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

Postby rais » Fri Mar 04, 2016 3:38 am

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.
  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


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 1 guest