Removed badge around center text

This commit is contained in:
marijo 2026-06-23 13:27:46 +00:00
parent e3f3101719
commit 5e07f24023

View file

@ -177,7 +177,7 @@ final class QrCode
$x = ($fullSize - $badgeWidth) / 2;
$y = ($fullSize - $badgeHeight) / 2;
$fontSize = min(3.2, max(2.1, ($badgeWidth - 2) / ($chars * 0.62)));
$svg .= '<rect x="' . $x . '" y="' . $y . '" width="' . $badgeWidth . '" height="' . $badgeHeight . '" rx="' . ($badgeHeight / 2) . '" fill="#fff" stroke="#111" stroke-width="0.45"/>';
$svg .= '<rect x="' . $x . '" y="' . $y . '" width="' . $badgeWidth . '" height="' . $badgeHeight . '" rx="' . ($badgeHeight / 2) . '" fill="#fff"/>';
$svg .= '<text x="' . ($fullSize / 2) . '" y="' . ($fullSize / 2) . '" fill="#111" font-family="system-ui, -apple-system, Segoe UI, sans-serif" font-size="' . $fontSize . '" font-weight="800" text-anchor="middle" dominant-baseline="central">' . $safeText . '</text>';
}