Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

[Solved] Bad linebreak in devlog

A topic by Arekku created Jan 08, 2021 Views: 267 Replies: 9
Viewing posts 1 to 4
(4 edits)

I just posted a devlog, not the best one I'll admit.

One of the things I changed was "The code for not attacking was a bit too conservative, has been relaxed a bit", but for some reason it broke the line like this

"The code for not attacking was a bit too conservative, has be
en relaxed a bit"

Is there anything I could have done to cause the linebreak to be in the wrong location?

"The code for not attacking was a bit too conservative, has
been relaxed a bit" would look a lot better.

I have tested in both Firefox and Edge, both browsers linebreak the same so I don't think it is my browser.

Moderator(+1)

I tried to view your devlog and resizing my browser window. It seems this happens on all words, and they can be broken at any character, to fit the screen.

I checked one of my devlogs, and words are never broken in half, no matter how the browser is resized.

Do you have custom CSS in your page? If so, there’s a chance the word-break property is not set properly. For more information you can read this: w3schools - CSS word-break Property.

If you don’t have custom CSS, I’m not sure what’s happening. It should be in some way related to the page’s visuals.

I don't have custom CSS, but I'll have a look at the page visuals.

These are the settings I'm using:

BG: #373737
BG2: #505050
Text: #ffffff
Link: #f22e00
Headers: (Blank)
Buttons: (Blank)
BG2 Alpha: (Full)
Text: Sans Serif
Size: Very Large
Header font: Default font
Screenshots: Auto
Banner: (Image)
Align: Center

Could it be the font?
Moderator(+1)

Just from these settings, there doesn’t seem to be anything that would affect how lines are breaking. There could be a chance that either the font or the font size are affecting this behind the scenes.

I wouldn’t be surprised if this is applied when font size is set to “Very Large”, but was never aware of it.

(+1)

At first I thought it's probably just bad luck with the word-break property, but this sparked my curiosity, so I checked it out in Firefox Tools (Inspector), and it seems the HTML for the first list item for some reason has no-break-spaces (nbsp) instead of regular spaces like the other two list items. I tried retyping the line with regular spaces in the Inspector and then it looked fine, so I suggest you retype that line in your devlog making sure you're not  somehow entering  nbsps and see if that fixes it.


(+1)

Thanks that fixed it.

No idea how I managed to pull that one off... but now I know what to look at should it happen again.

It's really not obvious! At first I didn't see anything wrong on Firefox because you have to click on the list element and select Edit HTML to actually see the nbsps, but then I decided to check it out on Microsoft Edge and their inspector showed the problem immediately.

Moderator(+1)

No idea how I managed to pull that one off…

Was the text possibly copy-pasted from a different program/website? That could explain it.

Copy pasted from scite

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.