1

Whenever I include the fontspec package in my document, all text gets slightly bolder. How do I archieve the old look with fontspec?

Here is a minimal example:

\documentclass[a4paper]{article}

\begin{document}
\textbf{Without fontspec}\\
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{document}

enter image description here

\documentclass[a4paper]{article}
\usepackage{fontspec}


\begin{document}
\textbf{With fontspec}\\
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{document}

enter image description here

The problem stays the same no matter if I compile with LuaLaTex or XeLaTex.

Fii
  • 246
  • Both files are compiled with Xe/LuaLaTeX? – Bernard Jun 27 '17 at 10:41
  • Yes. The problem occurs with both of them. – Fii Jun 27 '17 at 10:43
  • I have no problem with LuaLaTeX, both look the same. Maybe you should update your distribution? – Michael Fraiman Jun 27 '17 at 10:51
  • 2
    in current (post 2015) releases the same fonts are used (earlier than that adding fontspec would have switched from computer modern to latin modern) which latex release have you got? – David Carlisle Jun 27 '17 at 10:52
  • I do have TeX Live 2015 (LuaTeX, Version beta-0.80.0), so this may actually be the problem. I installed it via apt-get. How can I force an update to newer versions? – Fii Jun 27 '17 at 10:55
  • If I remember well, fontspec uses Latin Modern by default. Try \setmainfont{CMU Serif}. – Bernard Jun 27 '17 at 10:55
  • \setmainfont{CMU Serif} does not solve the issue with LuaLaTex.

    With XeLaTex, the document doesn't even compile: Font EU1/CMUSerif(0)/m/n/10="CMU Serif:mapping=tex-text;" at 10.0pt not loadable: Metric (TFM) file or installed font not found. [\setmainfont{CMU Serif}]

    – Fii Jun 27 '17 at 10:59
  • 1
    @jmb To get the current version of texlive, see https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu – samcarter_is_at_topanswers.xyz Jun 27 '17 at 11:02
  • You can't update from tl 2015 to 2017 you need to just install tl2017, but then lualatex will default to latin modern (the slightly darker one) the old default of cmr as the default really makes no sense you extend tex to be a unicode system but default fonts only have 127 characters and don't even have accented latin letters. – David Carlisle Jun 27 '17 at 11:02

1 Answers1

1

Open the PDF, which has been compiled without the package fontspec. Have a look into the Meta-Data. Many PDF-Viewers display the metadata after "Ctrl-d". Metadata include the fonts used in the document. Now you know the font names.

Then just use them with fontspec, \setmainfont whatever.

Updating to texlive 2017 (that is: installing texlive 2017) isn't done in ten minutes and under very unlucky circumstances you might have to change something in your document (the change isn't the problem, but to find out about it...).

Keks Dose
  • 30,892