[Tex/LaTex] the secret to use fonts

fonts

Background

Relatively new LaTeX user going mad here.

All I want to do is use the Day Ramon S font, but it seems nigh on impossible to do so.

Question

What is the secret to using fonts in (La)TeX? Is there any rhyme, reason, or rules of thumb to follow? Or do I need to just keep trying random combinations of the patterns I have found until something works?

note

Although all I really want to do is use Day Roman S, I have intentionally kept the question focused on fonts in general as there doesn't seem to be any bullet-proof advice on working with fonts. I see a lot of solutions for specific problems, and even fonts in general, but as can be seen in the next section, it's all a jumble.

note 2

Yes, I have RTFM for the Day Roman S font in question, it is installed, and has been reinstalled several times. It's still a pain to figure out a consistent and reliable way to use different fonts in a document.

Previous research

In trying to figure this out, I have looked at many of the samples from FontCatalogue archive that did compile and found that there seem to be a wide variety of ways of specifying fonts. I'm not sure which to use when.

Sometimes you need to just load a package with the same name as the font and add \normalfont\normalfont twice (why?) before the text:

\usepackage{bookman}
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\normalfont

Other times you need to add \normalfont\<font-name> before the text:

\usepackage{calligra}
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\calligra

Still other times you need to remove ic from the font name and add family, creating \normalfont\<font-name-minus-ic>family before the text:

\usepackage{egothic}
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\egothfamily

And sometimes the second command after \normalfont doesn't appear to be related to the package name at all:

\usepackage{yfonts}
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\swabfamily

Sometimes you also need to use \renewcommand* after loading the font package and before loading fontenc:

\usepackage{PTSansCaption} 
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\normalfont

And sometimes you can do that without loading the font package first and after loading fontenc (all other examples are before):

\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style
\begin{document}
\normalfont\normalfont

Sometimes you use \renewcommand* to set other defaults such as \rmdefault (previous two examples were \familydefault:

\renewcommand*\rmdefault{cmfib}
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\normalfont

And sometimes you have to set various defaults:

\renewcommand*\ttdefault{lmvtt}
\renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style
\usepackage[T1]{fontenc}
\begin{document}
\normalfont\normalfont

Finally, some appear to require loading an .fd file (font definition?) directly rather than through the \usepackage command, set up a \newcommand* (rather than \renewcommand*), skip loading fontenc, and change the duplicated \normalfont\normalfont before the text to something more complex:

\input Carrickc.fd
\newcommand*\initfamily{\usefont{U}{Carrickc}{xl}{n}}
\begin{document}
\normalfont\initfamily
\fontsize{12mm}{12mm}\selectfont 

Best Answer

Here is a working (almost) MWE:

\documentclass[danish]{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[T1]{fontenc}
\renewcommand\rmdefault{dayroms}

\begin{document}
\section*{Dayrom S}
For mange Aar siden levede en Keiser, som holdt saa uhyre meget af
smukke nye Kl\ae der, at han gav alle sine Penge ud for ret at blive
pyntet. Han br\o d sig ikke om sine Soldater, br\o d sig ei om Comedie
eller om at kj\o re i Skoven, uden alene for at vise sine nye Kl\ae
der. Han havde en Kjole for hver Time paa Dagen, og ligesom man siger
om en Konge, han er i Raadet, saa sagde man altid her: >>Keiseren er i
Garderoben!<<~--

\end{document}

Dayrom S

I am almost certain this example will fail for you because I am almost certain you do not have the font installed. The font is not part of TeX Live. Three possibilities:

  • Ubuntu provides a package which you can install.
  • You install the package from CTAN manually, perhaps following the instructions in the link Speravir provided in the comments on your original question.
  • You install the font using the getnonfreefonts script which will automate the process for you. This is part of TeX Live but probably not packaged by Ubuntu. Two possibilities:
    • It is packaged by Ubuntu (despite my pessimism).
    • You install TeX Live from upstream using the instructions in the link Speravir provided in the comments. In this case it would be best to remove the installation you currently have to avoid future confusion.