RENPY 中文替换字体的解决办法,解决生僻字框框

您所在的位置:网站首页 门字框的繁体生僻字 RENPY 中文替换字体的解决办法,解决生僻字框框

RENPY 中文替换字体的解决办法,解决生僻字框框

2024-05-27 15:36| 来源: 网络整理| 查看: 265

  官方的说明文件讲的很含糊,仔细看下官方文档来说的是替换编辑器的字体文件,而你如果要替换游戏工程的字符,你就要进入到\\[project name]\game 目录下 编辑gui.rpy ,替换注释原先fonts代码 ## 用于游戏内文本的字体。 #define gui.text_font = "SourceHanSans-Light-Lite.ttf" define gui.text_font ="SourceHanSerifCN-Regular.otf" ## 用于角色名称的字体。 #define gui.name_text_font = "SourceHanSans-Light-Lite.ttf" define gui.name_text_font ="SourceHanSerifCN-Regular.otf"

 

然后将字体文件放入到E:\RENPY\project SG\game

 

哎,希望对别人有帮助吧,网上的教程实在太少了,整天要翻墙去找。

字体下载链接不公开了,请大家自己去找

---------------------

Changing Fonts

Ren'Py ships with a default font (DejaVuSans) that covers most western languages, but other fonts are often needed. A font can be configured by editing launcher/game/tl/language/style.rpy, and adding:

init python: translate_font("language", "myfont.ttf")

Where "language" is the language in question (for example, "japanese"), and "myfont.ttf" is the font that should be used (for example, "MTLc3m.ttf"). The font file should be placed in the launcher/game/tl/language directory, so it can be found by the launcher.

Changing the Launcher Style

The styles used by the launcher can be configured by setting variables in a translate python block. The following variables are available. The names are a bit confusing, as they reflect the English-language translation.

These variables are only available in the launcher.

define gui.LIGHT_FONT = "Roboto-Light.ttf"

The path to the font used for normal text in the launcher.

define gui.REGULAR_FONT = "Roboto-Regular.ttf"

The path to the font used for heavy-weight text in the launcher.

define gui.REGULAR_BOLD = False

If True, heavy-weight text is bolded.

define gui.FONT_SCALE = 1.0

A scaling factor that is applied to all text in the launcher.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3