Font/Text questions

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Message
Author
User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

Font/Text questions

#1 Post 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?
Last edited by mikey on Wed Apr 13, 2005 3:51 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#2 Post 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.

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#3 Post 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? :?

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#4 Post 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.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#5 Post 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.)

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#6 Post 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

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#7 Post 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.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#8 Post 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.

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#9 Post 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 :?

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#10 Post 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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#11 Post by mikey »

PyTom wrote:Hope this helps.
It did. :P Thanks.

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#12 Post 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.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#13 Post 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
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#14 Post by mikey »

Works! :wink: Thankyou!

User avatar
mugenjohncel
Hentai Poofter
Posts: 2121
Joined: Sat Feb 04, 2006 11:13 pm
Organization: Studio Mugenjohncel
Location: Philippines
Contact:

Uh... I too have a font question

#15 Post 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)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]