[wheybags] [0.17.9] Rich text tags can't be deleted

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

[wheybags] [0.17.9] Rich text tags can't be deleted

Post by SupplyDepoo »

If I enter rich text tags like

Code: Select all

[img=item/assembling-machine-2] AP [font=default-small]1.5/s
for my blueprint name and later edit it and delete some tags, the tags don't go completely away. They're appended to whatever I change the name to.

You can see this by selecting all, copying and pasting in a text editor.

For example, my blueprint name is now:

Code: Select all

[img=item/assembling-machine-2] AP [font=default-small]1.5/s[font=default-small][font=default-large-bold][color=white][color=white][font=default][font=debug-mono][font=debug][color=0.5,0,][color=red]
I cannot remove the tags at the end and when I try to edit the title of the blueprint I get a "label is too large" error!

Even if I select all and delete, the formatting tags remain.
2019-03-11 01_58_06.gif
2019-03-11 01_58_06.gif (2.85 MiB) Viewed 3690 times

billbo99
Fast Inserter
Fast Inserter
Posts: 131
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [0.17.9] Rich text tags can't be deleted

Post by billbo99 »

Will the 200 character limit be increase on train stations? Its going to get used up fast with all the Rich Text people are starting to use.

User avatar
wheybags
Former Staff
Former Staff
Posts: 328
Joined: Fri Jun 02, 2017 1:50 pm
Contact:

Re: [wheybags] [0.17.9] Rich text tags can't be deleted

Post by wheybags »

Thanks for the report. Fixed for the next release.

User avatar
VuiMuich
Inserter
Inserter
Posts: 32
Joined: Tue Jan 16, 2018 4:37 pm
Contact:

Re: [wheybags] [0.17.9] Rich text tags can't be deleted

Post by VuiMuich »

billbo99 wrote:
Mon Mar 11, 2019 12:10 pm
Will the 200 character limit be increase on train stations? Its going to get used up fast with all the Rich Text people are starting to use.
Maybe for rich text entity icons a conversion to to Unicode glyphs with use of the UTF+16 PUA could be a solution.
Iirc Unicode is implemented anyway for support of Kanji/Kana, Kyrilic, etc.
Or is it just UTF+8?
[ˈfʊɪ̯ mʊɪ̯ç]
Bavarian, translates to: Lots of Milk

User avatar
wheybags
Former Staff
Former Staff
Posts: 328
Joined: Fri Jun 02, 2017 1:50 pm
Contact:

Re: [wheybags] [0.17.9] Rich text tags can't be deleted

Post by wheybags »

Unfortunately, it is just utf-8 stored in an std::string, and we need to do all unicode manipulation manually :(
Personally, I would switch the whole thing to 32 bit wide chars, and use some special reserved unicode range to store ids which would map to our special text tags under the hood, so we could just cleanly iterate and process text, but to force support for that into our existing gui library, and onto the entire rest of the codebase would be literal hell.
Would have made things much easier to implement though, and saved a load of subtle byte-position-vs-unicode-index bugs.
Also, having in-line image tags count as 1 char for editing purposes would have been amazing (currently, we go to great lengths to fake that effect, by calculating where the cursor should actually move to when you hit right arrow with your cursor just before an img tag, and many many other edge cases).

User avatar
VuiMuich
Inserter
Inserter
Posts: 32
Joined: Tue Jan 16, 2018 4:37 pm
Contact:

Re: [wheybags] [0.17.9] Rich text tags can't be deleted

Post by VuiMuich »

Oh, then you probably need a capable intern to go through this hell :twisted:
It will be a good lesson for any upcoming developer.

If the urge for Mac developers wouldn’t be so big it also would be a good job application test ;)

And ofc it was actually to obvious that you implemented it the way it is after well consideration.
[ˈfʊɪ̯ mʊɪ̯ç]
Bavarian, translates to: Lots of Milk

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [wheybags] [0.17.9] Rich text tags can't be deleted

Post by ownlyme »

you should be able to mark the transition between the fonts and delete it, after your text there will appear the closing tags then
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Post Reply

Return to “Resolved Problems and Bugs”