Trouble with Bold Font Replacement Mapping? Japanese fonts

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
017Bluefield
Regular
Posts: 93
Joined: Mon Dec 30, 2013 1:55 am
Projects: Project Bluefield - Origins
Organization: Autumn Rain
Deviantart: playerzero17
itch: autumn-rain
Contact:

Trouble with Bold Font Replacement Mapping? Japanese fonts

#1 Post by 017Bluefield »

I'm using config.font_replacement_map to replace pseudo-Bolded fonts (regular fonts made bold by Ren'Py) with separate Bold font variants. The code below is set up to do so. In a recurring screen I have set up, however, it still seems to use the pseudo-Bolded fonts when I use b tags. To get the right font to appear, I have to use the font tags instead. I'm still not sure if I made a mistake with the font replacement maps that I set up.

Code: Select all

init python:
    gui.init(1280, 720)

    ...

    config.font_replacement_map["fonts/Noto_Serif_JP/NotoSerifJP-Regular.otf", False, False] = ("fonts/Noto_Serif_JP/NotoSerifJP-Regular.otf", False, False)
    config.font_replacement_map["fonts/Noto_Serif_JP/NotoSerifJP-Regular.otf", True, False] = ("fonts/Noto_Serif_JP/NotoSerifJP-Bold.otf", False, False)
    config.font_replacement_map["fonts/Noto_Sans_JP/NotoSansJP-Regular.otf", False, False] = ("fonts/Noto_Sans_JP/NotoSansJP-Regular.otf", False, False)
    config.font_replacement_map["fonts/Noto_Sans_JP/NotoSansJP-Regular.otf", True, False] = ("fonts/Noto_Sans_JP/NotoSansJP-Bold.otf", False, False)

017Bluefield
Regular
Posts: 93
Joined: Mon Dec 30, 2013 1:55 am
Projects: Project Bluefield - Origins
Organization: Autumn Rain
Deviantart: playerzero17
itch: autumn-rain
Contact:

Re: Trouble with Bold Font Replacement Mapping? Japanese fonts

#2 Post by 017Bluefield »

screenshot0006.jpg
Here's a visual example. The topmost character is rendered from the {b}{/b} tags. The following and characters use the {font=___}{/font} tags.

User avatar
Andredron
Miko-Class Veteran
Posts: 774
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Trouble with Bold Font Replacement Mapping? Japanese fonts

#3 Post by Andredron »

Here renpa is not to blame. This font itself displays the hieroglyph. In such screens, the most ideal is to make a webp image with empty backgrounds and text as you need it to look
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18

Sawa - a game of the Drow Nation

Honest Critique

Poses in visual novels, or how to hold a character properly in the frame

Help save articles to the webarchive. [/color]

Please save your projects on github, you would know how hard it is to find projects after 7 years...

Post Reply

Who is online

Users browsing this forum: Google [Bot]