Create \fontpath macro.

This commit is contained in:
2025-07-17 11:34:46 -05:00
parent 6c35ab1a10
commit f29789d87a

View File

@@ -5,9 +5,11 @@
%#region %#region
\RequirePackage{fontspec} \RequirePackage{fontspec}
\newcommand{\fontpath}{PrimeTeX/fonts}
% Main font: Roboto Serif % Main font: Roboto Serif
\setmainfont{RobotoSerif}[ \setmainfont{RobotoSerif}[
Path = PrimeTeX/fonts/RobotoSerif/, Path = {\fontpath/RobotoSerif/},
Extension = .ttf, Extension = .ttf,
UprightFont = *-Light, UprightFont = *-Light,
BoldFont = *-SemiBold, BoldFont = *-SemiBold,
@@ -17,7 +19,7 @@
% Sans serif font: Roboto % Sans serif font: Roboto
\setsansfont{Roboto}[ \setsansfont{Roboto}[
Path = PrimeTeX/fonts/Roboto/, Path = {\fontpath/Roboto/},
Extension = .ttf, Extension = .ttf,
UprightFont = *-Regular, UprightFont = *-Regular,
BoldFont = *-Bold, BoldFont = *-Bold,
@@ -27,7 +29,7 @@
% Monospace font: Roboto Mono % Monospace font: Roboto Mono
\setmonofont{RobotoMono}[ \setmonofont{RobotoMono}[
Path = PrimeTeX/fonts/RobotoMono/, Path = {\fontpath/RobotoMono/},
Extension = .ttf, Extension = .ttf,
UprightFont = *-Regular, UprightFont = *-Regular,
BoldFont = *-Bold, BoldFont = *-Bold,
@@ -37,16 +39,16 @@
% Headings & Titles font: Roboto Slab % Headings & Titles font: Roboto Slab
\newfontfamily{\sbfamily}{RobotoSlab}[ \newfontfamily{\sbfamily}{RobotoSlab}[
Path = PrimeTeX/fonts/RobotoSlab/, Path = {\fontpath/RobotoSlab/},
Extension = .ttf, Extension = .ttf,
UprightFont = *-SemiBold, UprightFont = *-SemiBold,
BoldFont = *-Black, BoldFont = *-Black,
] ]
%#endregion %#endregion
\newcommand{\objref}[1]{\textsf{\textbf{#1}}} \newcommand{\objref}[1]{{\textbf{#1}}}
%\textsf
\newcommand{\serif}[1]{\textrm{#1}} \newcommand{\serif}[1]{\textrm{#1}}
\newcommand{\sans}[1]{\textsf{#1}} %\newcommand{\sans}[1]{\textsf{#1}}
\newcommand{\mono}[1]{\texttt{#1}} \newcommand{\mono}[1]{\texttt{#1}}
\newcommand{\slab}[1]{{\sbfamily{}#1}} \newcommand{\slab}[1]{{\sbfamily{}#1}}