\SetTitle{The Book of Wonder}
\SetAuthor{Lord Dunsany}
\SetPDFX[FOGRA39]{X-1a:2001}
\SetApplication{}
\SetProducer{}

\SetTrimSize{5.5in}{8.5in}
\SetMargins{0.5in}{0.625in}{0.625in}{0.75in}     %{top}{outer}{bottom}{inner}

\SetParentFont[%
    SmallCapsFeatures={Renderer=Basic},%
    Kerning=On,Ligatures=TeX,%
]{Cochineal}
\SetMonoFont{Latin Modern Mono} % Libertinus Mono is too wide

\SetHeadFont[Numbers=OldStyle,%
    Letters=SmallCaps,%
    Letters=UppercaseSmallCaps,%
    Scale=1.0,%
]{\parentfontname}
\SetVersoHeadText{The Book of Wonder}

\usepackage[english]{selnolig}
\nolig{Th}{T|h} % the Th ligature is rather distracting

\input{content/ukhyph}

\SetChapterStartHeight{12}
\SetChapterFont[%Letters=SmallCaps,Letters=UppercaseSmallCaps,LetterSpace=20,
    Scale=3.0]{\parentfontname}
\SetSubchFont[Numbers=Lining,Scale=2.0]{\parentfontname}

\SetScenebreakIndent{true}

%\SetFontSize{11.5pt}
\SetLinesPerPage{29}

\SetHeadFootStyle{1}
\SetHeadJump{1.8}
%\SetFootJump{2}
%\SetPageNumberStyle{\liningnums{\thepage{}}}

\setdefaultlanguage{english}

%\newcommand{\textheight}[1]{\enlargethispage{#1\baselineskip}}

\newcommand{\twoemdash}{%
    \makebox[2em]{\bigemdash}%
}
\newcommand{\threeemdash}{%
    \makebox[3em]{\bigemdash}%
}

\newcommand{\Mr}[1]{Mr.\ #1}
\newcommand{\Mrs}[1]{Mrs.\ #1}
\newcommand{\Ms}[1]{Ms.\ #1}
\newcommand{\Dr}[1]{Dr.\ #1}
\newcommand{\St}[1]{St.\ #1}

\newcommand{\intersentencespace}{\spacefactor\sfcode`. \space}

% this comes from the memoir class
\newcommand*{\midsloppy}{%
  \tolerance 5000%
  \hbadness 4000%
  \emergencystretch 1.5em}
\newenvironment{midsloppypar}{\par\midsloppy}{\par}