How do I work around mobile accessibility options making my text too big?

  • Hi! I'm making a Tinder-like interface for my game, with fixed-size boxes for character descriptions. I wrote them short and to the point so they'd fit my boxes nicely. I had a lot of people test it and it looked good, until I had my mom test an Android export. She configured her phone with large fonts for accessibility, which causes Construct to put large fonts on all my Text objects, breaking my design completely.

    It's easy to replicate by just changing the corresponding accessibility option on my phone, but it only does this with the Android export, not the web version (which looks as intended regardless of the phone's font configuration). I don't have an iOS device to test it.

    I tried to make my game friendly for people with eyesight problems, fonts are relatively large and I recorded voice for all texts so you can hear them out loud if you tap on them, but I would really like for my fonts to stay the size I gave them.

    Do you all know about this problem/feature? Is there a way to circumvent it? Any tips for dynamically shrinking a font until if fits the box?

  • maybe have an option that when you click the text it brings up a subsequent box that has the large font within it until you release your click (IE touch, when holding object, create _____)

    that way the text appears normally until you click the box, if you click the text under the photo it brings up the text for easier reading in another box that has larger text

    however, this doesn't really affect your problem of the large font affecting your game, this is merely a possible counter solution to having larger text without affecting your created sprites

  • btw, just out of curiosity, did you model the dude in the pic after Stephen Dorff?

  • Haha the art is from a different game I worked on, I've no idea what they used as reference (though I have their permission to use the art).

    Yeah, what you propose would be a nice accessibility option, but I'd still need to fix the fonts on the default screen. Besides, I already made it so tapping on the texts triggers the voice reading. And this is not only for informative texts—if you compare the screenshots even the title of the game is shown incorrectly.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • do you have pixel rounding on? it might interfere with the mobile retina or Physical Resolution.

    understanding pixels resolutions

    hope it helps.

    if it doesn't fix it for you, you will have to code in events for mobile platforms a different font size.

  • I do have pixel rounding on. I turned it off and exported a new build but it didn't change anything regarding font size.

    I found a workaround, which is checking for Texts that are taller than their box, and shrinking their fonts by small increments each frame until they fit. The result is…not pretty, since they always go for the biggest possible font size that will fit the box, not my hand-picked aesthetically pleasing font size, but at least no text becomes invisible. And if the player picked the largest font in her accessibility options, there are worse things than displaying the largest possible size.

    I'm still curious to know if this is intended behavior. I'm all for accessibility options (and have put voice acting in my game because of that) but I'd like to have some control over how they look.

  • I'm not sure if that is a intended behavior, it might be on some devices it acts like that and some doesn't? Ashley should be able to know this better.

    Another work around would be to use spritefonts instead of texts, it might be the spritefont aren't gonna be interfering with the mobile device text rendering, since they are image based.

    Also instead of adjusting the font by decreasing their size, i would set the font to be locked at a surtain size, for example let's say on desktop you have it at 24 points, but when mobile is detected force 24 points or 20 points, when the text is updating the text.

    You can use the system expression is on platform

  • I don't think that fix would work exactly. I don't need to check only if it's playing on mobile, but whether it's playing on mobile as an app and the accessibility options are configured for large font sizes. Moreover, it seems to also alter line height (or not scale line height appropriately).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)