I want to use the Castellar font found in Word in a Latex document. Is there a way to use it in a Latex document even if it is only in the title? Here is an example of what I want.
Asked
Active
Viewed 331 times
1 Answers
12
You can run all codes below by xelatex or lualatex.
Main Font
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Castellar}
% \setmainfont{CASTELAR.TTF}
\begin{document}
Test123
\end{document}
New Font Family
Thanks to @Davislor for his tips on \DeclareTextFontCommand.
\documentclass{article}
\usepackage{fontspec}
\newfontfamily\castellar{Castellar}[Scale=MatchUppercase]
% \newfontfamily\castellar{CASTELAR.TTF}[Scale=MatchUppercase]
\DeclareTextFontCommand{\textcastellar}{\castellar}
\begin{document}
Test123 {\castellar Test123} Test123\par
Test123 \textcastellar{Test123} Test123
\end{document}
Scale=MatchUppercase is to scale the font being selected to match the current default roman font to the height of the uppercase letters.
All Character in Castellar
\documentclass{article}
\usepackage{unicodefonttable}
\begin{document}
\displayfonttable{Castellar}
\end{document}
We can see there are no lowercase letters in Castellar font.
Clara
- 6,012
-
You might also want
\DeclareTextFontCommand\textcastellar{\castellar}, allowing\textcastellar{123}as well as{\castellar 123}. – Davislor Jan 14 '23 at 11:52 -




\usepackage{fontspec}followed by\newfontfamily\castellar{Castellar}[Scale=MatchUppercase]should create a\castellarcommand. Does that work? – Davislor Jan 14 '23 at 05:49