I'm having some issue trying to combine an Arial font with some non-arial fonts for small caps in ShareLatex.
I've managed to get some setup working, but not what I need the most : 1. Have a working true smallcaps font 2. Use Arial for the main font.
Accoring to this help page, I'd need to add the TTF files for Arial withing my project and put this code :
\setsansfont[
BoldFont=arialbd.ttf,
ItalicFont=ariali.ttf,
BoldItalicFont=arialbi.ttf
]{arial.ttf}
As I want it for my main font, I've copied to TTF and I've simply edited it to as below. But I don't get any small caps, normal as Arial have none
\setmainfont[
BoldFont=arialbd.ttf,
ItalicFont=ariali.ttf,
BoldItalicFont=arialbi.ttf,
]{arial.ttf}
Using some examples here, I've tried to use another "sans serif" typeface, with a compatible Small caps font, available on sharelatex. This code works, it is sans serif, has small caps, but is not Arial (my requirement say Arial is needed, no idea why, but I need to comply). So this command can create a mix of Latin Modern Sans, with "TeX Gyre Termes" for Small Caps.
\setmainfont[SmallCapsFont=TeX Gyre Termes,SmallCapsFeatures={Letters=SmallCaps}]{Latin Modern Sans}
Now I wanted to try to merge the 2, which would give me :
\setmainfont[
BoldFont=arialbd.ttf,
ItalicFont=ariali.ttf,
BoldItalicFont=arialbi.ttf,
SmallCapsFont={TeX Gyre Termes},
SmallCapsFeatures={Letters=SmallCaps},
]{arial.ttf}
And I've also tried with the ligature option, following this post here
\setmainfont[
BoldFont=arialbd.ttf,
ItalicFont=ariali.ttf,
BoldItalicFont=arialbi.ttf,
SmallCapsFont={TeX Gyre Termes},
SmallCapsFeatures={Letters=SmallCaps},
Ligatures=TeX,
]{arial.ttf}
But all my tryout are vain, as I get a compilation error. This is strange as the tex gyre is working otherwise fine, but my guess is that I'm mixing a command with filename with the one with font name.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "TeX Gyre Termes" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.64 ]{arial.ttf}
In short, I'm really lost. Do you have any idea on why I'm getting this error and how I should fix my last command ?
Edit 1 :
Following Ulrike's proposition, I tried this, which compiles fine on Sharelatex, but this do not add small caps but regular fonts. Is there any -smallcaps or am I missing some parameters ?
\setmainfont[
BoldFont=arialbd.ttf,
ItalicFont=ariali.ttf,
BoldItalicFont=arialbi.ttf,
SmallCapsFont=texgyretermes-regular.otf,
SmallCapsFeatures={Letters=SmallCaps},
Ligatures=TeX,
]{arial.ttf}
.otf
it isn't found.