I've decided to use for my game a font ("animeace") that has three files:
animeace.ttf
animeace_b.ttf -> bold
animeace_i.ttf -> italic
I've put the three files in my game directory.
and, in my script, the command:
$ style.default.font = "animeace.ttf"
How I have to define the italic and bold files?
When I use {b} {i} it seems that ren'py doesn't use the other font files automatically.
thank you in advance
marco
ps Oh yes, I'm new here. W Ren'Py!
font: different files for bold and italic
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
This is what config.font_replacement_map is for. So what you'd want to do is to add code like:
Hope this helps, and welcome!
Code: Select all
init:
$ config.font_replacement_map[('animeace.ttf', True, False)] = ('animeace_b.ttf', False, False)
$ config.font_replacement_map[('animeace.ttf', False, True)] = ('animeace_i.ttf', False, False)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Thank you PyTom,PyTom wrote: Hope this helps, and welcome!
I'm sorry if in the next week I'm going to post some silly questions, but I'm near to complete my game and I want to polish up my code.
Consider that english isn't my native language and I had some troubles to understand and consult the Reference Manual. Luckily the examples are very well commented and I could learn the basis of Ren'Py easily.
marco
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
To be honest, the reference manual is hard to understand even for people who speak English as a first language.riktik wrote:Consider that english isn't my native language and I had some troubles to understand and consult the Reference Manual.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot], NoFanru