Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Furigana doesn't utilise same colour as speaking character #5418

Closed
Stormsinger-Frostclaw opened this issue Mar 14, 2024 · 4 comments
Closed

Comments

@Stormsinger-Frostclaw
Copy link

So, I've implemented furigana into my project. However, although I have different font colour for certain characters, when furigana is loaded in their text, it doesn't take into consideration the colour it should be, and only shows in white.

image

For reference, here's my code.

## Ruby Text (Furigana) #######################################
##
## Shows hiragana/katakana over the kanji

style ruby_style is default:
    size 15
    yoffset -30 

style say_dialogue:
    line_leading 12
    ruby_style style.ruby_style

style history_text:
    line_leading 12
    ruby_style style.ruby_style

Is there something I'm missing, or is it just not able to take font colour into consideration?

@Stormsinger-Frostclaw
Copy link
Author

I forgot to add the example from my character define.

define tora = Character(_('         Torahiko'), color="#FFFF00", what_color="#ffff9c", who_outlines=[ (1, "#000", 1, 1) ], namebox=True, image='tora', window_background=Image("gui/textboxa.png", xalign=0.5, yalign=1.0), ctc="ctc_blink", ctc_position="fixed")

@renpytom
Copy link
Member

Done.

You'll need to tell Ren'Py to do this, by adding

color None

to the ruby_text style.

@Stormsinger-Frostclaw
Copy link
Author

I did what you said, and it caused the game to crash. However, I found a bit of a workaround thanks to an old post on the forums (which I found when I ran a Google search for "ruby_text color". It involved me opening the renpy/text/text.py file and searching for

ts.take_style(style.ruby_style, self)
and changing it so it reads

                color_style = ts.color
                ts.take_style(style.ruby_style, self)
                ts.color = color_style

Also did it for ts.take_style(style.altruby_style, self)

I appreciate your help. If not for how you worded it, I probably wouldn't have attempted, caused a crash and searched for the exact query that helped me find this workaround.

@renpytom
Copy link
Member

Can you try the newest version? Really, it should without the mod - however, I had forgotten to push the change to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants