fix #18 - treat font extensions properly

Fix calculation of size/height in PS metrics, where font-specific difference between size and height wasn't accounted for.
If requested a gui font, do smart width matching by em_width, as GUI font.width and PS font.width mean two different things.
Properly return get_text_width etc metrics outside paint mode.
maximalWidth wasn't scaled on set_font, that caused narrow font sometimes, fix.
Other minor optimizations.