Page 1 of 2
Font/Text questions
Posted: Fri Dec 10, 2004 12:29 pm
by mikey
I have a question about fonts and I thought all font-related things could go here. Okay then:
I am using Arial as my font, but no matter what I change, I can't get that antialiasing effect out. I have successfully removed shadows and other things, but when in fullscreen, the letters always seem to be a little watery (smoothed).
Is there a way to have "bitmap/pixellated" (Kaori-style) font without any special effects?
Posted: Fri Dec 10, 2004 7:01 pm
by PyTom
Right now, this isn't possible. I'll add it as a new text property in 4.3. I just didn't think that people would be wanting aliased text, so I hardcoded antialising on.
Posted: Thu Dec 16, 2004 1:48 pm
by mikey
Another "font" question (didn't want to start a new topic)...
I replaced the "default" font of renPy with simple Arial. When I try to write text that is in Slovak (central european, win-1250 I think...), the game will crash with the message "unrecognized character". Say if I write : "Môj zaľúbený hlupáčik". Is it in the font? I believe Arial has Central European characters that you can choose. Anyway, what can be done?

Posted: Thu Dec 16, 2004 1:53 pm
by PyTom
Are you saving the script as UTF-8? (I believe notepad has an option to do this, among other programs.) If not, email me the script as an attachement and I'll poke and prod it a bit to see what's up.
Posted: Thu Dec 16, 2004 2:03 pm
by PyTom
Also, just as a reminder, send me the traceback that is produced. By looking at it, I can tell if the problem is one of script loading or font rendering. (I lean towards the former, but it's hard to tell from just the error message.)
Posted: Thu Dec 16, 2004 2:05 pm
by mikey
Thanks! I'll try that, it kept telling me something about UTF-8 or so...
I also have a question about how easy/hard it can be to have a "dual" language game. I was thinking of having a basic "English" version and a slovak version (which would use the same BGs, characters etc, so the only difference would be the script file.) in the form of a "patch" that would overwrite whatever would be needed to be overwritten (the script file I guess). You don't have to go into too many details, just how complicated it would be. The emergency version is naturally releasing two standalone versions. The script (story) is already written in Slovak, but the English ver could take a while to translate/rewrite. So I was thinking of releasing a Slovak version first (hopefully in a few months). But if it would be possible to simply "patch" the game with the script.rpy file or in a similar simple procedure, I'd wait and release it simultaneously. (oh, yes, it's not a "game" per se, more like a visual novel)
PS> I'll bring it next time (trackback.txt) thanks
Posted: Thu Dec 16, 2004 3:50 pm
by PyTom
I booted up windows and checked, and notepad has an "Encoding" field in the save as dialog, which should be set to UTF-8 when using non-ascii characters. (ASCII is a subset of UTF-8.)
A patch could be created by dropping new rpy/rpyc files into the game directory. But I think the standalone version is possibly better, as I don't think that many people would play both versions, and patching adds additional complexity to the user experience. I would expect that people would probably play in either Slovak or English, but probably not both at the same time.
If the issue is bandwidth or server space, let me know and I can help you with hosting.
BTW, when you claim that the new project is less of a game then a visual novel, do you mean that it doesn't have multiple endings? I thought that all of your games qualified as visual novels.
Posted: Fri Dec 17, 2004 5:11 pm
by PyTom
Oh, inspired by Mikey's desire to ship both English and Slovak versions in the same package, I implemented (in my development version) the use of the executable name to choose the directory to load scripts from.
From the changelog for the development version:
Code: Select all
Ren'Py now uses the name of the executable to choose the directory to
read the script from. It does this by looking at the name of the
executable that was used to run Ren'Py. It strips off the extension,
and anything preceding the first underscore in the name, if such a
thing exists. It then looks to see if that directory exists, and if it
does, uses it. For example, if the program is named "run_en.exe", the
"en" is used, while if the program is named "homestay.exe", the
directory "homestay" is used.
The config variable config.searchpath is a list of directory that are
searched for image files and other media (but not scripts, since all
scripts are loaded before the variable can be set). This allows
multiple game directories to share images, music, and other data files.
Posted: Wed Apr 13, 2005 3:51 am
by mikey
Okie, a small revival of the font/text thread...
I have a few questions (I couldn't find them in the reference manual or tutorials)...
1. How do you set a specific type of font for the main menu?
(Say I want to use Arial Narrow for in-game text and Garamond for the menus)
2. This is more important to me now: I have copied and edited the odd_window lines and put them into an init block. So the odd-window is defined. But how do I make the whole text being shown in the odd window?
In the demo game you use the line *eodd "something Eileen says"* and eodd is defined with a character after the init bloc (something like eodd = Character Eileen 200 300 windowtype oddwindow). But I want to use it globally, for all text be it with or without characters.

any help is good

Posted: Wed Apr 13, 2005 8:14 am
by PyTom
mikey wrote:1. How do you set a specific type of font for the main menu?
(Say I want to use Arial Narrow for in-game text and Garamond for the menus)
Basically, the key is to find the right thing, and just style that. The easiest way is probably to style button_text with the new font. (button_text is inherited from by all of the different styles of buttons used on the game and main menus.)
So you'd write:
Code: Select all
init:
$ style.default.font = "Arial Narrow"
$ style.button_text.font = "Garamond"
And it should work.
2. This is more important to me now: I have copied and edited the odd_window lines and put them into an init block. So the odd-window is defined. But how do I make the whole text being shown in the odd window?
Basically, instead of trying to make everybody use the odd window, make the default window odd. You can do this by changing style.window. For example:
Code: Select all
init:
$ style.window.left_margin = 100
$ style.window.right_margin = 5
Hope this helps.
Posted: Thu Apr 14, 2005 4:28 am
by mikey
PyTom wrote:Hope this helps.
It did.

Thanks.
Posted: Wed Apr 20, 2005 12:41 pm
by mikey
mikey vs. the Fonts, round 3...
I can't find a way to make default text (the one that normally shows in the text window) without any shadows. I succeeded in defining menu text without shadows (drop_shadow 0, 0 something like that), but it doesn't work for default fonts. Does somebody have a simple line of code for me?

Thanks.
Posted: Wed Apr 20, 2005 1:21 pm
by PyTom
mikey wrote:mikey vs. the Fonts, round 3...
I can't find a way to make default text (the one that normally shows in the text window) without any shadows. I succeeded in defining menu text without shadows (drop_shadow 0, 0 something like that), but it doesn't work for default fonts. Does somebody have a simple line of code for me?

Thanks.
To remove all drop shadows:
Code: Select all
init:
style.default.drop_shadow = None
style.button_text.drop_shadow = None
Posted: Thu Apr 21, 2005 1:17 pm
by mikey
Works!

Thankyou!
Uh... I too have a font question
Posted: Wed Aug 16, 2006 7:35 am
by mugenjohncel
How do you put a thin black line around the fonts?
(I've seen it in Mikey's O3 and that is exactly what I needed right now)