3

I'm trying to install Source Sans Pro from CTAN [1] on a TeX Live system. My OS/TeX system is ubuntu 12.04 "precise" and TeXLive 2009-15. I don't have root rights so I can't switch to a newer version or add an extra repository, so it'll have to be a manual installation in `~/texmf'.

I'm following all the usual steps and I've spent half a day trying to find out what I'm doing wrong (including reading StackExchange) so I thought I'd ask here in case someone immediately spots what I've missed.

  • $TEXMFHOME => $HOME/texmf
  • unzip the file from [1] and place all files in their correct directory, so tfms are in ~/texmf/fonts/tfm/sourcesanspro etc. - this is the same directory layout as my /usr/share/texmf for the packages installed with the package manager
  • run mktexlsr/texhash, it correctly finds my ~/texmf directory.
  • run updmap --enable Map=SourceSansPro.map and updmap
  • texhash again

Here's my test document:

\documentclass{article}
\usepackage[default]{sourcesanspro}
\begin{document}
This is a test.
\end{document}

And I get (I manually replaced my homedir with ~):

(~/texmf/tex/latex/mweights/mweights.sty))
(./font.aux) (/usr/share/texmf-texlive/tex/latex/ly1/ly1ptm.fd)
(~/texmf/tex/latex/sourcesanspro/T1SourceSansPro-LF.f
d) [1{~/.texmf-var/fonts/map/pdftex/updmap/pdftex.map
}] (./font.aux)
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 SourceSansPro-Regular-lf-t1--base
mktexpk: don't know how to create bitmap font for SourceSansPro-Regular-lf-t1--base.
kpathsea: Appending font creation commands to missfont.log.
)
!pdfTeX error: pdflatex (file SourceSansPro-Regular-lf-t1--base): Font SourceSansPro-Regular-lf-t1--base at 600 not found
==> Fatal error occurred, no output PDF file produced!

Ok, let's check for the file:

$ find ~/texmf -name 'SourceSansPro-Regular-lf-t1--base*'
~/texmf/fonts/tfm/sourcesanspro/SourceSansPro-Regular-lf-t1--base.tfm

What can I try next?

[1] http://www.ctan.org/tex-archive/fonts/sourcesanspro

  • 2
    The problem is not the tfm. pdflatex doesn't find the "real" font. Add \pdfmapfile{=SourceSansPro.map} to your document. If it works then you will have to find out why updmap didn't work correcty. E.g. check if it is actually changing the pdftex.map in ~/.texmf-var/fonts/map/pdftex/updmap/pdftex.map – Ulrike Fischer Apr 24 '14 at 13:08
  • Use \pdfmapfile{+SourceSansPro.map} to add the fragment rather than replacing the file. I realise it is only for testing, but it is also a useful way to get stuff working until you figure out the problem, – cfr Apr 24 '14 at 22:56
0

Step 4 is probably what you have been missing. Have a look at it (I was having the same issue with Fira font).

https://www.tug.org/fonts/fontinstall.html

| improve this answer | |
1

Use lualatex instead of pdflatex and the following should work:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{SourceSansPro}
\begin{document}
    This is a test.
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy