[Tex/LaTex] Change default font size while using fontspec

fontsfontsizefontspecxetex

I'd like to set the main font size (i.e. all text which isn't a heading or something else with an explicit font size) to a particular font size, in this case, 9.5pt.

I can't use the default package options. I also can't use \fontsize{9.5pt}{9.5pt}\selectfont at the start of my document because then latex (xelatex 3.1415926-2.4-0.9998 (MiKTeX 2.9)) selects some other font than the font set with \setmainfont.

What's a nice, simple way to set the default font size, analogous to the \setmainfont command from fontspec?

I have no version information about fontspec.

Best Answer

I can't see what's wrong with scaling the main font:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Scale=0.95]{Linux Libertine O}

\usepackage{blindtext}

\linespread{0.95833} % 11.5/12

\begin{document}
\blinddocument
\end{document}

With \Large you'll get 13.4 instead of 14pt; it doesn't seem a big difference (and I'd say it's even better). At \Huge the font will be 24pt instead of 25pt.

enter image description here

This can be supplemented by appropriate \DeclareMathSizes commands, where the last three arguments are scaled at 95%:

\DeclareMathSizes{5}{4.75}{4.75}{4.75}
\DeclareMathSizes{6}{5.7}{4.75}{4.75}
\DeclareMathSizes{7}{6.65}{4.75}{4.75}
\DeclareMathSizes{8}{7.6}{5.7}{4.75}
\DeclareMathSizes{9}{8.55}{5.7}{4.75}
\DeclareMathSizes{\@xpt}{9.5}{6.65}{4.75}
\DeclareMathSizes{\@xipt}{10.4}{7.6}{5.7}
\DeclareMathSizes{\@xiipt}{11.4}{7.6}{5.7}
\DeclareMathSizes{\@xivpt}{13.68}{9.5}{6.65}
\DeclareMathSizes{\@xviipt}{16.42}{11.4}{9.5}
\DeclareMathSizes{\@xxpt}{19.7}{13.68}{11.4}
\DeclareMathSizes{\@xxvpt}{23.64}{19.7}{16.42}
Related Question