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

chore: update og image to make it more readable #847

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/routes/package/og.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const LATEST_BADGE_COLOR = Image.rgbToColor(247, 222, 30);

const JSR_LOGO_HEIGHT = 100;

const DESCRIPTION_MAX_BREAK_POINT = 60;
const DESCRIPTION_MAX_BREAK_POINT = 40;

export const handler = define.handlers({
async GET(ctx) {
Expand Down Expand Up @@ -220,7 +220,7 @@ export const handler = define.handlers({

for (const word of splittedBySpace) {
firstLine.push(word);
const { width } = Image.renderText(dmmonoFont, 30, firstLine.join(" "));
const { width } = Image.renderText(dmmonoFont, 40, firstLine.join(" "));
if (width > WIDTH - 2 * PADDING) {
firstLine.pop();
break;
Expand All @@ -240,7 +240,7 @@ export const handler = define.handlers({

const descriptionText = Image.renderText(
dmmonoFont,
30,
40,
descriptionString,
COLOR_GRAY,
);
Expand All @@ -262,7 +262,7 @@ export const handler = define.handlers({
);
const publishDateText = Image.renderText(
dmmonoFont,
25,
32,
twas(new Date(selectedVersion.createdAt).getTime()),
COLOR_GRAY,
);
Expand Down
Loading