posquit0 / Awesome-CV

:page_facing_up: Awesome CV is LaTeX template for your outstanding job application
LaTeX Project Public License v1.3c
23.03k stars 4.79k forks source link

How to change font #114

Closed vicrucann closed 11 months ago

vicrucann commented 7 years ago

I'd like to try some other common font, e.g., Times New Roman. Is there an easy way to change that?

sylhare commented 7 years ago

Allo @vicrucann ,

If you want to change the font, I would suggest to use these commandes (they're shown in the awesome-cv.cls and can be tweaked).

\footerfont{Times New Roman}
\bodyfont{Times New Roman}
\bodyfontlight{Times New Roman}

However you have to make sure the new font you want to use is in the right directory or use a \RequirePackage[default,opentype]{sourcesanspro} like the one in the awesome-cv.cls like you would use \sourcesanspro after, but I don't know exactly how to use it.

Hope it helps.

alishir commented 4 years ago

You can define a custom font family and use it different sections, here is how I use Montserrat font for the cover letter body:

%-------------------------------------------------------------------------------
%                Configuration for fonts
%-------------------------------------------------------------------------------

\newfontfamily\alishirfont[
  Path=\@fontdir,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
  BoldFont=*-Bold,
  BoldItalicFont=*-BoldItalic,
]{Montserrat}

% For elements of cover letter

\newcommand*{\mylettertextstyle}{\fontsize{8pt}{1.4em}\alishirfont\selectfont\color{graytext}}

p.s.: You should copy font files in the font directory.

ghost commented 3 years ago

Hello everybody, I am still interested in resolving this issue. I am not a proficient coder in TeX, but I am very interested in understanding how to properly change fonts. Like, I got that you have to add the .tff files to the font directory and adjust the code in the awesome-cv.cls. But this alone doesn't fix the problem for me. Is there anyone who understands this and would like to share an easy explanation (or maybe some easy code example)? Thank you so much!

zxdawn commented 2 years ago

@sylhare I got this error when adding three lines mentioned by you:

LaTeX Error: Missing \begin{document}. [\footerfont{T]

Any idea how to fix it?

zxdawn commented 2 years ago

Well, I found the solution on StackOverflow:

Add these just before \begin{document}

\let\headerfont\rmfamily
\let\headerfontlight\rmfamily
\let\footerfont\rmfamily
\let\bodyfont\rmfamily
\let\bodyfontlight\rmfamily
HlexNC commented 1 year ago

How does one change the font size? Or make the font a bit thicker

chulao14 commented 11 months ago

I'm trying to change the font style but I still can't do it

HlexNC commented 11 months ago

I'm trying to change the font style but I still can't do it

I at some point succeeded, but the end result didn't look well. I suggest keeping to the defaults

HlexNC commented 11 months ago

The font size can be changed inside awesome-cv.cls lines 191-234, which is just a trial and error when finding the correct line to edit.

HlexNC commented 11 months ago

image