# kpfonts changes appereance of textcomp symbols

I'm using the genealogic symbols \textborn and \textdied from the textcomp package together with the kpfonts.

Unfortunately kpfonts loads textcomp with the [full] option (unless someone specifies notextcomp) but seems to modify the appereance of said symbols.

If you try out the following example with and without kpfonts you will observe that the symbols get changed to a much heavier, darker version when loading kpfonts.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[full]{textcomp}
%\usepackage{kpfonts}

\begin{document}

\textborn\,1984, \textdied\,2005

\end{document}


I would like to use the original version of these symbols while staying with kpfonts. To achieve this I tried saving them using \let with no success.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[full]{textcomp}
\let\oldtextdied\textdied
\let\oldtextborn\textborn
\usepackage{kpfonts}

\begin{document}

\textborn\,1984, \textdied\,2005

\oldtextborn\,1984, \oldtextdied\,2005

\end{document}


Also loading kpfonts with notextcomp and textcomp on its own doesn't change this behavior.

Any ideas how to preserve the original appereance of these symbols?

• You can use \usepackage[euro,warn]{textcomp} \usepackage[notextcomp]{kpfonts} but it will affect other chars too. – Ulrike Fischer Apr 16 '15 at 9:08

A full solution that neutralizes the pesky encoding specific commands:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[full]{textcomp}
\usepackage{kpfonts}

\DeclareTextSymbol{\textbornstd}{TS1}{98}
\DeclareTextSymbol{\textdiedstd}{TS1}{100}
\UndeclareTextCommand{\textborn}{TS1}
\UndeclareTextCommand{\textdied}{TS1}
\makeatletter
\DeclareTextCommandDefault{\textbornstd}{\tc@check@symbol2\textbornstd}
\DeclareTextCommandDefault{\textdiedstd}{\tc@check@symbol2\textdiedstd}
\makeatother
\DeclareRobustCommand{\textborn}{{\fontfamily{cmr}\selectfont\textbornstd}}
\DeclareRobustCommand{\textdied}{{\fontfamily{cmr}\selectfont\textdiedstd}}

\begin{document}

\textborn\,1984, \textdied\,2005

\end{document}


This is the output

This is the output when \usepackage{kpfonts} and the added code are commented out

So you see that the European Modern TS1 glyphs are used in both cases.

A hacky solution:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{kpfonts}
\newcommand{\oldtextdied}{{\fontfamily{cmr}\selectfont\textdied}}
\newcommand{\oldtextborn}{{\fontfamily{cmr}\selectfont\textborn}}

\begin{document}

\textborn\,1984, \textdied\,2005

\oldtextborn\,1984, \oldtextdied\,2005

\end{document}


The problem here is not that the package loads textcomp. That’s no longer needed explicitly, since it’s part of the LaTeX kernel now, but that lets you use these symbols in 8-bit TeX at all. It’s that kpfonts comes with a companion font that covers those symbols, and you don’t like it.

So, you can change the companion font used with the TS1 encoding back to Computer Modern, using substitutefont.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage[full]{textcomp} % No longer needed as of 2020
\usepackage{kpfonts}
\usepackage{substitutefont}

\substitutefont{TS1}{\rmdefault}{cmr}
\substitutefont{TS1}{\sfdefault}{cmss}

\begin{document}

\textborn~1984, \textdied~2005

\end{document}


As of 2020, you can remove both the inputenc and the textcomp packages from your preamble. A current version of LaTeX will load them both by default.

On a minor unrelated note, you probably want these symbols to be separated from the date by a non-breaking space, ~, rather than \,. This way, TeX will never break a line between the symbol and the date.

Using

\usepackage[euro,warn]{textcomp}
\usepackage[notextcomp]{kpfonts}


worked for the \textmarried :) Thanks David Woitkovski.