I have a custom font .ttf file specified in a folder on my project. I want to import that specific font into Fontfamily function.
I have tried this:
FontFamily fontFamily = new FontFamily("/myfontpath/fontname.ttf");
and this:
FontFamily fontFamily = new FontFamily("/myfontpath/fontname.ttf#font name");
but those do not seem to solve the problem. The output i received was Font "/myfontpath/fontname.ttf" cannot be found.
How to solve this problem? Thank you.