function _textimage_font_list in Textimage 5
Same name and namespace in other branches
- 5.2 textimage_admin.inc \_textimage_font_list()
- 6.2 textimage_admin.inc \_textimage_font_list()
- 7.2 textimage.admin.inc \_textimage_font_list()
Returns an array of files with TTF extensions in the specified directory.
2 calls to _textimage_font_list()
File
- ./
textimage.module, line 1158
Code
function _textimage_font_list($fontdir) {
$filelist = array();
if (is_dir($fontdir) && ($handle = opendir($fontdir))) {
while ($file = readdir($handle)) {
if (preg_match("/\\.ttf\$/i", $file) == 1) {
$filelist[] = $file;
}
}
closedir($handle);
}
return $filelist;
}