Enter creates a square in TextBoxes with specific fonts

Apparently the ‘enter’ character creates a square in Textboxes if the ‘MultiLine’ boolean is set to true and the Font is set to anything that is not Code, Fantasy or any of the SourceSans fonts. Example:

Depending on the font the square icon also changes (obviously). Here’s a simple repro:

  1. go into studio
  2. Insert a ScreenGui with a TextBox
  3. Set MultiLine to true
  4. Set the Font to anything except for Code, Fantasy or SourceSans (any of them).
  5. Start a test server
  6. Start typing in the TextBox and press enter
  7. As you can see, the enter character shows up even though it shouldn’t

Edit: tagging @spotco since I think he made the new fonts happen.

3 Likes

That explains the little square that shows up in the dev console when I paste lines of code in it sometimes!

It’s the \r character. (I ended up having to add code to remove that character to fix all the weird boxes my quest text had)

5 Likes

As @Vorlias said, it’s the \r character. Roblox works if you do JUST \n (Most newlines are represented by \r\n) - I’ve been able to make a workaround by changing the encoding of text that I copy/paste in Notepad++. I can’t recall which encoding I use though. Think it’s ASCII.

Gotta love Windows’ weird \r\n for newlines instead of \n

I’m having a similar issue with SourceSans, only instead of a square icon it just adds a space.

I imagine it’s related to the same issue you’re having.

Most likely. What OS are you using? I’m using Windows 8.1

I’m using Windows 10

Might explain why you’re seeing spaces and I’m seeing boxes.

The solution is simple, they just need to filter out \r.

Taking a look at this.

1 Like

poor man’s hanging indent

1 Like