Hi,
I wanna use a specific font in my project (Bahnschrift) and it has multiple specific variations, namely :
Light Condensed
Light SemiCondensed
Light
SemiBold Condensed
etc...
So I know that to use a specific font you need to input the file name in the right place, like what I have done here for the Oswald font :
define gui.text_font = "Oswald.ttf"
But how do I tell Ren'py what specific variation of the font I want to use if they're all part of a single .ttf file ?
Multiple fonts variations in .TTF file
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.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Multiple fonts variations in .TTF file
I think you are referring to a truetype collection .ttc file
From the documentation https://www.renpy.org/doc/html/text.html#fonts
Ren’Py also supports TrueType/OpenType collections that define more than one font. When accessing a collection, use the 0-based font index, followed by an at-sign and the file name. For example, “0@font.ttc” is the first font in a collection, “1@font.ttc” the second, and so on.
Basically open the font collection, and see what 'number' the font you want to use is at, starting at 0
From the documentation https://www.renpy.org/doc/html/text.html#fonts
Ren’Py also supports TrueType/OpenType collections that define more than one font. When accessing a collection, use the 0-based font index, followed by an at-sign and the file name. For example, “0@font.ttc” is the first font in a collection, “1@font.ttc” the second, and so on.
Basically open the font collection, and see what 'number' the font you want to use is at, starting at 0
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], minyan