Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: namida on July 25, 2019, 05:39:16 AM

Title: [SUG][PLAYER] Support for unicode in level titles / etc
Post by: namida on July 25, 2019, 05:39:16 AM
Basically - as discussed on Discord, I'm happy to implement this, if someone else is happy to make the character graphics. It should be fairly easy to implement this on the code side of things.

I'll look into doing it in a way that's fairly easy to add new characters to, so we don't have to modify an entire image or manually merge the images together, every time someone submits additional characters to it.

Further down the track, this could also be used to provide translations of NeoLemmix into other languages - but for now, let's just focus on (a) getting the support in and of itself, and (b) have it working in level title / author fields.

(Of course, I won't work on this right away - I'll probably come and take a look at what needs to be done with NeoLemmix, once I'm finished my Lemmings 3D levelpack.)
Title: Re: [SUG][PLAYER] Support for unicode in level titles / etc
Post by: Dullstar on July 26, 2019, 01:39:33 AM
Based on my understanding of Unicode, it sounds to me like it would be difficult to have a complete set of characters drawn. How would missing characters be rendered? Would they be disallowed, skipped, replaced with boxes, drawn with fonts from the system, etc.?
Title: Re: [SUG][PLAYER] Support for unicode in level titles / etc
Post by: namida on July 26, 2019, 01:52:54 AM
Anything not supported is currently just skipped altogether. I'd think replacing with a placeholder character would be a preferred behaviour.

I don't see it as hugely important to support every character. Someone mentioned on IRC that they'd like to be able to use it in level titles; it wouldn't be too much work to implement this, so I figured that as long as I'm not having to make the character graphics, I'm happy to add the engine support.
Title: Re: [SUG][PLAYER] Support for unicode in level titles / etc
Post by: Simon on July 26, 2019, 02:09:20 AM
https://utf8everywhere.org :thumbsup:

Ideally, your program already loads and writes UTF-8 without any assumptions about the encoding. I.e., store everything as bytes, don't store text as WideChar/WideString that is 2 bytes in Delphi, the only use for WideChar is for filename arguments passed to Windows API, see utf8everywhere.

No need to render all of unicode, most fonts offer only a subset. Paint glyphs for the most common characters, and accept submissions for more. Did people tell you what characters they want the most?

-- Simon