Skip to content
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 send you account related emails.

Already on GitHub? Sign in to your account

Feature request: emoji support #316

Open
Offirmo opened this issue Mar 17, 2024 · 12 comments
Open

Feature request: emoji support #316

Offirmo opened this issue Mar 17, 2024 · 12 comments

Comments

@Offirmo
Copy link

Offirmo commented Mar 17, 2024

Thanks for this amazing lib!

Unfortunately, it doesn't seem to be able to render emojis in text 😒

See this very simple SVG:

<svg xmlns='http://www.w3.org/2000/svg'
	viewBox='0 0 100 100'>
	<text y='.9em' font-size='90'>πŸ‘¨β€πŸ’»</text>
</svg>

It doesn't render anything visible.

When trying the playground https://resvg-js.vercel.app/ it doesn't render anything either.

I tried forcing a color emoji font:

{
		font: {
			fontFiles: ['/Users/xyz/Noto_Color_Emoji/NotoColorEmoji-Regular.ttf'],
			loadSystemFonts: false, // It will be faster to disable loading system fonts.
			defaultFontFamily: 'Noto Color Emoji',
		},
	}

But it doesn't help.

Would it be feasible to add this? Thanks.

@hoaxvorp
Copy link

Have you found any alternatives to display emojis?

@yisibl
Copy link
Member

yisibl commented Mar 24, 2024

I will be investigating this feature.

@qianshancun
Copy link

maybe there are copyright issues?

@Offirmo
Copy link
Author

Offirmo commented Mar 26, 2024

@qianshancun good point. The emojis would have to come from a font, in which case it would be up to the user to provide a color emoji font they have a license for.

We could rename this issue "support CBDT/CBLC color font format" but I don't want to presume the best way to add this feature, I trust @yisibl ❀️

@yisibl
Copy link
Member

yisibl commented Apr 12, 2024

resvg does not currently support emoji (aka color fonts), please follow: linebender/resvg#487

@yisibl
Copy link
Member

yisibl commented Apr 12, 2024

maybe there are copyright issues?

Copyright depends on the specific font, beyond the scope of this issue hair.

@Offirmo
Copy link
Author

Offirmo commented Apr 12, 2024

Thanks @yisibl for following up!

@are
Copy link

are commented May 7, 2024

It seems that resvg merged linebender/resvg#487 - are there any additional blockers of bringing it into resvg-js?

@yisibl
Copy link
Member

yisibl commented May 11, 2024

It seems that resvg merged RazrFalcon/resvg#487 - are there any additional blockers of bringing it into resvg-js?

This requires us to upgrade our resvg dependencies to the latest version. I don't have the time at the moment.

@Offirmo
Copy link
Author

Offirmo commented May 14, 2024

@yisibl it's completely ok, take your time! Thanks for this open source project!

@Offirmo
Copy link
Author

Offirmo commented Jun 3, 2024

@yisibl πŸ₯Ί 🐩 pretty please πŸ™

@facuparedes-litebox
Copy link

no updates yet? 😞

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

No branches or pull requests

6 participants