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

I have checked thekpfonts.sty:

\renewcommand{\sfdefault}{jkpss\kp@petitesmajuscules\kp@flig\kp@style}


It seems that this name jkpss\kp@petitesmajuscules\kp@flig\kp@style is not correct. So what's the real name of this font?

So how to invoke Kpfonts as a second font?

-
The low level font names are documented in the manual! \kp@petitesmajuscules\kp@flig\kp@style is a series of 3 LaTeX commands, which are replaced according to the package options you give. This is shown in jfbu’s answer. –  Speravir Jan 21 '13 at 18:57

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}


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:


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

-

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}


\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}


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}


-
As I commented to the question, the low level names are documented (it is perhaps a bit hard to understand), so your fine approach is actually not needed. –  Speravir Jan 21 '13 at 19:05
Just to head off any confusion, in the examples that use veryoldstyle a "long s" is being used rather than the usual s in the printed font name. So for example, the internal name in the second example would be typed jkpssvos (I think) rather than what appears at first glance to be jkpffvof. –  Scott H. Jan 21 '13 at 19:09
@Speravir, @ScottH.: @Speravir you were right to point out to the OP that these were LaTeX commands. @ScottH.: good point, I have edited my anwer. –  jfbu Jan 21 '13 at 19:15
So I was wondering, how to use Kp-Font as a second font for a whole document. For instance, while the main font is Times, how to invoke the Kp-Font? –  KOF Jan 21 '13 at 21:02
@KOF Kp-Fonts has extensive math support, so it would be sad not to load the package. You can load the package, do \let\kprmfont\rmdefault \let\kpsffont\sfdefault, \let\kpttfont\ttdefault then load another font package and when you want to use the Kp-Fonts do \usefont{T1}{\kprmfont}{m}{n} or \fontfamily{\kprmfont}\selectfont for roman or \fontfamily{\kpsffont}\selectfont for sans etc... –  jfbu Jan 21 '13 at 22:33