renpy/doc/cookbook/Good Looking Italics

From Ren'Py

Jump to: navigation, search

Good Looking Italics

If you plan to do a lot of work in italics, such as having the narrator's voice be in italics by default, you'll want to use an oblique font.

First, you'll want to download DejaVuSans-Oblique.ttf and put it in your project's game directory. (On most platforms, you can get to this directory by clicking the "Game Directory" button in the Ren'Py Launcher.)

Then, you need to add the following line to an init block:

    $ config.font_replacement_map["DejaVuSans.ttf", False, True] = ("DejaVuSans-Oblique.ttf", False, False)

For example:

init:
    $ config.font_replacement_map["DejaVuSans.ttf", False, True] = ("DejaVuSans-Oblique.ttf", False, False)

This modified the config.font_replacement_map to use the uploaded font in place of the regular font when doing (non-bold) italics.

The supplied font is of course not the only font you can use. Any true type font which you can legally distribute, you can use in a Ren'Py game.

Personal tools