Page 2 of 4
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 6:49 pm
by grump
????????????????????????????????????????????
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 6:55 pm
by zorg
grump wrote: ↑Tue Jan 18, 2022 6:49 pm
Just as a hypothetical: if you were to make a multiplayer game with chat functionality,
emoji support would be a major thing that you have to support in 2022.
Why? Did people forget how to use words, and now they absolutely
need such symbols?
I disagree that it's a must; obviously it's nice to have, but that felt like an absolute claim (even as part of a hypothetical, which, as i read it, was about the making the game part, not the emojis being a "have to support" thing part) which is, i want to say, simply untrue.
(Admittedly, i'm just being nitpicky about phrasing...)
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 7:22 pm
by grump
????????????????????????????????????????????
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 7:37 pm
by EngineerSmith
Not even Unity natively supports emojis (and possibly Unreal, couldn't find out from my googles if it does or not). Most games I've played don't do full emoji support, and instead add basic emojis wrapped with colons and insert custom images at those positions (you can use libraries like sysl-text to insert an image into text if it matches against the correct keyword within colons). You can always convert emojis written in by keyboard input or paste to these colon formatted emojis too
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 7:44 pm
by zorg
I agree that it's expected, but just as you say, grump, i don't need to like the trend, nor do i need to care about the feature/impl./pull request, hence it's not something someone -has to- support (at all costs). And yes, there are probably a lot of ways to implement such functionality anyway if someone really needs it... but then again, that also goes for RTL and TTB text as well, which is (as i understand it) hard to "fully" support as well, for some definition of fully.
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 7:45 pm
by MrFariator
More often than not I see games implementing their own sets of emotes (eq. Monster Hunter World/Rise, Dota2, among others), or even dances or gestures (like Guilty Gear Strive), as opposed to implementing emojis outright. If you were making a straight up communication app, however, then I could see the need.
Personally, I feel it's a little silly to expect every framework or engine to support emojis out of the box, when even Unity doesn't do it. After all, the subset of developers who benefit from such an inclusion is relatively small, given how most games are single player experiences rather than multiplayer. Even then, it's becoming increasingly common that players chat outside the games by using external tools, and so the in-game chat gets relegated to simple communication between strangers in public matchmaking, where basic text is enough.
That's not to say I'm opposed to the idea of löve getting emoji support, far from it, but it's understandable why it's not really an immediate concern.
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 8:06 pm
by grump
????????????????????????????????????????????
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 9:35 pm
by pgimeno
I made a simple proof of concept with the font I linked, and it worked out of the box, which is why I linked it:
Code: Select all
local fnt = love.graphics.newFont('NotoEmoji-Regular.ttf')
love.graphics.setFont(fnt)
function love.draw()
love.graphics.print('\xF0\x9F\x98\x80')
end
There may be a problem that my simple POC did not show. I thought the characters were not showing up for dusoft, but maybe I was wrong and the problem is not exactly that.
Re: How to draw color emojis with love.graphics.print()
Posted: Tue Jan 18, 2022 10:25 pm
by slime
grump wrote: ↑Tue Jan 18, 2022 8:06 pm
Emoji are just a tiny part of this. RTL (or whatever direction your weird country likes to write in) and combining characters are much more important and unsupported.
I agree RTL is important. It's also completely off-topic to this thread. Your attitude related to this
open source community-run project is consistently tiring to me. I contribute as a community member to this project in my spare time because I enjoy it. The attitude you bring significantly reduces my enjoyment.
grump wrote: ↑Tue Jan 18, 2022 8:06 pm
Having support for major Unicode features is not an unreasonable request. It's a huge thing and difficult to support, and I certainly wouldn't want to be the one that implements it.
There is a separate issue in the issue tracker for it. No one told you it's an unreasonable request, you made the assumption yourself. Because love is an
open source community-run project, for something to be implemented a member of this community has to both want to do it and have the free time and skills required to do it, and also prioritize it above every other feature or fix they could be working on instead.
As for emoji, as pgimeno points out they're already supported to a degree as far as I know. It's color truetype fonts that are not supported. And I gave a workaround for color fonts (in lieu of a community member contributing ttf support) earlier in this thread.
Re: How to draw color emojis with love.graphics.print()
Posted: Wed Jan 19, 2022 5:06 am
by BrotSagtMist
Full color emojis for a multiplayer chat is exactly what id like to have at some point...
Images are pretty useless for that if you want seamless zooming.
Anyway, a while ago i posted this simple parser
https://love2d.org/forums/viewtopic.php?f=5&t=91900
This method can be used to add at least one or two colours for a few selected chars:
Its something i guess *shrug*
Regarding fonts, there is a mass of file formats and lack of proper programs, we should be lucky with what we have for now i guess.
Id be happy if someone could name any of said export programs or any font editor that does not seem to have gone EOL in the 90s.