ScratchData LogoScratchData
Back to papipupepappa's profile

Text Rendering Bug - Version 2

PApapipupepappa•Created October 3, 2020
Text Rendering Bug - Version 2
9
6
102 views
View on Scratch

Instructions

This is an updated version of the above project. This one has a third sprite that fixes the problem entirely. Click the stage to cycle through the costumes. Click the buttons to change sprite. This is a demonstration of a text rendering bug that cuts of the last line of text, or, if there is a second text frame in the costume, distorts the text. Sprite 1 demonstrates the bug. Sprite 2 demonstrates my previous "easy fix" - just add an extra linebreak. There still is some distortion to the text though. Sprite 3 demonstrates how you can fix it, and what the problem is. Scratch transforms the text to SVG graphics before rendering it, and doing so, my theory is that the bounding box tends to be a bit too small, which results in text being cut off. Although I'm not 100% sure of that, I am at least sure of how to fix it - adding a rectangle around the text, forcing the bounding box to be larger. In this demo the rectangle has an outline to show where it is, but it works just as well with a fully transparent rectangle.

Project Details

Project ID432258481
CreatedOctober 3, 2020
Last ModifiedOctober 3, 2020
SharedOctober 3, 2020
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root