When is use this code
\documentclass{amsart}
\usepackage{calligra,lipsum}
\usepackage[T1]{fontenc}
\DeclareRobustCommand{\normalfont}{\calligra}
\AtBeginDocument{\normalfont}
\title{A title}
\author{An author}
\begin{document}
\maketitle
\section{A section}
\lipsum[1]
\end{document}
everything goes fine, but when i try
\documentclass{book}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage[T1]{fontenc}
\newfontfamily\headingfont[]{Calligra}
\titleformat{\chapter}[display]
{\huge\headingfont}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat*{\section}{\LARGE\headingfont}
\titleformat*{\subsection}{\Large\headingfont}
\renewcommand{\maketitlehooka}{\headingfont}
\begin{document}
\chapter{First Chapter}
The title above does not show any font.
\end{document}
I get fontspec error: "font-not-found" The font "Calligra" cannot be found. I am using XeLaTex.
LaTeXversion of the font ? – alfred Oct 14 '17 at 00:14\normalfontdoesn’t seem a good idea. – egreg Oct 14 '17 at 06:47\usepackage[T1]{fontenc}in xetex, and you do not want tfm or type1 versions of the font either, so it isn't clear what you are doing with fontforge, – David Carlisle Oct 14 '17 at 08:40\newfontfamily\headingfont[]{CLLIG15}– alfred Oct 14 '17 at 10:55