## LaTeX forum ⇒ Fonts & Character Sets ⇒ Font installation fail: Installed Opensans, but CM instead

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Viridis
Posts: 3
Joined: Wed Mar 04, 2020 7:00 pm

### Font installation fail: Installed Opensans, but CM instead

Hallo LaTeX-community,

I tried to install opensans.tds.zip (CTAN) by copying the directories of the zip-file into my /usr/share/texmf (Yes, Linux user here). After that I run 'mktexlsr' and 'updmap-user --enable Map opensans.map' (as root).
In my LaTeX document, I said: \usepackage{opensans}

But, instead of using this beautiful font, it used the ugly Computer Modern fallback font.
Something went terribly wrong ...

During installation and font activation, there were no error messages.

The preamble:

My log says:
[ ... ](/usr/share/texmf/tex/latex/opensans/opensans.sty(/usr/share/texlive/texmf-dist/tex/latex/fontaxes/fontaxes.sty)(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)))))(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)(/usr/share/texlive/texmf-dist/tex/generic/babel-dutch/dutch.ldf[ ... ]

Thanks for any helping suggestions.

Ulrich Viridis
Last edited by cgnieder on Sun Mar 08, 2020 10:51 am, edited 1 time in total.

Bartman
Posts: 71
Joined: Fri Jan 03, 2020 2:39 pm
I use Windows and MiKTeX.

opensans is available on CTAN and should be installed with the TeX-Live-Manager tlmgr. The program should be available if you have installed the original version of TeX Live and not the version that comes with the linux distribution.

It sounds like you want to replace the serif font with the loaded sans serif. In this case, nothing went wrong. That is the intended result.

To change from serif font to sans serif, you have to insert

\renewcommand{\familydefault}{\sfdefault}

Viridis
Posts: 3
Joined: Wed Mar 04, 2020 7:00 pm

I used a virtual machine and did an installation of TEX-live and texlive-fonts-extra package. But all I see in the PDF-file is CM and other (unrecognised) font. Opensans is absent!
I don't receive any error or warning messages.

Bartman: what do you mean with: "if you have installed the original version of TeX Live and not the version that comes with the linux distribution."? Is there any difference, beside a minor difference in version number?

 I uninstalled the TEX-live from the repository, and am doing a clean install with "install-tl". Let's see if this works ...
[edit 2] After switching to the new installation method, I'm no longer able to compile my document ("unable to start LaTeX / PDFLaTeX"). Of course, I followed all the guidelines for installation (PATH=/usr/local/texlive/2019/bin/x86_64-linux:\$PATH).

Viridis
Posts: 3
Joined: Wed Mar 04, 2020 7:00 pm
I succeeded!

This preamble works:
\documentclass[a4paper,12pt,dutch]{article}
\usepackage[utf8]{inputenc} %% x
\usepackage[T1]{fontenc}
\usepackage[dutch]{babel}
\usepackage[default,oldstyle,scale=0.95]{opensans}
\usepackage{lmodern}