1

Working on a project, I have changed the standard typeface with the following lines:

\usepackage{libertine}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}

However, later on, I wish to use and stylize another typeface.

{\fontfamily{boisik}\selectfont \huge Sample Text Here!}

However, the font supports (and I wish to use) the

\scshape{\bfseries{Sample Test Here!}}

commands. But when I do, the default typeface overrides. Is there a way I can get a line that achieves the functionality that I want similar to:

{\fontfamily{boisik}\selectfont \huge \scshape{\bfseries{Sample Text Here!}}}

? Thanks for your time and help!

  • Seen this? https://tex.stackexchange.com/questions/25249/how-do-i-use-a-particular-font-for-a-small-section-of-text-in-my-document – JamesNZ Feb 05 '16 at 22:37
  • I have. Several times. But regardless of what I try to do, whenever I invoke \selectfont (even if I change the \rmdefault to boisik), it goes back to the LaTeX default Roman style. – Glib Dolotov Feb 05 '16 at 22:53
  • Are you sure you want to use a bitmap font? It will not scale well and some PDF viewers will display it horribly. However, if you really are sure, then you need \fontencoding{OT1} as well, because it is not available in T1 as far as I can tell. Also, note that \scshape does not take an argument. And please post a complete minimal example rather than a code fragment, which is much less useful. We should be able to copy-paste-compile and see the problem. – cfr Feb 05 '16 at 23:06
  • Also, that is not the name of the font family. And there is no bold small-caps. Do you want bold or small-caps? You can't have both ;). – cfr Feb 05 '16 at 23:10

1 Answers1

1

Please always provide a complete minimal document rather than a mere fragment, which is much less useful when trying to help

There are three problems here.

  1. There is no font family with the name you are using known to LaTeX. The name of the font family you probably want is bsk.

  2. Boisik is not provided in the T1 encoding.

  3. Boisik does not include bold small-caps. You can have bold. Or you can have small-caps. You cannot have both.

Note that it pays to take a look at your console output which tells you when it substitutes a different font and why.

Note, too, that boisik is not provided in scalable format: it is provided only as MetaFont source which means that the results will not scale well and will display very poorly in some PDF viewers, for example. This is not a problem per se, but it is a limitation you should be aware of.

Regarding the three problems, 1 is no issue: we just need the right name.

2 we can workaround provided the document does not actually need characters from the T1 encoding in the relevant parts of the text.

3 we can do nothing about. We can have the shape or the weight but not both at the same time.

\documentclass{article}
\usepackage{libertine}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\DeclareRobustCommand{\bskfamily}{%
  \fontencoding{OT1}%
  \fontfamily{bsk}%
  \selectfont}
\DeclareTextFontCommand\textbsk{\bskfamily}
\begin{document}
  Some text

  {\bskfamily\huge\scshape Sample Text Here!

    \bfseries Sample Text Here!
    \par}

  \textbsk{\scshape Some text here! \bfseries Some more here!}

  Some more text
\end{document}

Libertine and Boisik

cfr
  • 198,882