LaTeX forum ⇒ Fonts & Character SetsFont 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

Postby Viridis » Wed Mar 04, 2020 7:16 pm

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:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[a4paper,12pt,dutch]{article}
  2. \usepackage[utf8x]{inputenc}
  3. \usepackage{opensans} %% <------------ !!! %%
  4. \usepackage{babel}
  5. \usepackage[dvips]{graphicx}
  6. \usepackage{ulem} %%(durchstreichen)
  7. \usepackage{multicol}
  8. \usepackage{eurosym}
  9. \usepackage{chemformula}
  10. \usepackage{amsmath,amsfonts,amssymb} %% for Math %%
  11. \usepackage{marginnote}
  12. \usepackage{etoolbox}
  13. \usepackage{rotating}
  14. \usepackage{framed}
  15. \usepackage{color}
  16. \definecolor{mygray}{gray}{0.6}
  17. \makeatletter
  18. \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}
  19. \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}
  20. \reversemarginpar
  21. \makeatother
  22. \usepackage{geometry}
  23. \textwidth=390pt %5cm
  24. \usepackage{cancel}
  25. \usepackage{color}
  26. \definecolor{Blue}{rgb}{0,0,1}
  27. \definecolor{Red}{rgb}{1,0,0}
  28. \newcommand{\colorcancel}[2]{\renewcommand{\CancelColor}{\color{#2}}\cancel{#1}}


My log says:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. [ ... ]
  2. (/usr/share/texmf/tex/latex/opensans/opensans.sty
  3. (/usr/share/texlive/texmf-dist/tex/latex/fontaxes/fontaxes.sty)
  4. (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
  5. (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
  6. (/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
  7. (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
  8. (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
  9. (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)))))
  10. (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
  11. (/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)
  12. (/usr/share/texlive/texmf-dist/tex/generic/babel-dutch/dutch.ldf
  13. [ ... ]


Thanks for any helping suggestions.

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

Bartman
Posts: 35
Joined: Fri Jan 03, 2020 2:39 pm

Postby Bartman » Wed Mar 04, 2020 7:59 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

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \renewcommand{\familydefault}{\sfdefault}


into your preamble.

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

Postby Viridis » Sun Mar 08, 2020 7:08 pm

I followed your advice, but still no luck.

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?

[edit] 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

Postby Viridis » Mon Mar 09, 2020 8:15 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}

Following had to be disabled, since it loads CM-sans:
\renewcommand*\familydefault{\sfdefault}
\sffamily (after \begin{document})

And I had to pass the option 'default' to \usepackage{opensans}


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 1 guest