From 3273db2efdc36dea6f9b36198035ea5599e529e9 Mon Sep 17 00:00:00 2001
From: Christophe Roger <darwiinc@live.fr>
Date: Fri, 30 Sep 2016 06:07:08 +1100
Subject: New option to use local font in place of system font

---
 awesome-source-cv.cls | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

(limited to 'awesome-source-cv.cls')

diff --git a/awesome-source-cv.cls b/awesome-source-cv.cls
index b0f12cc..90d6827 100755
--- a/awesome-source-cv.cls
+++ b/awesome-source-cv.cls
@@ -29,6 +29,10 @@
   \renewcommand{\linkColor}{\color{myBlue}}
   \renewcommand{\symbolcolor}{\textcolor{myBlue}}
 }
+
+\DeclareOption{localFont}{
+  \def\@local{local}
+}
 \ProcessOptions
 
 % Dependences
@@ -46,6 +50,7 @@
 \RequirePackage{array}
 \RequirePackage{enumitem}
 \RequirePackage{longtable} 	
+\RequirePackage{xifthen}
 
 \definecolor{myBlue}{HTML}{FF9B1C}
 
@@ -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}
-- 
cgit v1.2.3

