<?php
// Tumhara PDF Controller load kar rahe hain
require_once 'PdfController.php'; 

$fontFile = __DIR__ . '/tamil.ttf';

if (!file_exists($fontFile)) {
    die("<h2 style='color:red;'>Bhai, 'tamil.ttf' file is folder me nahi mili! Sahi jagah upload karo.</h2>");
}

echo "Font install ho raha hai... please wait...<br><br>";

// TCPDF ka function jo TTF ko PDF font me convert karta hai
$fontname = TCPDF_FONTS::addTTFfont($fontFile, 'TrueTypeUnicode', '', 96);

if ($fontname) {
    echo "<h2 style='color:green;'>🎉 SUCCESS! Font Install Ho Gaya!</h2>";
    echo "<h3>Tumhare font ka naam hai: <mark>" . $fontname . "</mark></h3>";
    echo "<p>Ab apne PDF code me <b>\$docFont = '" . $fontname . "';</b> likh do.</p>";
} else {
    echo "<h2 style='color:red;'>❌ Fail Ho Gaya!</h2>";
    echo "Ya toh file galat hai, ya tcpdf/fonts folder me Write (777) Permission nahi hai.";
}
?>