$minglyphs = 8;
$maxglyphs = 8;
if (isset($_POST['minglyphs']) && !empty($_POST['minglyphs'])) {
    $minglyphs = $_POST['minglyphs'];
}
if (isset($_POST['maxglyphs']) && !empty($_POST['maxglyphs'])) {
    $maxglyphs = $_POST['maxglyphs'];
}
// Do Stuff
$a = new textFilter();
$a->AddSourceText($text, $minglyphs, $maxglyphs);
if (!empty($_POST['madefrom'])) {
    $a->madefrom($_POST['madefrom']);
}
if (!empty($_POST['measures'])) {
    $a->AddMeasures($_POST['measures']);
}
if (!empty($_POST['kerning'])) {
    $a->AddKerning($_POST['kerning']);
}
if (!empty($_POST['having_one'])) {
    $a->having($_POST['having_one']);
}
if (!empty($_POST['having_two'])) {
    $a->having($_POST['having_two']);
}
if (!empty($_POST['having_three'])) {
    $a->having($_POST['having_three']);
}
if (!empty($_POST['having_four'])) {
    $a->having($_POST['having_four']);