A downloadable Plugin

Download NowName your own price

Are you worried that your default text size might not be accommodating to all players or monitors?

Already experimented with text size preferences, but grew tired of unpredictable overflows and weird cut-offs due to a manually added [\n]?

Then this plugin is the answer for you!

The Textbox Scaler adds a text size preference to your Ren'Py game, and also makes sure your line widths stay proportional to the text, preventing weird cut-offs and improving legibility!

Screenshots are from my current main project, Artificial Selection!

Features

  • Adds text size options to make your game more accessible
  • Dynamically adjust the line width to preserve cut-offs
  • Flexible customization options
  • Quick to set up (though not plug-and-play)
  • Has a variable called [the_wiggle_room]

⚠️ Important Note

Changing a gui preference requires [gui.rebuild] to be run, which causes the game to freeze briefly. This is unavoidable, but this plugin makes sure it's only run once: When closing the game menu, and only IF the text size has changed.

Disclaimers

  • This plugin works best with wide textboxes (either gradients or ones that cover the full width of the screen). Windowed textboxes will look wonky unless you scale them along with the text size.
  • As mentioned above, changing the text size causes the game to freeze for around one second. If you don't want this, don't use this plugin!

How to Use

  1. Plop this file into your game's script folder
  2. Follow the instructions in the file
  3. Enjoy!

Goal

If this plugin reaches $45 in donations, I will add the functionality for dynamically sized text windows as well. This would make the plugin useful for pretty much any UI!

↓ Got any additional feature requests, or need some help setting things up?  Feel free to comment below!

Published 21 hours ago
StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(5 total ratings)
AuthorKigyoDev
Made withRen'Py
TagsAsset Pack, Ren'Py, sourcecode, Tutorial
Code licenseMIT License

Download

Download NowName your own price

Click download now to get access to the following files:

textbox_scaler.rpy 10 kB

Development log

Comments

Log in with itch.io to leave a comment.

(+1)

This comes just right in time! I have just added a couple of accessibility options and the scaling bugs me so much.

How would this work with Line Spacing Scaling in Shift+A (assuming that Font Size Scaling is unchanged but the Spacing is changed? Or what would happen if I replace the OG Font Size Scaling slider with this one, then use the Line Spacing slider? Would I have to disable that and let this plugin handle it instead?

I would have to test this out myself, but this plugin only messes with the horizontal width of the textbox and therefore should not interfere with vertical spacing. So I’ll go ahead and assume it’s compatible with the Line Spacing slider.

Please do report back if that’s wrong, though! 

One more thing along this question, since it’s been crossing my mind as well. Do you think it’s possible to add automatic textbox height scaling as well, so when the font size gets bigger, the textbox itself expands vertically to accommodate it? I believe it may cause your textbox background to be stretched depending on how your frame is constructed, but I feel like that’s a good enough tradeoff.

The current code only accounts for the text itself, not the window around it, but I can definitely see the value in that use case!

I just added this functionality as a donation goal. If there’s enough support, I’ll make this happen!

Thank you very much, I think that is fair!