RenPy and fonts: Gibberish

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.
Post Reply
Message
Author
Lishy
Miko-Class Veteran
Posts: 555
Joined: Mon Oct 18, 2010 9:14 pm
Contact:

RenPy and fonts: Gibberish

#1 Post by Lishy »

Hey guys, why does my font appear as gibberish ingame?

Image

This is the code from options.rpy:
#########################################
## Font
style.default.font = "font/sazanami-gothic.ttf"
style.default.size = 19.5


#########################################
And this is a download to the font (I think, not uploaded by me):
http://www.mediafire.com/?qftnzzxwjok

Sazanami Gothic is a Japanese font, but it has complete english support. That is why I am baffled why this is happening in RenPy. Ideas what to do?
-

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: RenPy and fonts: Gibberish

#2 Post by Camille »

Some questions:

- This looks like an NVL screen. Have you altered the style of the text in the NVL screen at all?
- How else have you styled the text other than font/size (outside of NVL)?

Try downloading this font from somewhere else and replace the file you have in your game folder and see if that helps anything? I mean it could just be that your font file is corrupt or something. I can sort of make out the letters so it's not total gibberish, it's just that the font is coming out really oddly. I know a lot of people in this forum use/have used Sazanami Gothic Regular, so this shouldn't be a problem.

Edit; Okay I just downloaded the font you uploaded and the same thing happened in my game, so uh. I'm not really sure now. D: The font seems to show up just fine in like, menus and such, though... Which is weird.
Last edited by Camille on Wed May 18, 2011 9:38 am, edited 1 time in total.

User avatar
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: RenPy and fonts: Gibberish

#3 Post by PyTom »

Okay, this is a weird one. If I'm understanding what's happening here (which I'm not 100% sure I am), it appears that things are going wrong with the font hinting. It looks like the problem is happening because we're asking for an antialiased version of the font, but the font program only wants to give us the aliased version.

I'd try:

Code: Select all

init python:
    style.default.font = "font/sazanami-gothic.ttf"
    style.default.size = 19.5
    style.default.antialias = False
I've tried this both with my build of freetype and with Ubuntu's - and the problems persist. So it's likely an issue with the font or freetype, rather than something Ren'Py specific.
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

wolveski
Regular
Posts: 40
Joined: Sun Jul 26, 2009 5:06 pm
Completed: none...yet
Projects: Heavens Falls (WIP)
Location: Leeds,England
Contact:

Re: RenPy and fonts: Gibberish

#4 Post by wolveski »

it looks like (though i could be wrong) the font is linux based only? doing a search mentions a lot of ubuntu but nothing about winbloze

Lishy
Miko-Class Veteran
Posts: 555
Joined: Mon Oct 18, 2010 9:14 pm
Contact:

Re: RenPy and fonts: Gibberish

#5 Post by Lishy »

Alright, so what about the alternative? Salvaging the font? Though, I could swear, I had it work once before. I'll try asking him, or seeing if I'm using a bad version of the font. But any help is appreciated!

edit: How about this? I cannot test it at this moment though:
http://packages.debian.org/sid/ttf-sazanami-gothic
-

User avatar
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: RenPy and fonts: Gibberish

#6 Post by PyTom »

I don't know what the alternative is, offhand. Things should work the same way across platforms, so once you find a build that works, it should work everywhere.
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

wolveski
Regular
Posts: 40
Joined: Sun Jul 26, 2009 5:06 pm
Completed: none...yet
Projects: Heavens Falls (WIP)
Location: Leeds,England
Contact:

Re: RenPy and fonts: Gibberish

#7 Post by wolveski »

have you put the font in windows/fonts?

just an idea

User avatar
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: RenPy and fonts: Gibberish

#8 Post by PyTom »

wolveski - Ren'Py doesn't look in that directory.
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

Lishy
Miko-Class Veteran
Posts: 555
Joined: Mon Oct 18, 2010 9:14 pm
Contact:

Re: RenPy and fonts: Gibberish

#9 Post by Lishy »

Maybe it is the font.. Weird.. Seems to work when I use the default.ttf from the Umineko translation.. So I have this working.. I guess??

So it's probably the font afterall. /thread
-

wolveski
Regular
Posts: 40
Joined: Sun Jul 26, 2009 5:06 pm
Completed: none...yet
Projects: Heavens Falls (WIP)
Location: Leeds,England
Contact:

Re: RenPy and fonts: Gibberish

#10 Post by wolveski »

PyTom wrote:wolveski - Ren'Py doesn't look in that directory.
i know,but as you stated you don't think its a Ren'py problem so i'm thinking it could be the hanari(?) text that the p.c itself cannot recognise so just thought that it might help

like i said just an idea :)

User avatar
Chu-3
Veteran
Posts: 424
Joined: Fri Oct 01, 2010 12:01 am
Completed: CAFE 0~The Drowned Mermaid~,duplicity~Beyond the Lies~, East Tower Series,How to Take Off Your Mask,CAFE 0 ~The Sleeping Beast~, How to Fool a Liar King
Projects: How to Fool a Liar King
Organization: roseVeRte
Tumblr: roseverte
itch: roseverte
Contact:

Re: RenPy and fonts: Gibberish

#11 Post by Chu-3 »

How about by changing the size to 22?
screenshot0004.jpg
I dunno what happened, but if I change the size to 20 or 21 point, renpy will be forcibly shut down when I pressed the "Start Game" button.

Post Reply

Who is online

Users browsing this forum: Google [Bot]