fix font
This commit is contained in:
@@ -462,7 +462,7 @@ class CertificateController extends BaseController
|
|||||||
// ── Images
|
// ── Images
|
||||||
$pdf->Image($imgDir . 'title.png', 126, 0, 600);
|
$pdf->Image($imgDir . 'title.png', 126, 0, 600);
|
||||||
$pdf->Image($imgDir . 'background.png', 280, 176, 291, 340);
|
$pdf->Image($imgDir . 'background.png', 280, 176, 291, 340);
|
||||||
$pdf->Image($imgDir . 'signature.png', 140, 399, 90, 90);
|
$pdf->Image($imgDir . 'signature.png', 140, 410, 90, 80);
|
||||||
|
|
||||||
// ── QR code — bottom-right corner: 1.5 cm from bottom, 2.5 cm from right
|
// ── QR code — bottom-right corner: 1.5 cm from bottom, 2.5 cm from right
|
||||||
$qrSize = 42; // pt
|
$qrSize = 42; // pt
|
||||||
@@ -484,13 +484,10 @@ class CertificateController extends BaseController
|
|||||||
$pdf->SetXY(0, 151);
|
$pdf->SetXY(0, 151);
|
||||||
$pdf->Cell($W, 24, 'Presented to:', 0, 0, 'C');
|
$pdf->Cell($W, 24, 'Presented to:', 0, 0, 'C');
|
||||||
|
|
||||||
// ── Student name (bold via fill + stroke)
|
// ── Student name — center based on actual string width
|
||||||
$pdf->SetFont($edwardianFont, '', 38);
|
$pdf->SetFont($edwardianFont, '', 38);
|
||||||
$pdf->SetDrawColor(0, 0, 0);
|
$nameX = ($W - $pdf->GetStringWidth($name)) / 2;
|
||||||
$pdf->setTextRenderingMode(0.4, true, false);
|
$this->drawGradientText($pdf, $edwardianFont, 38, $name, $nameX, 229.5);
|
||||||
$pdf->SetXY(0, 219);
|
|
||||||
$pdf->Cell($W, 38, $name, 0, 0, 'C');
|
|
||||||
$pdf->setTextRenderingMode(0, true, false);
|
|
||||||
|
|
||||||
// ── Line under name
|
// ── Line under name
|
||||||
$pdf->SetFont('times', '', 20);
|
$pdf->SetFont('times', '', 20);
|
||||||
@@ -518,7 +515,7 @@ class CertificateController extends BaseController
|
|||||||
$pdf->Cell($W, 20, 'Al Rahma Sunday School', 0, 0, 'C');
|
$pdf->Cell($W, 20, 'Al Rahma Sunday School', 0, 0, 'C');
|
||||||
|
|
||||||
// ── Date (gradient script)
|
// ── Date (gradient script)
|
||||||
$this->drawGradientText($pdf, $edwardianFont, 26, $certDate, 598, 453);
|
$this->drawGradientText($pdf, $edwardianFont, 26, $certDate, 586, 456);
|
||||||
|
|
||||||
// ── Date underline + label
|
// ── Date underline + label
|
||||||
$pdf->SetFont('times', '', 20);
|
$pdf->SetFont('times', '', 20);
|
||||||
@@ -550,7 +547,7 @@ class CertificateController extends BaseController
|
|||||||
for ($i = 0; $i < 6; $i++) {
|
for ($i = 0; $i < 6; $i++) {
|
||||||
$pdf->setAlpha(($i + 1) * 25 / 255);
|
$pdf->setAlpha(($i + 1) * 25 / 255);
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$pdf->Text($x + $i / 5, $y + $i / 5, $text);
|
$pdf->Text($x + $i / 4, $y + $i / 4, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->setAlpha(1);
|
$pdf->setAlpha(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user