mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(meme-generator): increase text box padding to prevent glyph overshoot clipping
This commit is contained in:
@@ -210,7 +210,7 @@ export function renderMemeTextSvg(opts: MemeTextOptions): Buffer {
|
||||
const bw = (box.width / 100) * imageWidth;
|
||||
const bh = (box.height / 100) * imageHeight;
|
||||
|
||||
const pad = Math.max(4, Math.round(bw * 0.02));
|
||||
const pad = Math.max(8, Math.round(bw * 0.05));
|
||||
const innerW = bw - pad * 2;
|
||||
const innerH = bh - pad * 2;
|
||||
const fontSize = fixedFontSize ?? autoSizeFontToFit(text, fontFamily, innerW, innerH);
|
||||
|
||||
Reference in New Issue
Block a user