I don't know if I must post this here or in the Ren'Py forum (or is it only for official announcements and comments?)
Disclaimer: My only programming experience was making a program that printed a list of the files of a given directory. Please, don't kill me.
Well, I got some free time and returned to my game-making mode, and somehow managed to set up a english/spanish SFONT in Renpy (it has the letter Ñ, and the ¿ and ¡ signs). It compiled (?) OK but at start of the game I noticed something wrong... the text was like 'blurred'.
After some checking, I discovered that the font engine insisted in drawing the 'drop-shadow' even when using a SFONT. Being bitmap-based I thought that drop shadows can be burned in the font itself (PNG file) and then my font looked funny.
MY WORKAROUND: I set the default drop_shadow to (0,0), the default was (1,1)
FIRST PROBLEM: I don't know if it works like this, but i suppose that the font engine is writing two times every character, one exactly above the other, the result is 'no drop shadow' to the user, but internally it is time-consuming for the engine.
Am I thinking well? Is there a way to disable the drop-shadows?
SECOND PROBLEM: OK, I can make a font that work OK with the automated drop-shadow. But the shadow is of the same color of the font, since it's a bitmap. Is there a way to define another bitmap for the drop shadow font?
Then, I set the SFONT as default, and...
THIRD PROBLEM: The buttons of the main menu (and all buttons) look bad. No problem, I change to another SFONT, but:
- The buttons don't change at all when I hover over them, nor when clicked.
- The buttons also have the drop-shadow that I thought I disabled some time ago
When looking in the docs of Ren'Py, there are a way to define the 'hover_color' 'selected_color' and others, but I don't know how to make it work with a SFONT.
Are there a way of defining, let's say: 'hover_font' or 'selected_font'?
Or, are there a way of defining a SFONT with (example) three bitmaps (one for each color)?
-----------------
Oh, and I put a language selction screen (an imagemap) in the 'label: splashscreen', this will modify the variable 'persistent.language' that will be then evaluated in the 'label: start'. Is this OK or I am buying some troubles with that cheat?
---------------
Plase Help me~ (T-T)
Problem with SFONTs (and others)
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:
Re: Problem with SFONTs (and others)
The Ren'Py forum is a better place for Ren'Py support. So I moved this thread here.Wolfrider wrote:I don't know if I must post this here or in the Ren'Py forum (or is it only for official announcements and comments?)
Set drop_shadow to None, rather than (0, 0), to disable drop shadows entirely.MY WORKAROUND: I set the default drop_shadow to (0,0), the default was (1,1)
FIRST PROBLEM: I don't know if it works like this, but i suppose that the font engine is writing two times every character, one exactly above the other, the result is 'no drop shadow' to the user, but internally it is time-consuming for the engine.
Am I thinking well? Is there a way to disable the drop-shadows?
Your best bet is to include the shadow as part of the font. If this makes the spacing between letters two wide, you can decrease the default_kern parameter (making it, say, -2) to cancel out the drop-shadow.SECOND PROBLEM: OK, I can make a font that work OK with the automated drop-shadow. But the shadow is of the same color of the font, since it's a bitmap. Is there a way to define another bitmap for the drop shadow font?
For best results, the drop-shadow should be to the right of the character.
Yes, just define (for example) "red_sfont", and then set style.default.hover_font = "red_sfont"Are there a way of defining, let's say: 'hover_font' or 'selected_font'?
BTW, I hope you're not making a SFont just to add support for Spanish characters, when the DejaVu font family is available.
Nope, this seems like a good idea to me.Oh, and I put a language selction screen (an imagemap) in the 'label: splashscreen', this will modify the variable 'persistent.language' that will be then evaluated in the 'label: start'. Is this OK or I am buying some troubles with that cheat?
Re: Problem with SFONTs (and others)
Thanks, Thanks, Thanks, Thanks, Thanks... T-T
And not, it's not only matter of the language. I like the look of my bitmap font ^_^
And the splashscreen with language selection... it caused an error. But I will try again (with new files) and if something wrong happens I will post the output here.
Oh, I almost forgot to say this: thanks.
I'll take note of this since today.PyTom wrote: The Ren'Py forum is a better place for Ren'Py support. So I moved this thread here.
I thought it only accepted numbers...PyTom wrote: Set drop_shadow to None, rather than (0, 0), to disable drop shadows entirely.
I was thinking on that also, it's easier.PyTom wrote: Your best bet is to include the shadow as part of the font. If this makes the spacing between letters two wide, you can decrease the default_kern parameter (making it, say, -2) to cancel out the drop-shadow.
I did it and it didn't worked. But I was messing all the script in my desperation, so I will try it again.PyTom wrote: Yes, just define (for example) "red_sfont", and then set style.default.hover_font = "red_sfont"
BTW, I hope you're not making a SFont just to add support for Spanish characters, when the DejaVu font family is available.
And not, it's not only matter of the language. I like the look of my bitmap font ^_^
And the splashscreen with language selection... it caused an error. But I will try again (with new files) and if something wrong happens I will post the output here.
Oh, I almost forgot to say this: thanks.
Who is online
Users browsing this forum: Google [Bot]