How to draw color emojis with love.graphics.print()
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How to draw color emojis with love.graphics.print()
????????????????????????????????????????????
Last edited by grump on Wed Jan 19, 2022 3:02 am, edited 1 time in total.
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: How to draw color emojis with love.graphics.print()
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...)
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: How to draw color emojis with love.graphics.print()
????????????????????????????????????????????
Last edited by grump on Wed Jan 19, 2022 3:02 am, edited 1 time in total.
- EngineerSmith
- Prole
- Posts: 38
- Joined: Thu Dec 02, 2021 11:38 am
- Contact:
Re: How to draw color emojis with love.graphics.print()
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
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: How to draw color emojis with love.graphics.print()
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.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Party member
- Posts: 559
- Joined: Wed Oct 05, 2016 11:53 am
Re: How to draw color emojis with love.graphics.print()
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.
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()
????????????????????????????????????????????
Last edited by grump on Wed Jan 19, 2022 3:02 am, edited 1 time in total.
Re: How to draw color emojis with love.graphics.print()
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:
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.
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
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: How to draw color emojis with love.graphics.print()
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.
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.
- BrotSagtMist
- Party member
- Posts: 659
- Joined: Fri Aug 06, 2021 10:30 pm
Re: How to draw color emojis with love.graphics.print()
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.
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.
obey
Who is online
Users browsing this forum: Bing [Bot] and 6 guests