about summary refs log tree commit diff
path: root/bskyogcard/src/routes/starter-pack.tsx
diff options
context:
space:
mode:
authordevin ivy <devinivy@gmail.com>2024-06-27 13:02:29 -0400
committerGitHub <noreply@github.com>2024-06-27 13:02:29 -0400
commit49396451ec8c877aebd27299a98c1b9e5b1e6cd4 (patch)
treec424c554a431c9594896a09bf422c737c2341e62 /bskyogcard/src/routes/starter-pack.tsx
parentf6b138f709bcf52248e3f0c5a1ef67abe96bef9c (diff)
downloadvoidsky-49396451ec8c877aebd27299a98c1b9e5b1e6cd4.tar.zst
bskyogcard: support emoji, more languages, long starter pack names (#4668)
Diffstat (limited to 'bskyogcard/src/routes/starter-pack.tsx')
-rw-r--r--bskyogcard/src/routes/starter-pack.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/bskyogcard/src/routes/starter-pack.tsx b/bskyogcard/src/routes/starter-pack.tsx
index cb3a55327..06cd6977c 100644
--- a/bskyogcard/src/routes/starter-pack.tsx
+++ b/bskyogcard/src/routes/starter-pack.tsx
@@ -13,6 +13,7 @@ import {
 } from '../components/StarterPack.js'
 import {AppContext} from '../context.js'
 import {httpLogger} from '../logger.js'
+import {loadEmojiAsSvg} from '../util.js'
 import {handler, originVerifyMiddleware} from './util.js'
 
 export default function (ctx: AppContext, app: Express) {
@@ -65,6 +66,11 @@ export default function (ctx: AppContext, app: Express) {
           fonts: ctx.fonts,
           height: STARTERPACK_HEIGHT,
           width: STARTERPACK_WIDTH,
+          loadAdditionalAsset: async (code, text) => {
+            if (code === 'emoji') {
+              return await loadEmojiAsSvg(text)
+            }
+          },
         },
       )
       const output = await resvg.renderAsync(svg)