Xelatex cannot find font path
04:35 04 Sep 2024

I wanted to use the font QTLinostroke.otf from the apt package texlive-fonts-extra in Ubuntu using xelatex. I installed the apt package

sudo apt install texlive-fonts-extra

The font file by default is installed in the path /usr/share/texlive/texmf-dist/fonts/opentype/public/qualitype/QTLinostroke.otf Then I ran the following tex file using xelatex.

%!TeX program=xelatex
\documentclass[12pt]{article}

\usepackage[a4paper,margin=2.05cm]{geometry}
\usepackage{fontspec}

\setmainfont{QTLinostroke}

\begin{document}

The quick brown fox jumps over lazy the dog.

\end{document}

However, xelatex couldn't find the font file. However, if I copy the file QTLinostroke.otf to $HOME/.fonts/ folder then the tex file compiles without a hitch. So my questions are

  1. Why can't xelatex find the font system font file which is a part of the texlive package.
  2. The font size (once I managed to compile it) is too small for this particular font, even though I say 12pt in the documentclass.
fonts latex xelatex