canvacord icon indicating copy to clipboard operation
canvacord copied to clipboard

[Bug]: Bad font style and unknown emojis.

Open LWJerri opened this issue 1 year ago • 6 comments

Minimal code to reproduce the problem:

await new Rank()
// some other configs params...
.renderEmojis(true)
.build({ fontX: "Arial", fontY: "Arial" });

// I have the latest package version.

Screenshot: image image

LWJerri avatar Aug 09 '22 19:08 LWJerri

Minimal code to reproduce the problem:

await new Rank()
// some other configs params...
.renderEmojis(true)
.build({ fontX: "Arial", fontY: "Arial" });

// I have the latest package version.

Screenshot: image image

Wdym by the font style? You set it to arial :thinking:

twlite avatar Aug 10 '22 02:08 twlite

And yes, .renderEmojis was removed, it basically does nothing in the latest version. It exists for backwards compatibility (only in terms of API)

twlite avatar Aug 10 '22 02:08 twlite

Okay, I'm removed { fontX: "Arial", fontY: "Arial" } from build() and .renderEmojis(true), but emojis don't rendered :(

LWJerri avatar Aug 10 '22 05:08 LWJerri

Okay, I'm removed { fontX: "Arial", fontY: "Arial" } from build() and .renderEmojis(true), but emojis don't rendered :(

Yeah, that's because there is no font available that accepts unicode characters. Which system are you on? On windows, it uses windows' font to render emoji and same goes on mac. You can try installing a font like apple emoji or something similar on your system and see if it works. Canvacord currently does not bundle emoji font

twlite avatar Aug 10 '22 06:08 twlite

Okay, I'm removed { fontX: "Arial", fontY: "Arial" } from build() and .renderEmojis(true), but emojis don't rendered :(

Yeah, that's because there is no font available that accepts unicode characters. Which system are you on? On windows, it uses windows' font to render emoji and same goes on mac. You can try installing a font like apple emoji or something similar on your system and see if it works. Canvacord currently does not bundle emoji font

I'm using Ubuntu 22.04 LTS on aarch64 architecture.

LWJerri avatar Aug 10 '22 06:08 LWJerri

ref https://github.com/Brooooooklyn/canvas/issues/511

twlite avatar Aug 13 '22 14:08 twlite

For reference: https://github.com/Brooooooklyn/canvas/issues/511#issuecomment-1214356011

Brooooooklyn avatar Aug 14 '22 15:08 Brooooooklyn

@DevAndromeda, I need to install the font and write the font name in .build() as fontX or fontY, yes?

LWJerri avatar Aug 14 '22 20:08 LWJerri

@LWJerri that could also work but im thinking about implementing it via .renderEmojis method

twlite avatar Aug 15 '22 00:08 twlite

I will do it today

twlite avatar Aug 15 '22 00:08 twlite

Okay.

LWJerri avatar Aug 15 '22 15:08 LWJerri

v5.4.6

twlite avatar Aug 16 '22 09:08 twlite