working version with simplified code
no fonts, have your own.