Skip to content

Commit

Permalink
Fix font cross-platform font face compatibility
Browse files Browse the repository at this point in the history
Set 11pt Times New Roman as the main font; Preserve Calibri font as an optional
one, useable by adding the 'calibri' option to the class options.
  • Loading branch information
dnl-blkv committed Jan 14, 2016
1 parent f82de16 commit 74927c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 3 additions & 1 deletion McDowell_CV_Template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%% SOFTWARE.
\documentclass{mcdowellcv}

% The font could be set to Windows-specific Calibri by using the 'calibri' option
\documentclass[]{mcdowellcv}

% For mathematical symbols
\usepackage{amsmath}
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ http://www.careercup.com/resume.

The class is based on `article` class. The paper format is set to U.S. letterpaper by default.

Class Options
-------------
- `calibri` - sets calibri as the main font. Otherwise the default font is Times New Roman since version 1.1.0.

Commands
--------
The class features the following commands:
Expand Down
15 changes: 13 additions & 2 deletions mcdowellcv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,27 @@
%% SOFTWARE.
\ProvidesClass{mcdowellcv}[2015/12/15 v1.0.0 McDowell CV class]

% Set up the fonts according to options
\def\mainfontsize{11pt}
\def\mainfontface{Times New Roman}

\DeclareOption{calibri}{%
\def\mainfontsize{11pt}
\def\mainfontface{Calibri}
}

\ProcessOptions\relax

% Set font size and paper type
\LoadClass[letterpaper,11pt]{article}
\LoadClass[letterpaper,\mainfontsize]{article}

% Set document margins
\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry}

% Set font face
\usepackage{fontspec}
\setmainfont[SmallCapsFeatures={Renderer=Basic},
Ligatures={TeX, NoCommon, NoDiscretionary}]{Calibri}
Ligatures={TeX, NoCommon, NoDiscretionary}]{\mainfontface}

% Remove paragraph indentation
\usepackage[parfill]{parskip}
Expand Down

0 comments on commit 74927c3

Please sign in to comment.