We’re developing a game with developers using both Windows and Linux as their operating systems.
We’ve set everything up to handle the cross-platform compilation and different environments.
Now we’re trying to add a Font. We’ve added several before, but the issue now seems to be that Windows refers to the font as Apercu-Mono and Linux refers to it as Apercu Mono.
Just put the font file right next to the .spritefont file that references it. This way you don’t need to rely on the installed fonts of the OS. I tested it with .ttf font file and it works on Windows, Mac, Android and iOS too.
The problem isn’t that the font can’t be found or is missing - the problem is that Windows and Linux are using different identifiers for the font.
One other difference is that Windows allows the style to be in the name, i.e. Apercu-Mono Bold while Linux will throw an error. Fortunately both work as expected if you use the style tag.