8000 Custom emoji not being drawn when the length of its name is 1 letter · Issue #24 · jay3332/pilmoji · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Custom emoji not being drawn when the length of its name is 1 letter #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally 8000 send you account related emails.

Already on GitHub? Sign in to your account

Closed
WitherredAway opened this issue Mar 13, 2023 · 3 comments
Closed

Comments

@WitherredAway
Copy link
Contributor

Code to reproduce

with Image.new("RGBA", (128, 128), (255, 255, 255, 0)) as image:
    with Pilmoji(image) as pilmoji:
        pilmoji.text(
            xy=(0, 0),
            text=f"<:e:664509407421530114>",  # Put literally any custom emoji here with 1 letter name
            fill=(0, 0, 0),
            font=FONT,
            emoji_scale_factor=130,
            emoji_position_offset=(-1, -1),
        )
        image.save("emoji.png", "PNG")

This image will be a blank image:
emoji

Now try this with more than 1 letter name

with Image.new("RGBA", (128, 128), (255, 255, 255, 0)) as image:
    with Pilmoji(image) as pilmoji:
        pilmoji.text(
            xy=(0, 0),
            text=f"<:ee:664509407421530114>",
            fill=(0, 0, 0),
            font=FONT,
            emoji_scale_factor=130,
            emoji_position_offset=(-1, -1),
        )
        image.save("emoji.png", "PNG")

The image is finally the expected output:
emoji

P.S. I have lost sleep and 5 years off my life because of this absurd bug

@WitherredAway WitherredAway changed the title Custom emoji not being drawn when the length of its name is 1 Custom emoji not being drawn when the length of its name is 1 letter Mar 13, 2023
@WitherredAway
Copy link
Contributor Author

It is an easy enough fix on my end (to change the emoji name to 2 letters) but please for the love of god do something about this before i start pulling my own hair out

@jay3332
Copy link
Owner
< 800E div> jay3332 commented Mar 13, 2023

Fixed in 2df2549, sorry for the headaches this may have caused you

@WitherredAway
Copy link
Contributor Author

Lmao it's okay, I was memeing. Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0