0

I'm using the following CV template: https://es.overleaf.com/latex/templates/modern-latex-cv/qmdwjvcrcrph There is a section where it says you can change the font:

%----------------------------------------------------------------------------------------
%   FONT BASICS
%----------------------------------------------------------------------------------------

% some tex-live fonts - choose your own

%\usepackage[defaultsans]{droidsans}
%\usepackage[default]{comfortaa}
%\usepackage{cmbright}
\usepackage[default]{raleway}
%\usepackage{fetamont}
%\usepackage[default]{gillius}
%\usepackage[light,math]{iwona}
%\usepackage[thin]{roboto} 

% set font default
\renewcommand*\familydefault{\sfdefault}    
\usepackage[T1]{fontenc}

% more font size definitions
\usepackage{moresize}

But when I try to change the comment to another font it's the same one. What should I change here?

2
  • 1
    Welcome to tex.sx. Jan 17, 2022 at 17:12
  • 1
    Which font are you trying to select? Have you ascertained that that font is available on your system?
    – Mico
    Jan 17, 2022 at 17:33

2 Answers 2

1

I found the solution, this part of the code

\renewcommand*\familydefault{\sfdefault}

was actually setting the font whatever I selected above, just deleted it and now I can choose whatever font I want.

1
  • This is not really a correct diagnosis of the problem (see my answer). The font was changing but it was always the sans serif version of the font. Deleting this line simply enables the serifed version of the font chosen as the main font.
    – Alan Munn
    Mar 14, 2023 at 18:02
1

Embedding your fragment of code into a plain document and running it on a current TeX Live changes the fonts to any of the fonts listed in the commented lines if you uncomment those particular line. So the font is definitely changing. But it seems that you were expecting a serifed font instead of a sans serif font.

The line

\renewcommand*\familydefault{\sfdefault}

changes the main font in the document to the sans serif family. If you want a serifed font then you should comment out this line. But commenting out the line is not what enables the font change itself; the font was always changing, it seems that you wanted a different font family.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .