Ren'Py memo

Ren'Pyの個人的なメモ

JF-Dot-Kappa20-0213の~表記

JF-Dot-Kappa20-0213.ttfを使用した時の~表記が気になるが
テキストを毎回そのへんを気にするのは面倒なのでRen'Pyに置き換えてもらう

~(U+FF5E)が˜の表示になるので
config.replace_textで~(U+301C)に変換する
設定変数 — Ren'Py Documentation

    def replace_text(s):
        s = s.replace('~', u'\u301c') # em dash
        return s
    config.replace_text = replace_text
変換前と変換後