Text does not wrap properly in NON-WebGL mode

0 favourites
  • 3 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • I'm trying to wrap text within a certain size of a text object.... and here's my issue:

    My text object must only be 200x100 pixels big.... if the text is set to wrap by character, it looks like this:



    |This is just a test. This is j|

    |ust a test. This is just a te|

    |st. This is just a test. This |

    |is just a test.                       |


    If I do it by word, it looks like this:


    |This is just a test. This is|

    |just a test. This is just a |

    |test. This is just a test.   |

    |This is just a test.           |


    Now... that's great.... BUT... if I had this instead of the text I mentioned: "abcdefghijklmnopqrstuvwxyz0123456789", it shows up like this:

    By character:



    |vwxyz0123456789         |


    By word:



    |                                          |


    Even though the text object's width is still set the same.

    Attach a Capx


    Description of Capx

    This CAPX has WebGL disabled. Try viewing it in the Debug layout - you'll notice it stretches beyond it's width.

    Operating System and Service Pack

    Windows 7 Pro 64bit with Chrome & IE

    Construct 2 Version ID


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as won't fix. This is just a quirk of canvas2d mode: it draws the text directly to the canvas, so it can end up drawing text outside the bounding box. WebGL mode by necessity uses an intermediary texture, and ends up clipping the text outside the bounding box. Fixing canvas2d mode to match WebGL mode would come with a performance penalty, and WebGL is approaching ubiquitous support now, so I'd prefer to leave it as is.

  • Awesome.

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