I set my monospace font using \setmonofont. I'd like to be able to change the size of this font for my entire document, rather than use \fontsize everywhere. How can I do that?


In manual of fontspec: 7.2 Scale


  • 4
    Can you please also here say a bit more? Thanks! Jan 17 '11 at 17:49
  • 1
    It is exactly the answer, isn't it? Further more, it isn't a normal link, but manual of fontspec. IMHO, everyone who want to use fontspec should have a look at it.
    – Leo Liu
    Jan 18 '11 at 5:17
  • 15
    You are right on two counts: One should use the manual, and you gave the precise location in the manual. However, the link to meta.SO I gave before still applies: It's best to have the answers here. Who knows what the section number in the fontspec manual will be in a year from now; then it'll be more difficult to find. It's always best to give a short example. Here, just one line of code would be great! Jan 18 '11 at 15:08
  • 5
    @HendrikVogt I agree. The link in this answer is not working anymore at this point which made it more difficult for me to find an actual answer. Here's another link to the manual: ftp.tu-chemnitz.de/pub/tex/macros/latex/contrib/fontspec/…
    – Manuzor
    Mar 10 '13 at 21:35
  • 4
    It has already happened. :) There is no 8.2 anymore, updated to 7.2.
    – AndreKR
    Jun 28 '15 at 21:58

Use the Scale attribute on \setmonofont, e.g.:

\setmonofont[Scale=MatchLowercase]{Droid Sans Mono}
\setmonofont[Scale=0.9]{Droid Sans Mono}

The scale can be:

  • a number: 1 is the original size, 2 is twice as big, 0.5 is twice as small...
  • MatchLowercase or MatchUppercase: this scales the font to the height of either the lowercase or the uppercase letters in the current roman font.

Source: Section 6.2 in the manual of the fontspec package (PDF)

  • 3
    MatchLowercase is brilliant! Jan 27 '15 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.