Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Re-render the social cards through the icon registry (#7901)

EthanHealy01455ad987181d
diff --git a/frontend/editor/public/og_images/add-attachments.png b/frontend/editor/public/og_images/add-attachments.png
index 98a8aecfd5..2e0874bcd3 100644
Binary files a/frontend/editor/public/og_images/add-attachments.png and b/frontend/editor/public/og_images/add-attachments.png differ
diff --git a/frontend/editor/public/og_images/add-image.png b/frontend/editor/public/og_images/add-image.png
index fe141f7d80..b50e57b2fa 100644
Binary files a/frontend/editor/public/og_images/add-image.png and b/frontend/editor/public/og_images/add-image.png differ
diff --git a/frontend/editor/public/og_images/add-page-numbers.png b/frontend/editor/public/og_images/add-page-numbers.png
index 5d2394bcd5..7aa959268f 100644
Binary files a/frontend/editor/public/og_images/add-page-numbers.png and b/frontend/editor/public/og_images/add-page-numbers.png differ
diff --git a/frontend/editor/public/og_images/add-password.png b/frontend/editor/public/og_images/add-password.png
index e3f6214380..257ee2d191 100644
Binary files a/frontend/editor/public/og_images/add-password.png and b/frontend/editor/public/og_images/add-password.png differ
diff --git a/frontend/editor/public/og_images/add-stamp.png b/frontend/editor/public/og_images/add-stamp.png
index 028e62fecd..76eade0239 100644
Binary files a/frontend/editor/public/og_images/add-stamp.png and b/frontend/editor/public/og_images/add-stamp.png differ
diff --git a/frontend/editor/public/og_images/add-text.png b/frontend/editor/public/og_images/add-text.png
index 503dbac082..58a99100c1 100644
Binary files a/frontend/editor/public/og_images/add-text.png and b/frontend/editor/public/og_images/add-text.png differ
diff --git a/frontend/editor/public/og_images/add-watermark.png b/frontend/editor/public/og_images/add-watermark.png
index 19466d332b..69b9e28599 100644
Binary files a/frontend/editor/public/og_images/add-watermark.png and b/frontend/editor/public/og_images/add-watermark.png differ
diff --git a/frontend/editor/public/og_images/adjust-colors-contrast.png b/frontend/editor/public/og_images/adjust-colors-contrast.png
index c025d14d01..904ed380ed 100644
Binary files a/frontend/editor/public/og_images/adjust-colors-contrast.png and b/frontend/editor/public/og_images/adjust-colors-contrast.png differ
diff --git a/frontend/editor/public/og_images/adjust-page-size-scale.png b/frontend/editor/public/og_images/adjust-page-size-scale.png
index f7818a2698..beb07d2402 100644
Binary files a/frontend/editor/public/og_images/adjust-page-size-scale.png and b/frontend/editor/public/og_images/adjust-page-size-scale.png differ
diff --git a/frontend/editor/public/og_images/annotate.png b/frontend/editor/public/og_images/annotate.png
index 3910197cdb..dc72a0bb77 100644
Binary files a/frontend/editor/public/og_images/annotate.png and b/frontend/editor/public/og_images/annotate.png differ
diff --git a/frontend/editor/public/og_images/auto-rename-pdf-file.png b/frontend/editor/public/og_images/auto-rename-pdf-file.png
index d8bd7d5102..1a1a5a87ba 100644
Binary files a/frontend/editor/public/og_images/auto-rename-pdf-file.png and b/frontend/editor/public/og_images/auto-rename-pdf-file.png differ
diff --git a/frontend/editor/public/og_images/automate.png b/frontend/editor/public/og_images/automate.png
index e44c33ea9e..690cf83516 100644
Binary files a/frontend/editor/public/og_images/automate.png and b/frontend/editor/public/og_images/automate.png differ
diff --git a/frontend/editor/public/og_images/booklet-imposition.png b/frontend/editor/public/og_images/booklet-imposition.png
index 79ba6c7fd0..aa17d1a04e 100644
Binary files a/frontend/editor/public/og_images/booklet-imposition.png and b/frontend/editor/public/og_images/booklet-imposition.png differ
diff --git a/frontend/editor/public/og_images/certSign.png b/frontend/editor/public/og_images/certSign.png
index 0160f43a52..bc9c5eb999 100644
Binary files a/frontend/editor/public/og_images/certSign.png and b/frontend/editor/public/og_images/certSign.png differ
diff --git a/frontend/editor/public/og_images/change-metadata.png b/frontend/editor/public/og_images/change-metadata.png
index 989be40cb6..c0855516fe 100644
Binary files a/frontend/editor/public/og_images/change-metadata.png and b/frontend/editor/public/og_images/change-metadata.png differ
diff --git a/frontend/editor/public/og_images/change-permissions.png b/frontend/editor/public/og_images/change-permissions.png
index c22879514a..0a286cf84c 100644
Binary files a/frontend/editor/public/og_images/change-permissions.png and b/frontend/editor/public/og_images/change-permissions.png differ
diff --git a/frontend/editor/public/og_images/compare.png b/frontend/editor/public/og_images/compare.png
index ba7a48879b..163b5ea1be 100644
Binary files a/frontend/editor/public/og_images/compare.png and b/frontend/editor/public/og_images/compare.png differ
diff --git a/frontend/editor/public/og_images/compress.png b/frontend/editor/public/og_images/compress.png
index 119fc884d1..1ee232b4da 100644
Binary files a/frontend/editor/public/og_images/compress.png and b/frontend/editor/public/og_images/compress.png differ
diff --git a/frontend/editor/public/og_images/convert.png b/frontend/editor/public/og_images/convert.png
index 1740d97067..4267e81e95 100644
Binary files a/frontend/editor/public/og_images/convert.png and b/frontend/editor/public/og_images/convert.png differ
diff --git a/frontend/editor/public/og_images/cropPdf.png b/frontend/editor/public/og_images/cropPdf.png
index 8973f0da5b..d749432f2c 100644
Binary files a/frontend/editor/public/og_images/cropPdf.png and b/frontend/editor/public/og_images/cropPdf.png differ
diff --git a/frontend/editor/public/og_images/detect-split-scanned-photos.png b/frontend/editor/public/og_images/detect-split-scanned-photos.png
index 65a6f5e84e..31d0ff370a 100644
Binary files a/frontend/editor/public/og_images/detect-split-scanned-photos.png and b/frontend/editor/public/og_images/detect-split-scanned-photos.png differ
diff --git a/frontend/editor/public/og_images/dev-airgapped.png b/frontend/editor/public/og_images/dev-airgapped.png
index 597bc6727f..990162ac93 100644
Binary files a/frontend/editor/public/og_images/dev-airgapped.png and b/frontend/editor/public/og_images/dev-airgapped.png differ
diff --git a/frontend/editor/public/og_images/dev-api.png b/frontend/editor/public/og_images/dev-api.png
index d44353115c..32f139f02b 100644
Binary files a/frontend/editor/public/og_images/dev-api.png and b/frontend/editor/public/og_images/dev-api.png differ
diff --git a/frontend/editor/public/og_images/dev-folder-scanning.png b/frontend/editor/public/og_images/dev-folder-scanning.png
index 011d48c97d..9fab45d572 100644
Binary files a/frontend/editor/public/og_images/dev-folder-scanning.png and b/frontend/editor/public/og_images/dev-folder-scanning.png differ
diff --git a/frontend/editor/public/og_images/dev-sso-guide.png b/frontend/editor/public/og_images/dev-sso-guide.png
index c0e879a439..d49822a4c9 100644
Binary files a/frontend/editor/public/og_images/dev-sso-guide.png and b/frontend/editor/public/og_images/dev-sso-guide.png differ
diff --git a/frontend/editor/public/og_images/edit-table-of-contents.png b/frontend/editor/public/og_images/edit-table-of-contents.png
index e056de1a94..f136d092c9 100644
Binary files a/frontend/editor/public/og_images/edit-table-of-contents.png and b/frontend/editor/public/og_images/edit-table-of-contents.png differ
diff --git a/frontend/editor/public/og_images/extract-images.png b/frontend/editor/public/og_images/extract-images.png
index 3376cc4b66..12dfa53ac1 100644
Binary files a/frontend/editor/public/og_images/extract-images.png and b/frontend/editor/public/og_images/extract-images.png differ
diff --git a/frontend/editor/public/og_images/extract-pages.png b/frontend/editor/public/og_images/extract-pages.png
index 590beaf11c..514b72d291 100644
Binary files a/frontend/editor/public/og_images/extract-pages.png and b/frontend/editor/public/og_images/extract-pages.png differ
diff --git a/frontend/editor/public/og_images/flatten.png b/frontend/editor/public/og_images/flatten.png
index 58144ff014..9bcebeb37a 100644
Binary files a/frontend/editor/public/og_images/flatten.png and b/frontend/editor/public/og_images/flatten.png differ
diff --git a/frontend/editor/public/og_images/form-fill.png b/frontend/editor/public/og_images/form-fill.png
index 7f50084c83..adb8371c19 100644
Binary files a/frontend/editor/public/og_images/form-fill.png and b/frontend/editor/public/og_images/form-fill.png differ
diff --git a/frontend/editor/public/og_images/get-all-info-on-pdf.png b/frontend/editor/public/og_images/get-all-info-on-pdf.png
index a9cf7c9091..c33736d714 100644
Binary files a/frontend/editor/public/og_images/get-all-info-on-pdf.png and b/frontend/editor/public/og_images/get-all-info-on-pdf.png differ
diff --git a/frontend/editor/public/og_images/mergePdfs.png b/frontend/editor/public/og_images/mergePdfs.png
index 47d4c3f784..e83666db24 100644
Binary files a/frontend/editor/public/og_images/mergePdfs.png and b/frontend/editor/public/og_images/mergePdfs.png differ
diff --git a/frontend/editor/public/og_images/multi-page-layout.png b/frontend/editor/public/og_images/multi-page-layout.png
index b5fb54938e..cf7adabbce 100644
Binary files a/frontend/editor/public/og_images/multi-page-layout.png and b/frontend/editor/public/og_images/multi-page-layout.png differ
diff --git a/frontend/editor/public/og_images/multi-tool.png b/frontend/editor/public/og_images/multi-tool.png
index 71db3a41a5..eab956f961 100644
Binary files a/frontend/editor/public/og_images/multi-tool.png and b/frontend/editor/public/og_images/multi-tool.png differ
diff --git a/frontend/editor/public/og_images/ocr.png b/frontend/editor/public/og_images/ocr.png
index 5cbdef5533..0ffde74db1 100644
Binary files a/frontend/editor/public/og_images/ocr.png and b/frontend/editor/public/og_images/ocr.png differ
diff --git a/frontend/editor/public/og_images/overlay-pdfs.png b/frontend/editor/public/og_images/overlay-pdfs.png
index 30a8541c8b..b40d43c797 100644
Binary files a/frontend/editor/public/og_images/overlay-pdfs.png and b/frontend/editor/public/og_images/overlay-pdfs.png differ
diff --git a/frontend/editor/public/og_images/pdf-text-editor.png b/frontend/editor/public/og_images/pdf-text-editor.png
index b4715fcc25..a1a2ea2a97 100644
Binary files a/frontend/editor/public/og_images/pdf-text-editor.png and b/frontend/editor/public/og_images/pdf-text-editor.png differ
diff --git a/frontend/editor/public/og_images/read.png b/frontend/editor/public/og_images/read.png
index 55b4e2df0a..b950cd4007 100644
Binary files a/frontend/editor/public/og_images/read.png and b/frontend/editor/public/og_images/read.png differ
diff --git a/frontend/editor/public/og_images/redact.png b/frontend/editor/public/og_images/redact.png
index e80aba7a42..2d341b5d53 100644
Binary files a/frontend/editor/public/og_images/redact.png and b/frontend/editor/public/og_images/redact.png differ
diff --git a/frontend/editor/public/og_images/remove-annotations.png b/frontend/editor/public/og_images/remove-annotations.png
index b3631b052b..c45385c432 100644
Binary files a/frontend/editor/public/og_images/remove-annotations.png and b/frontend/editor/public/og_images/remove-annotations.png differ
diff --git a/frontend/editor/public/og_images/remove-blank-pages.png b/frontend/editor/public/og_images/remove-blank-pages.png
index 49005a517f..39eaa79d38 100644
Binary files a/frontend/editor/public/og_images/remove-blank-pages.png and b/frontend/editor/public/og_images/remove-blank-pages.png differ
diff --git a/frontend/editor/public/og_images/remove-certificate-sign.png b/frontend/editor/public/og_images/remove-certificate-sign.png
index e5988d8850..2e0cd6ad4c 100644
Binary files a/frontend/editor/public/og_images/remove-certificate-sign.png and b/frontend/editor/public/og_images/remove-certificate-sign.png differ
diff --git a/frontend/editor/public/og_images/remove-image.png b/frontend/editor/public/og_images/remove-image.png
index 8a2de0d304..e354f2da80 100644
Binary files a/frontend/editor/public/og_images/remove-image.png and b/frontend/editor/public/og_images/remove-image.png differ
diff --git a/frontend/editor/public/og_images/remove-password.png b/frontend/editor/public/og_images/remove-password.png
index c023251375..2c944f1ee5 100644
Binary files a/frontend/editor/public/og_images/remove-password.png and b/frontend/editor/public/og_images/remove-password.png differ
diff --git a/frontend/editor/public/og_images/remove.png b/frontend/editor/public/og_images/remove.png
index 649ca2dd9a..0680265755 100644
Binary files a/frontend/editor/public/og_images/remove.png and b/frontend/editor/public/og_images/remove.png differ
diff --git a/frontend/editor/public/og_images/reorganize-pages.png b/frontend/editor/public/og_images/reorganize-pages.png
index ce7a3d40eb..7ca6f13387 100644
Binary files a/frontend/editor/public/og_images/reorganize-pages.png and b/frontend/editor/public/og_images/reorganize-pages.png differ
diff --git a/frontend/editor/public/og_images/repair.png b/frontend/editor/public/og_images/repair.png
index 31bc026cb5..b7554707b9 100644
Binary files a/frontend/editor/public/og_images/repair.png and b/frontend/editor/public/og_images/repair.png differ
diff --git a/frontend/editor/public/og_images/replace-and-invert-color.png b/frontend/editor/public/og_images/replace-and-invert-color.png
index 4d9359876d..28e4493ae7 100644
Binary files a/frontend/editor/public/og_images/replace-and-invert-color.png and b/frontend/editor/public/og_images/replace-and-invert-color.png differ
diff --git a/frontend/editor/public/og_images/rotate.png b/frontend/editor/public/og_images/rotate.png
index 54f05046b2..dfded3ea26 100644
Binary files a/frontend/editor/public/og_images/rotate.png and b/frontend/editor/public/og_images/rotate.png differ
diff --git a/frontend/editor/public/og_images/sanitize.png b/frontend/editor/public/og_images/sanitize.png
index a8a3737af2..70ef3e9724 100644
Binary files a/frontend/editor/public/og_images/sanitize.png and b/frontend/editor/public/og_images/sanitize.png differ
diff --git a/frontend/editor/public/og_images/shared-sign.png b/frontend/editor/public/og_images/shared-sign.png
index 85c1558494..e6235f7e6c 100644
Binary files a/frontend/editor/public/og_images/shared-sign.png and b/frontend/editor/public/og_images/shared-sign.png differ
diff --git a/frontend/editor/public/og_images/show-javascript.png b/frontend/editor/public/og_images/show-javascript.png
index c8df270948..82b95079ca 100644
Binary files a/frontend/editor/public/og_images/show-javascript.png and b/frontend/editor/public/og_images/show-javascript.png differ
diff --git a/frontend/editor/public/og_images/sign.png b/frontend/editor/public/og_images/sign.png
index 813a251210..7d688c25d1 100644
Binary files a/frontend/editor/public/og_images/sign.png and b/frontend/editor/public/og_images/sign.png differ
diff --git a/frontend/editor/public/og_images/single-large-page.png b/frontend/editor/public/og_images/single-large-page.png
index b03a3cd5c6..d281c2583a 100644
Binary files a/frontend/editor/public/og_images/single-large-page.png and b/frontend/editor/public/og_images/single-large-page.png differ
diff --git a/frontend/editor/public/og_images/split.png b/frontend/editor/public/og_images/split.png
index 15665b6bbb..d384b039e4 100644
Binary files a/frontend/editor/public/og_images/split.png and b/frontend/editor/public/og_images/split.png differ
diff --git a/frontend/editor/public/og_images/timestamp-pdf.png b/frontend/editor/public/og_images/timestamp-pdf.png
index 8d28570740..de6410f67d 100644
Binary files a/frontend/editor/public/og_images/timestamp-pdf.png and b/frontend/editor/public/og_images/timestamp-pdf.png differ
diff --git a/frontend/editor/public/og_images/unlock-pdf-forms.png b/frontend/editor/public/og_images/unlock-pdf-forms.png
index 6ed6f8c28d..33638a713c 100644
Binary files a/frontend/editor/public/og_images/unlock-pdf-forms.png and b/frontend/editor/public/og_images/unlock-pdf-forms.png differ
diff --git a/frontend/editor/public/og_images/validate-pdf-signature.png b/frontend/editor/public/og_images/validate-pdf-signature.png
index 6d2abb8ef0..4e585c4b57 100644
Binary files a/frontend/editor/public/og_images/validate-pdf-signature.png and b/frontend/editor/public/og_images/validate-pdf-signature.png differ
diff --git a/frontend/editor/scripts/generate-og-image.mjs b/frontend/editor/scripts/generate-og-image.mjs
index e9e9d36f90..c4739588a2 100644
--- a/frontend/editor/scripts/generate-og-image.mjs
+++ b/frontend/editor/scripts/generate-og-image.mjs
@@ -97,8 +97,10 @@ export async function resolveIcon(icon) {
const open = raw.indexOf("<svg");
const body = raw.slice(raw.indexOf(">", open) + 1, raw.lastIndexOf("</svg>"));
// Root attributes are replaced: the source files carry lucide's default
- // weight, and the card wants the app's stroke in white.
- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="${STROKE_WIDTH}" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`;
+ // weight, and the card wants the app's stroke in white. White goes on `color`
+ // rather than straight onto `stroke`, because a glyph that fills part of
+ // itself does so with `fill="currentColor"` and would otherwise paint black.
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" color="#fff" stroke="currentColor" stroke-width="${STROKE_WIDTH}" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`;
}
// ---- html template ---------------------------------------------------------
@@ -249,6 +251,9 @@ const MISSING_TOOL_ICONS = {
const kebab = (id) => id.replace(/([A-Z])/g, "-$1").toLowerCase();
+// Some t() keys are kebab ("home.overlay-pdfs.title"); the registry is camelCase.
+const toolId = (key) => key.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
+
// English name/description live next to each tool as the `t(key, fallback)` default.
function readRegistryStrings() {
const src = readFileSync(
@@ -259,13 +264,13 @@ function readRegistryStrings() {
const titles = {},
descs = {};
for (const m of src.matchAll(
- new RegExp('t\\(\\s*"home\\.([A-Za-z0-9_]+)\\.title"\\s*,\\s*' + STR, "g"),
+ new RegExp('t\\(\\s*"home\\.([A-Za-z0-9_-]+)\\.title"\\s*,\\s*' + STR, "g"),
))
- titles[m[1]] = m[2];
+ titles[toolId(m[1])] = m[2];
for (const m of src.matchAll(
- new RegExp('t\\(\\s*"home\\.([A-Za-z0-9_]+)\\.desc"\\s*,\\s*' + STR, "g"),
+ new RegExp('t\\(\\s*"home\\.([A-Za-z0-9_-]+)\\.desc"\\s*,\\s*' + STR, "g"),
))
- descs[m[1]] = m[2];
+ descs[toolId(m[1])] = m[2];
return { titles, descs };
}
@@ -299,12 +304,12 @@ export function readRegistryIcons() {
}));
const byId = {};
for (const m of src.matchAll(
- /name:\s*t\(\s*"home\.([A-Za-z0-9_]+)\.title"/g,
+ /name:\s*t\(\s*"home\.([A-Za-z0-9_-]+)\.title"/g,
)) {
let best = null;
for (const ic of icons)
if (ic.pos < m.index && (!best || ic.pos > best.pos)) best = ic;
- if (best) byId[m[1]] = best.name;
+ if (best) byId[toolId(m[1])] = best.name;
}
return byId;
}