- Revert Roboto fonts to originals.
- Create merged Noto font files.
This commit is contained in:
@@ -5,54 +5,70 @@
|
||||
|
||||
% Loading math fonts takes a long time, so skip it in draft mode.
|
||||
% \bool_if:NF \g_draft_bool {
|
||||
\RequirePackage{notomath}
|
||||
% \RequirePackage{notomath}
|
||||
% }
|
||||
|
||||
\NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
|
||||
\NewDocumentCommand{\fontpath}{}{./PrimeTeX/fonts}
|
||||
|
||||
\def\sbfamily{}
|
||||
|
||||
% Main font: Roboto Serif (Light), with symbols merged in from, in order of
|
||||
% priority, Noto Serif, Noto Emoji, Noto Sans Symbols, and Noto
|
||||
% Sans Symbols 2.
|
||||
\setmainfont{RobotoSerif}[
|
||||
Path = {\fontpath/RobotoSerif/},
|
||||
Extension = .ttf,
|
||||
UprightFont = *-Light,
|
||||
BoldFont = *-SemiBold,
|
||||
ItalicFont = *-LightItalic,
|
||||
BoldItalicFont = *-SemiBoldItalic,
|
||||
]
|
||||
% \setmainfont{RobotoSerif}[
|
||||
% Path = {\fontpath/serif/},
|
||||
% Extension = .ttf,
|
||||
% UprightFont = *-Light,
|
||||
% BoldFont = *-SemiBold,
|
||||
% ItalicFont = *-LightItalic,
|
||||
% BoldItalicFont = *-SemiBoldItalic,
|
||||
% SlantedFont = NotoSerif-Light,
|
||||
% BoldSlantedFont = NotoSerif-SemiBold,
|
||||
% ]
|
||||
|
||||
% Sans serif font: Roboto (Medium).
|
||||
\setsansfont{Roboto}[
|
||||
Path = {\fontpath/Roboto/},
|
||||
Extension = .ttf,
|
||||
UprightFont = *-Medium,
|
||||
BoldFont = *-Bold,
|
||||
ItalicFont = *-MediumItalic,
|
||||
BoldItalicFont = *-BoldItalic,
|
||||
]
|
||||
% % Sans serif font: Roboto (Medium).
|
||||
% \setsansfont{Roboto}[
|
||||
% Path = {\fontpath/sans/},
|
||||
% Extension = .ttf,
|
||||
% UprightFont = *-Medium,
|
||||
% BoldFont = *-Bold,
|
||||
% ItalicFont = *-MediumItalic,
|
||||
% BoldItalicFont = *-BoldItalic,
|
||||
% SlantedFont = NotoSans-Medium,
|
||||
% BoldSlantedFont = NotoSans-Bold,
|
||||
% ]
|
||||
|
||||
% Monospace font: Roboto Mono
|
||||
\setmonofont{RobotoMono}[
|
||||
Path = {\fontpath/RobotoMono/},
|
||||
Extension = .ttf,
|
||||
UprightFont = *-Regular,
|
||||
BoldFont = *-Bold,
|
||||
ItalicFont = *-Italic,
|
||||
BoldItalicFont = *-BoldItalic,
|
||||
]
|
||||
% \setmonofont{RobotoMono}[
|
||||
% Path = {\fontpath/mono/},
|
||||
% Extension = .ttf,
|
||||
% UprightFont = *-Regular,
|
||||
% BoldFont = *-Bold,
|
||||
% ItalicFont = *-Italic,
|
||||
% BoldItalicFont = *-BoldItalic,
|
||||
% ]
|
||||
|
||||
% Headings & Titles font: Roboto Slab (Semibold).
|
||||
\newfontfamily{\sbfamily}{RobotoSlab}[
|
||||
Path = {\fontpath/},
|
||||
Extension = .ttf,
|
||||
UprightFont = RobotoSlab/RobotoSlab-SemiBold,
|
||||
BoldFont = RobotoSlab/RobotoSlab-Black,
|
||||
% Roboto Slab doesn't have any italic form, so use
|
||||
% the Roboto Serif version.
|
||||
ItalicFont = RobotoSerif/RobotoSerif-SemiBoldItalic,
|
||||
BoldItalicFont = RobotoSerif/RobotoSerif-ExtraBoldItalic,
|
||||
]
|
||||
% % Headings & Titles font: Roboto Slab (Semibold).
|
||||
% \newfontfamily{\sbfamily}{RobotoSlab}[
|
||||
% Path = {\fontpath/serif/},
|
||||
% Extension = .ttf,
|
||||
% UprightFont = *-SemiBold,
|
||||
% BoldFont = *-Black,
|
||||
% % Roboto Slab doesn't have any italic form, so use
|
||||
% % the Roboto Serif version.
|
||||
% ItalicFont = RobotoSerif-SemiBoldItalic,
|
||||
% BoldItalicFont = RobotoSerif-ExtraBoldItalic,
|
||||
% SlantedFont = NotoSerif-SemiBold,
|
||||
% BoldSlantedFont = NotoSerif-ExtraBold,
|
||||
% ]
|
||||
|
||||
% Sans serif font with more symbols: Noto Sans
|
||||
% \newfontfamily{\notofamily}{NotoSans}[
|
||||
% Path = {\fontpath/NotoSans/},
|
||||
% Extension = .ttf,
|
||||
% UprightFont = *-Medium,
|
||||
% BoldFont = *-Bold,
|
||||
% ]
|
||||
|
||||
% Emoji font: Noto Emoji
|
||||
% \newfontfamily{\emojifamily}{NotoEmoji}[
|
||||
@@ -83,7 +99,7 @@
|
||||
% BoldItalicFont = *-SemiBold,
|
||||
% ]
|
||||
|
||||
\setmathrm{RobotoSerif}
|
||||
% \setmathrm{RobotoSerif}
|
||||
|
||||
\NewDocumentCommand{\serif}{+m}{{\rmfamily#1}}
|
||||
\NewDocumentCommand{\sans}{+m}{{\sffamily#1}}
|
||||
@@ -93,6 +109,15 @@
|
||||
% \NewDocumentCommand{\emoji}{m}{{\emojifamily{}#1}}
|
||||
% \NewDocumentCommand{\maths}{m}{{\mathfamily{}#1}}
|
||||
% \NewDocumentCommand{\symb}{m}{{\symbfamily{}#1}}
|
||||
% \NewDocumentCommand{\noto}{s m}{
|
||||
% \group_begin:
|
||||
% \bool_if:nTF {#1} {
|
||||
% \notosansfamily #2
|
||||
% } {
|
||||
% \notofamily #2
|
||||
% }
|
||||
% \group_end:
|
||||
% }
|
||||
|
||||
%------------------------------- Symbol Commands -------------------------------
|
||||
|
||||
@@ -102,20 +127,31 @@
|
||||
\NewDocumentCommand{\bdot}{}{.\zws}
|
||||
|
||||
% Text-mode angle bracket ornaments.
|
||||
\NewDocumentCommand{\ab}{s O{}}{〈#1〉}
|
||||
\NewDocumentCommand{\ab}{s m}{\textsl{〈}#1\textsl{〉}}
|
||||
|
||||
\RenewDocumentCommand{\checkmark}{s O{PrimeGreen} O{PrimeBrightGreen}}{
|
||||
\NewDocumentCommand{\checkmark}{s O{PrimeGreen} O{PrimeBrightGreen}}{
|
||||
\bool_if:nTF {#1} {
|
||||
\ColorText[#2][#3][]{✓}
|
||||
\ColorText[#2][#3][]{\textsl{✓}}
|
||||
} {
|
||||
{✓}
|
||||
{\textsl{✓}}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand{\xmark}{s O{PrimeRed} O{PrimeBrightRed}}{
|
||||
\bool_if:nTF {#1} {
|
||||
\ColorText[#2][#3][]{✗}
|
||||
\ColorText[#2][#3][]{\textsl{✗}}
|
||||
} {
|
||||
{✗}
|
||||
{\textsl{✗}}
|
||||
}
|
||||
}
|
||||
|
||||
\RenewDocumentCommand{\triangle}{m}{
|
||||
\textsl{
|
||||
\str_case:nn {#1} {
|
||||
{down} {▼}
|
||||
{left} {◀}
|
||||
{right} {▶}
|
||||
{up} {▲}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user