Some fixes

The original script had some errors, and it didn't support a px base font-size.
I fixed some errors and added support for px font-size.
Still lacks pts.