What's the internal font name of the Kp-Fonts?

The fonts depend on the options you pass to the package. I have not checked the package file, but I presume you did not enclose your code within \makeatletter and \makeatother, as the following works:

(the font names are printed using the roman family kpfont, with the corresponding options except for the third example where I switched to the Computer Modern font to print the names)

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[lighttext,oldstylenums]{kpfonts}
\begin{document}

\makeatletter
jkpss\kp@petitesmajuscules\kp@flig\kp@style
\makeatother

\sfdefault

\end{document}

output

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[lighttext,veryoldstyle]{kpfonts}
\begin{document}\pagestyle{empty}

\makeatletter
jkpss\kp@petitesmajuscules\kp@flig\kp@style
\makeatother

\sfdefault

\end{document}

output

In this third example I use another font to print the names, so as to address the point raised in a comment by Scott H.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[lighttext,veryoldstyle,largesmallcaps]{kpfonts}
\begin{document}\pagestyle{empty}
\usefont{T1}{cmr}{m}{n}

\makeatletter
jkpss\kp@petitesmajuscules\kp@flig\kp@style
\makeatother

\sfdefault

\end{document}

output


As I already commented, the low level names of all Kp-Font variants are documented in the manual. But I must admit, that this may be hard to understand.

So I thought, I should show some examples here. Regarding your question in comments see at the end.

\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage{lmodern} % "Latin Modern" as default font set

\newcommand*{\testfont}[2]{\textsf{#1 (\texttt{#2}):} {\fontfamily{#2}\selectfont
                           Best off (sic!) 1234567890 Questions}\par}

\setlength{\parindent}{0pt}

\begin{document}

\section*{Examples for low level names of Kp-Fonts}

\testfont{Roman}{jkp}
\testfont{Roman light}{jkpl}
\testfont{Roman, large smallcaps}{jkpk}
\testfont{Roman light, no f-ligatures}{jkplf}
\testfont{Roman, large smallcaps, old style numbers}{jkpkosn}
\testfont{Roman light, oldstyle}{jkplos}
\testfont{Roman, very oldstyle}{jkpvos}

\smallskip

\textsc{\fontfamily{jkp}\selectfont Usual SmallCaps vs.\\
        \fontfamily{jkpk}\selectfont Large SmallCaps}

\bigskip

\testfont{Sans Serif}{jkpss}
\testfont{Sans Serif, large smallcaps}{jkpssk}
\testfont{Sans Serif, no f-ligatures}{jkpssf}
\testfont{Sans Serif, oldstyle}{jkpssos}
\testfont{Sans Serif, very oldstyle}{jkpssvos}

\smallskip

\textsc{\fontfamily{jkpss}\selectfont Usual SmallCaps vs.\\
        \fontfamily{jkpssk}\selectfont Large SmallCaps}

\bigskip

\testfont{Teletype}{jkptt}
\testfont{Teletype, oldstyle numbers}{jkpttosn}
\testfont{Teletype, oldstyle}{jkpttos}
\testfont{Teletype, very oldstyle}{jkpttvos}

\end{document}

code output

For your document you should define one or two commands depending on, what you like better. I will use here the basic Kp-Font roman, as seen above it is jkp:

  • A switch similar to \rmfamily or \bfseries: \newcommand{\kproman}{\fontfamily{jkp}\selectfont}, but then you have to set it in a group. Compare what I did in the example inside of \newcommand*{\testfont}.

  • Similar to \textrm or \textbf a grouping command: \newcommand{\textkproman}[1]{{\fontfamily{jkp}\selectfont#1}}, note the doubled braces for the grouping.

Tags:

Fonts

Kpfonts