dompdf / php-font-lib

A library to read, parse, export and make subsets of different types of font files.
GNU Lesser General Public License v2.1
1.73k stars 256 forks source link

Unable to delete font file after load font information #72

Closed PinalPatel160 closed 5 years ago

PinalPatel160 commented 5 years ago

I've used following code to get font information

$font = \FontLib\Font::load('../../fontfile.ttf'); $full_name = $font->getFontFullName() ;

After running above lines I can't delete the font file which is passed in the above code.

If I comment this 2 lines then everything works perfectly but I need to get full_name.

Does have any idea about this kind of issue?

I think it's an issue of fclose() but I can't find where is that missing in your library.

PinalPatel160 commented 5 years ago

I find the solution to my issue. It will allow me to delete/unlink font file when I close the font file using the following line

$font->close();

I suggest you include the above line in your example code so the developer does not move in the wrong direction.