2

I wanted to use the Cormorant font family in my LaTeX document.

I later learned that a Geramond variety of this family appears in the TeXLive distribution, but I was unaware at the time, and anyway I believe that these families are not identical, the Geramond lacking letter definitions for small caps.

I downloaded and unpacked the font files from the release download page (archive name Cormorant_Install_v3.601.zip) into the folder containing my document, and inserted the following lines into my LaTeX file:

    \usepackage{fontspec}
    \setmainfont{Cormorant-Regular.ttf}[
      BoldFont = Cormorant-Bold.ttf ,
      ItalicFont = Cormorant-Italic.ttf ,
      BoldItalicFont = Cormorant-BoldItalic.ttf,
    ]

I created some small caps formatting, which looked reasonable after running through XeLaTeX, but as I understood that LaTeX would not have a source of correct small caps lettering, it must be faking the small caps based on the regular style font. I wanted to achieve a superior appearance from the correct source for this letter appearance, which is given in a separate font file.

I added the additional field to the optional parameter list:

SmallCapsFont = CormorantSC-Regular.ttf

Yet, I discovered no difference in the output.

I tried a variety of further additions to the list, dealing with font features, based on my frustrated attempt to benefit from the fontspec documentation, but I found no variation that produced output with a different effect.

I looked at the results under magnification, and began to wonder whether somehow the effect I was seeing was actually correct small caps. However, after inspecting the font file as best I could, I came to understand that a TTF-format file cannot embed both regular letters and small caps.

As such, the small caps output I have now is either fake, or the font is somehow being found in another source. Yet I have no evidence of either.

I can prove that the option has some effect because I can make LaTeX generate italics from the \textsc command by using the following form:

SmallCapsFont = Cormorant-Italics.ttf

I created an overall test case, as follows.

\documentclass{article}

\usepackage{fontspec}
\usepackage{geometry}
\geometry{landscape,a5paper}

\setmainfont{Cormorant-Regular.ttf}[
   BoldFont = Cormorant-Bold.ttf ,
    ItalicFont = Cormorant-Italic.ttf ,
    BoldItalicFont = Cormorant-BoldItalic.ttf,
]

\begin{document}

\Large

\noindent The Quick Brown Fox Jumped Over The Lazy Dog. \vspace{1em}

\noindent \textbf{The Quick Brown Fox Jumped Over The Lazy Dog.} \vspace{1em}

\noindent \textit{The Quick Brown Fox Jumped Over The Lazy Dog.} \vspace{1em}

\noindent \textsc{The Quick Brown Fox Jumped Over The Lazy Dog.} \vspace{1em}

\end{document}

Adding the following line to the optional parameter list of \setmainfont should have an effect, but has none.

SmallCapsFont = CormorantSC-Regular.ttf

Results

Without use of small caps font file

Without use of small caps font file

With use of small caps font file

With use of small caps font file

2

You do not need to change anything since Cormorant-Regular.ttf does contain the smcp feature necessary for fontspec to use real small caps:

$ otfinfo -f  Cormorant_Install_v3.601/1.\ TrueType\ Font\ Files/Cormorant-Regular.ttf | grep smcp
smcp    Small Capitals 

An alternative way to see this is provided by fontforge that you mention in the comments. With Metrics -> New Metrics Window you can not only test font metrics but also many font features. Typing some text gives you:

enter image description here

Activating the smcp feature in the left hand column gives:

enter image description here

While the typed characters at the top stay the same, the glyphs used to represent these characters have changed: /h has been replaced with /h.sc etc.

If the feature where not there, fontspec would not fake small caps all by itself. The CormorantSC-Regular.ttf font present in the distribution is meant as a convenience feature for people having to use software that does not understand OpenType features like smcp.

Concerning your (implicit) question how a TrueType font can contain both regular and small caps glyphs. This has been possible for a long time. "Palatino Linotype" is an example for such a font. One has to remember that OpenType is TrueType plus the abbility to store glyphs as cubic splines and additional font features like smcp. A TrueType font with glyphs stored as quadratic splines but OpenType font features can still be treated as normal TrueType font by applications that do not understand OpenType.

  • I'm glad you explained. I opened the font in Font Forge and in a few utilities included in my Linux desktop, and also ran a text utility called ttfdump. I never saw any indication whatsoever of the small caps included in these files. Is there a graphical application that can preview the small caps if they're not in a separate file? – epl Oct 12 at 10:34
  • 1
    What you're saying about OTF is that the format extends TTF, and that some files use new features but are backward compatible, in which case they use the same .ttf extension; whereas some features like cubic splines cannot be rendered in a TTF-only engine and in such cases the files must use the new .otf extension? – epl Oct 12 at 10:38
  • @epl Your description of the OTF--TTF relation is spot on. Concerning other ways of seeing these features I have added some screenshots using FontForge. – Ralf Stubner Oct 12 at 15:47

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.