I am trying to use Chinese font simsun
on the overleaf. but it gave me an error.
Firstly, I tried this solution, but it is not working.
\setCJKfamilyfont{zhsong}[AutoFakeBold = {4.27}]{SimSun}
\renewcommand*{\songti}{\CJKfamily{zhsong}}
I also use KaiTi
font which is working fine.
\setCJKfamilyfont{zhkai}[AutoFakeBold = {4.27}]{KaiTi}
\renewcommand*{\kaishu}{\CJKfamily{zhkai}}
Then I found out a list of the CJK Chinese fonts which are available on overleaf from https://www.overleaf.com/learn/latex/Questions/Which_OTF_or_TTF_fonts_are_supported_via_fontspec%3F#Chinese
Then I upload SimSun.ttf
in Overleaf and import from the uploaded font.
\setCJKmainfont{zhsong}[AutoFakeBold = {4.27}]{SimSun.ttf}
\renewcommand*{\songti}{\CJKfamily{zhsong}}
But I got these errors:
Package fontspec Error: The font "zhsong" cannot be found.
./thesis.cls, 160
For immediate help type H <return>.
...
l.160 ...JKmainfont{zhsong}[AutoFakeBold = {4.27}]
{SimSun.ttf}
A font might not be found for many reasons.
Check the spelling, where the font is installed, etc. etc.