4

I am trying to produce a Schwabacher lettrine with the \textswab command in the following manner:

\documentclass[12pt]{book}
\usepackage{xcolor}
\usepackage{type1cm,lettrine}
\usepackage{yfonts}

\renewcommand{\LettrineFontHook}{\color{brown!42!black}\textswab{}}
\renewcommand{\LettrineTextFont}{\textswab}
\begin{document}
\Huge
\thispagestyle{empty}

\lettrine[lines=2,loversize=.65,findent=-.13em,nindent=2.5pt]{T}{exts:wab Lettrine}
\end{document}

But I get the following output:

enter image description here

QUESTION: This type of code has worked for me in the past with a font other than \textswab. Can anyone see what I may be doing wrong? I am compiling with lualatex.

Thank you.

4
  • 1
    \renewcommand{\LettrineFontHook}{\color{brown!42!black}\swabfamily}
    – Thérèse
    Jun 24 at 3:19
  • @Thérèse Though that produces the desired lettrine, for some reason the size of the lettrine is reduced to that of a regular letter. Moreover, its position is dropped considerably. The only way I have been able to fix it is with this: \usepackage[T1]{fontenc} \DeclareFontShape{LY}{yswab}{m}{n}{<->yswab}{}. Although this works fine, the document I intend to use it for, I recall, uses fontspec---so there may be a conflict with [T1]fontenc. Thank you for your helpful comment. Jun 24 at 4:01
  • Get rid of loversize=.65 and \Huge, etc., and then make adjustments.
    – Thérèse
    Jun 24 at 4:05
  • @Thérèse It seems that [T1]{fontenc} may not be needed after all. Jun 24 at 4:13

2 Answers 2

7

The problem here is that you wanted to use \swabfamily, which switches to Schwabacher until the end of the group or environment, and not \textswab{}, which only affects the text inside the brackets or the following token.

\documentclass[12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{lettrine}

% Workaround for the limited sizes of uyswab.fd:
\DeclareFontFamily{U}{yswab}{}
\DeclareFontShape{U}{yswab}{m}{n}{
   <->yswab }{}

\usepackage{oldgerm}

\renewcommand{\LettrineFontHook}{\color{brown!42!black}\swabfamily}
\renewcommand{\LettrineTextFont}{\swabfamily}


\begin{document}

\thispagestyle{empty}

\lettrine[lines=2,loversize=.65,findent=-.13em,nindent=2.5pt]{T}{exts:wab Lettrine}\\
A line of Computer Modern
\end{document}

yswab font sample

I took the minor liberty of replacing yfonts with oldgerm, a package that is part of the core LaTeX distribution and still maintained. Whichever package you use, the stock definition of the font declares only a few limited font sizes (a holdover from the original METAFONT design), so it is necessary to override the declaration in uswab.fd in order to enable the scalable font size that \lettrine wants.

4
  • Thank you for this post; however, with yfonts, I was able to make presentable the lettrine with \DeclareFontShape{LY}{yswab}{m}{n}{<->yswab}{}; that is, the output resembled the picture I posted except the lettrine was displayed with the desired font. Though I have tried, I have not been able to get the lettrine in your code to be displayed higher than the rest of the text. Replacing yswab with swabfamily in the \DeclareFontShape command does not work. Perhaps you might consider modifying your answer so I may see how to do this with your code. Many thanks. Jun 25 at 18:49
  • @mlchristians I ended up using a slightly-different workaround for the fixed font sizes, but I’ve revised as you suggested.
    – Davislor
    Jun 25 at 19:20
  • Hope this is useful.
    – Davislor
    Jun 25 at 19:28
  • Many thanks. It is. Jun 25 at 19:31
3

If you compile with luatex or xetex, you should use Opentype fonts (.ttf or .otf). Among "Fraktur" fonts, I know of two of them: UnifrakturMaguntia.ttf (http://unifraktur.sourceforge.net/maguntia.html) and QTFraktur.otf (included in TeXLive). Here is an example:

\documentclass[12pt]{book}
\usepackage{xcolor}
\usepackage{lettrine}
\usepackage{fontspec}
\setmainfont{UnifrakturMaguntia.ttf}
%\setmainfont{QTFraktur.otf}

\renewcommand{\LettrineFontHook}{\color{red}}

\begin{document}
\thispagestyle{empty}

\lettrine[lines=2,loversize=.65,findent=-.13em,nindent=2.5pt]{T}{extswab Lettrine}

 \end{document}

Output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.