Italics spacing issue

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
User avatar
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

Italics spacing issue

#1 Post by EwanG »

OK, I'm trying to be "fancy" to make it easier to tell when you (or someone else) is thinking something rather than saying something. So for speech, I've been using normal text, and for "thoughts" I've been using italics. But I've been noticing that the spacing is a bit off for the italicized versions. Is that a known issue? Do I need to specify a particular font to use with italics? Or is there a better way to do what I'm trying to do?

Thanks,
Ewan

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:

#2 Post by PyTom »

Can you show an example of this? I think there might be a bit of weirdness where italic and normal text interact, but normal italic text _should_ work right.

You may also want to download an italic font, rather then using a normal font in italic mode.
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
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

#3 Post by EwanG »

Attached an image showing what I'm talking about. Notice the spacing between the v and the e in "I've" on the second line. And between the w and the h in "what" on that line.
Attachments
italics.PNG

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:

#4 Post by PyTom »

Okay, this is because the kerning tables are probably a little off. You want an oblique font. I've attached DejaVuSans-Oblique.ttf, and you'll want to add the following to your script to make it use it:

Code: Select all

init:
    $ config.font_replacement_map["DejaVuSans.ttf", False, True] = ("DejaVuSans-Oblique.ttf", False, False)
This will use the proper font.
Attachments

[The extension ttf has been deactivated and can no longer be displayed.]

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
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

#5 Post by EwanG »

Yup, that did the trick. Thanks!

Post Reply

Who is online

Users browsing this forum: Bing [Bot]