Skip to content

Commit

Permalink
New option to use local font in place of system font
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Roger committed Sep 29, 2016
1 parent ec6efcf commit 3273db2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
25 changes: 19 additions & 6 deletions awesome-source-cv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
\renewcommand{\linkColor}{\color{myBlue}}
\renewcommand{\symbolcolor}{\textcolor{myBlue}}
}

\DeclareOption{localFont}{
\def\@local{local}
}
\ProcessOptions

% Dependences
Expand All @@ -46,6 +50,7 @@
\RequirePackage{array}
\RequirePackage{enumitem}
\RequirePackage{longtable}
\RequirePackage{xifthen}

\definecolor{myBlue}{HTML}{FF9B1C}

Expand All @@ -71,12 +76,20 @@

% Setup fonts
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[BoldFont = Helvetica Neue, ItalicFont=Helvetica Neue Thin Italic ,SmallCapsFont = Helvetica Neue Light]{Helvetica Neue Thin}
\setmainfont{SourceSansPro-Light}[
Path = fonts/,
BoldFont = SourceSansPro-Semibold,
ItalicFont = SourceSansPro-LightIt,
SmallCapsFont = SourceSansPro-Regular]
%

\ifthenelse{\isundefined{\@local}}
{
%\setmainfont[BoldFont = Helvetica Neue, ItalicFont=Helvetica Neue Thin Italic ,SmallCapsFont = Helvetica Neue Light]{Helvetica Neue Thin}
\setmainfont[BoldFont = Source Sans Pro Semibold, ItalicFont=Source Sans Pro Light Italic,SmallCapsFont = Source Sans Pro]{Source Sans Pro Light}
}
{
\setmainfont{SourceSansPro-Light}[
Path = fonts/,
BoldFont = SourceSansPro-Semibold,
ItalicFont = SourceSansPro-LightIt,
SmallCapsFont = SourceSansPro-Regular]
}

%New length definition
\newlength{\datebox}
Expand Down
18 changes: 8 additions & 10 deletions cv.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
% !TEX TS-program = xelatex

\documentclass{awesome-source-cv}

\documentclass[localFont]{awesome-source-cv}

\name{Christophe}{ROGER}
\tagline{Chef de projet IT}
Expand All @@ -14,18 +12,18 @@
\address{2 Rue du quartier, 98765 Ville, Pays}\\
\infos{Né le 23 septembre 1982 (33 ans) à Nouméa, Nouvelle-Calédonie}
}
%------------------------------------------

\begin{document}

\makecvheader

%--------------------SECTIONS-----------------------------------
\input{section_headline}
\input{section_competences} % Section compétence
\input{section_experience_short} % Section expérience
\input{section_langues} % Section langues
\input{section_scolarite} % Section scholarité
%\input{section_interets} % Section intérêts
\input{section_references} % Section références
\input{section_competences} % Section compétence
\input{section_experience_short} % Section expérience
\input{section_langues} % Section langues
\input{section_scolarite} % Section scholarité
%\input{section_interets} % Section intérêts
\input{section_references} % Section références

\end{document}

0 comments on commit 3273db2

Please sign in to comment.