# Setting \familydefault as \sfdefault is causing the arrow character → to throw Package textcomp Error: Symbol \textrightarrow not provided

Minimal example:

\documentclass[12pt,a4paper,english]{abntex2}
\usepackage[utf8]{inputenc}

\usepackage[full]{textcomp}
\usepackage{mathcomp}
\usepackage{helvet}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}

N → bo.

\end{document}

Compiling it results in:

./main.tex:12: Package textcomp Error: Symbol \textrightarrow not provided by
(textcomp)                font family phv in TS1 encoding.

See the textcomp package documentation for explanation.
Type  H <return>  for immediate help.
...

l.12 N →
bo.
./main.tex:12:  ==> Fatal error occurred, no output PDF file produced!

If I remove the \renewcommand{\familydefault}{\sfdefault} or \usepackage{helvet}, it works fine without any error.

If I remove \usepackage[full]{textcomp}, then, the error is:

./main.tex:12: Package inputenc Error: Unicode char → (U+2192)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
...

l.12 N →
bo.
./main.tex:12:  ==> Fatal error occurred, no output PDF file produced!

How can I make the \renewcommand{\familydefault}{\sfdefault} work properly?

Related:

root@debian9:~# latex --version
pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian)
kpathsea version 6.2.2
Copyright 2016 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.28; using libpng 1.6.28
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.48.0
• You can avoid the error with \usepackage[full,warn]{textcomp} , but the arrow will be not be from helvet, as the font doesn't have it. – Ulrike Fischer Nov 20 at 8:16
• @UlrikeFischer would you extend your comment to an answer. I searched the internet for \usepackage[full,warn]{textcomp} and this string did not appear in my search engine results (google). It seems that including this in the posted document is a good answer. – corporal Nov 20 at 10:06

The helvet font doesn't have the arrow. You can change the error to a warning with the warn option. Then textcomp will only add a warning to the log and substitute the arrow from another font. Using tgheros instead of helvet is better:

\documentclass[12pt,a4paper,english]{abntex2}
\usepackage[utf8]{inputenc}

\usepackage[full,warn]{textcomp}
\usepackage{mathcomp}
\usepackage{helvet}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}

N → bo.

\end{document}

• +1 good answer as usual – corporal Nov 20 at 10:42

The helvet package uses only the characters provided by the original Helvetica that is part of the PostScript default fonts, most of the time via Nimbus Sans (URW Clone). TeX Gyre Heros is an extension of Nimbus Sans that supports the right arrow in text mode. Assuming that the class is actually unrelated to your problem:

\documentclass[12pt,a4paper,english]{article}
\usepackage[utf8]{inputenc}

\usepackage[full]{textcomp}
\usepackage{mathcomp}
\usepackage{tgheros}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}

N → bo.

\end{document}

Result:

Since you are using Debian, you need to have fonts-texgyre installed.