mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-06-22 00:34:37 +00:00
chore(og-image): force twemoji for emoji util
This commit is contained in:
@ -29,15 +29,12 @@ async function generateSocialImage(
|
||||
width,
|
||||
height,
|
||||
fonts,
|
||||
// `code` will be the detected language code, `emoji` if it's an Emoji, or `unknown` if not able to tell.
|
||||
// `segment` will be the content to render.
|
||||
loadAdditionalAsset: async (code: string, segment: string) => {
|
||||
if (code === "emoji") {
|
||||
// if segment is an emoji, load the image.
|
||||
return `data:image/svg+xml;base64,${btoa(await loadEmoji("twemoji", getIconCode(segment)))}`
|
||||
loadAdditionalAsset: async (languageCode: string, segment: string) => {
|
||||
if (languageCode === "emoji") {
|
||||
return `data:image/svg+xml;base64,${btoa(await loadEmoji(getIconCode(segment)))}`
|
||||
}
|
||||
// if segment is normal text
|
||||
return code
|
||||
|
||||
return languageCode
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user