Issue with space and BBcode with Safari/IOS

0 favourites
  • 6 posts
From the Asset Store
Build a thrilling space station scenario with these level assets and characters.
  • Hi,

    I'm using a font that I just realized have an issue on Iphone: after my BBCode color exit tags, there is no space and the words are glued together.

    Here is the kind of text I'm using:

    When I arrive home, [color=#21a6ff]first I wash my hands[/color] with [color=#21a6ff]soap[/color] and water;

    So I would like to know how to add a non-breaking space (or something similar) after each tag?

    Thanks in advance

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can try something like this:

    variable t = When I arrive home, [color=#21a6ff]first I wash my hands[/color] with [color=#21a6ff]soap[/color] and water
    
    Set t to replace(t, "[/color]", "[/color] ")
    Text set text to t
    

    Where the space at the end of "[/color] " string is not the real space, but one of the invisible characters from this website:

    emptycharacter.com

    (scroll down and copy/paste one of the characters from the table)

  • Thank you dop2000 for your help (and sorry for the veryyy late answer, I was focusing on my android release :)

    So actualy the solution you propose is kind to hard to put in place because I have a lot of text in a lot of different places and I'm not sure to understand how to make it automatic for everything...

    I think the issue really comes from Safari. and it's not really a spacing issue because it looks very random.

    I'm the only with this issue with BBCode and IOS?

  • Have you tried putting double or triple spaces before and after color tags? If it helps, you can add an event that will these extra spaces automatically into your text. Or simply use Find and Replace function in Notepad or Word.

  • I have tried but I can't find the way to integrate special caracters in my text as it is .txt and .xml files (for translation).

    Could you please tell me the way to write them into it?

    Because when I'm doing &#32 or [&#32] for exemple, it's not working...

    Thanks again!

  • Did you test with 2-3 spaces??

    .

    If you want to try invisible characters instead of regular space, add the following event:

    Set t to replace(t, "[color]", " [color]")
    Set t to replace(t, "[/color]", "[/color] ")
    

    Where t is a variable containing your text, and the space inside the quotation marks is one of the invisible characters copied from this page:

    emptycharacter.com

    (Select and copy them from between the blue brackets in the example column from the webpage, and then paste into the expression in Construct)

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