[Tex/LaTex] Creating bold and italic text not working with a custom font

boldfontsformattingitalic

\textit{\textbf{Text here}}

and

\textit{Text here}

is my code.

I am using the font which can be downloaded for free from: https://sansforgetica.rmit/

However creating bold and italic text for this font in LaTeX seems to not be working, no compiler errors or anything to that effect.

Utilising

\section{Text here}

does work though with this font and highlights the section title in bold using this font.

I know it is definitely not the font because I have tried it in word and it works fine when creating bold and italic text using this font inside word.

The full version of my code, without these two attempts in can be viewed at: https://github.com/Some-T/MemorisationDocumentLaTeXTemplate

I have tried to put in between in

main.tex

file on here, \begin{flushleft} and \end{flushleft}

I have tried this with these two elements removed to no avail.

I am at a loss, how can I make bold and italics perform in LaTeX on a custom font, what am I doing wrong in my code in its entirety?

I have gone through all similar answers on here and only one that comes close is: Bold and italic command is not working but I have also tried everything here to no avail.

I have tried to compile this code in XeLatex and LuaLaTeX on overleaf.com
Additional evidence relating to the font actually having bold and italics done in Microsoft word 2019: https://i.gyazo.com/1592b9659cc2851352d78d9357abc3f1.gif

Attempted fake bold:

enter image description here

Best Answer

Set the features by hand:

\documentclass{article}
\usepackage{fontspec}

\setmainfont{SansForgetica}[
  Path=./,
  Extension=.otf,
  UprightFont=*-Regular,
  BoldFont=*-Regular,
  BoldFeatures={FakeBold=3},
  ItalicFont=*-Regular,
  ItalicFeatures={FakeSlant=0.3},
  BoldItalicFont=*-Regular,
  BoldItalicFeatures={FakeBold=3,FakeSlant=0.3},
]

\begin{document}

Abc def

\textit{Abc def}

\textbf{Abc def}

\textit{\textbf{Abc def}}

\end{document}

enter image description here

Note: I use Path=./ in order to load the font from a working directory, as I don't want to mix the beast with my system fonts. Your setup may differ.