Skip to content

Commit

Permalink
Added support for futura font
Browse files Browse the repository at this point in the history
Signed-off-by: João Lourenço <[email protected]>
  • Loading branch information
joaomlourenco committed Oct 28, 2024
1 parent dc05a17 commit 33a69e5
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Config/1_novathesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@
% \ntsetup{style/url=same} % Use the same (main) font in URLs
% % DEFAULT: whatever hyperref uses as default

% \ntsetup{style/font=newtx} % You can use any of the default LaTeX style files:
% \ntsetup{style/font=futura} % You can use any of the default LaTeX style files:
% % Or any of the additional styles
% % [ bookman, erewho, kpfonts, libertine,
% % schola, stix2, newpx, newtx
% % newsgot(*), calibr(*), kieranhealy(*) ]
% % newsgot(*), calibr(*), kieranhealy(*), futura(*) ]
% % (*) available only for xelatex/lualatex)
% % DEFAULT: style/font=newpx

Expand Down
8 changes: 4 additions & 4 deletions NOVAthesisFiles/FontStyles/arial.ldf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
\typeout{NT FILE FontStyles/arial.ldf}%


\ntcheckfont{Arial.ttf}{}
\ntcheckfont{ArialBold.ttf}{}
\ntcheckfont{ArialItalic.ttf}{}
\ntcheckfont{ArialBoldItalic.ttf}{}
\ntcheckfont{Arial.ttf}{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Arial.zip}
\ntcheckfont{ArialBold.ttf}{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Arial.zip}
\ntcheckfont{ArialItalic.ttf}{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Arial.zip}
\ntcheckfont{ArialBoldItalic.ttf}{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Arial.zip}

\ifxeorlua{}{%
\ClassError{novathesis}{Font Style “arial” is not compatible with pdfLaTeX. Please use XeLaTeX or LuaLaTeX}{Please use XeLaTeX or LuaLaTeX}%
Expand Down
91 changes: 91 additions & 0 deletions NOVAthesisFiles/FontStyles/futura.ldf
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FontStyles/futura.ldf
%% NOVA thesis configuration file
%%
%% Customization of font to use a Linux Libertine font set
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\typeout{NT FILE FontStyles/futura.ldf}%


\ntcheckfont{Futura-Medium.ttf}
{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Futura.zip}
\ntcheckfont{Futura-MediumItalic.ttf}
{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Futura.zip}
\ntcheckfont{Futura-Bold.ttf}
{https://github.com/joaomlourenco/novathesis-extras/raw/main/Fonts/Futura.zip}

\ifxeorlua{}{%
\ClassError{novathesis}{Font Style “futura” is not compatible with pdfLaTeX. Please use XeLaTeX or LuaLaTeX}{Please use XeLaTeX or LuaLaTeX}%
}


\AtEndPreamble{%
\RequirePackage[type1]{cabin}% used only by \mathsf
\RequirePackage{amsthm}% load before newtxmath
\RequirePackage[libertine,vvarbb]{newtxmath}% does not load minfutura because another Roman text package was specified

\setmainfont{Futura}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
UprightFont=Futura-Medium.ttf,
ItalicFont=Futura-MediumItalic.ttf,
BoldFont=Futura-Bold.ttf,
BoldItalicFont=Futura-MediumItalic.ttf,
BoldItalicFeatures={FakeBold=1.5},
]

\setfontfamily\futura{Futura-Medium.ttf}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
]

\setfontfamily\futurait{Futura-MediumItalic.ttf}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
]

\setfontfamily\futurabf{Futura-Bold.ttf}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
]

\setfontfamily\futurabfit{Futura-MediumItalic.ttf}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
BoldItalicFeatures={FakeBold=1.5},
]

\setfontfamily\futurasl{Futura-Medium.ttf}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
AutoFakeSlant=0.15,
]

\setfontfamily\futurabfsl{Futura-Bold.ttf}[
Ligatures=TeX,
Mapping=tex-text,
Path = NOVAthesisFiles/FontStyles/Fonts/,
AutoFakeSlant=0.15,
]


%
% %https://sourcefoundry.org/hack/
% \setmonofont{Hack}[
% %Scale=MatchLowercase,
% Scale=0.8,
% Path = novathesis-files/FontStyles/fonts/,
% Extension = .ttf,
% Mapping=tex-text,
% UprightFont=*-Regular,
% BoldFont=*-Bold,
% ItalicFont=*-Italic,
% BoldItalicFont=*-BoldItalic]
}
10 changes: 10 additions & 0 deletions NOVAthesisFiles/FontStyles/opensans.ldf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FontStyles/opensans.ldf
%% NOVA thesis configuration file
%%
%% Customization of font to use a Linux Libertine font set
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\typeout{NT FILE FontStyles/opensans.ldf}%

\RequirePackage[default,scale=0.95]{opensans}

0 comments on commit 33a69e5

Please sign in to comment.