Ren'Py where to put the ttf file for fonts?

xMassTransitx

New Member
Jun 15, 2018
12
6
Hi all,
I'd like to use a different font for part of my cyberpunk ren'py game.

This is the code I've written in the script.rpy file
show text "{font=Syncopate-Regular.ttf}Inside every cynical person is a disappointed idealist.{/font} -- George Carlin, comedian, philosopher, 1937-2008, 1st Sprint" at truecenter

Where should I put the Syncopate-Regular.ttf file so that it gets picked up when needed?

Do I need to do anything else to add a new font like this?

Thanks for your help!
 
  • Like
Reactions: Palanto

Palanto

Active Member
Game Developer
Oct 4, 2017
964
1,835
Actually wherever you want, I for one always put them inside a fonts folder in the game folder. So YourRenpyGame\game\fonts\

to use that font you obviously need to add the path to it, so in this case it would be:
Code:
{font=/fonts/Syncopate-Regular.ttf}Text bla bla{/font}
But you can put the file wherever you want, btw. script.rpy doesn't have to reside in the "game" folder it can be put wherever you want too, like i.e. in a "scripts" folder. But that all certainly depends on how you want the folder structure to be and if you want all files in the game folder and make a mess out of it or if you want to seperate stuff...
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,017
Shoved my fonts into a subfolder - so /game/fonts/ ... I believe there is no restriction on where to put them.
I think spaces in the path where a problem, so avoid that. Just let Ren'Py know where it is:
define gui.text_font = "fonts/nobodyshouldeverusecomicsans.ttf"

Cyberpunk? Yes please
 
  • Like
Reactions: Palanto and bas