smarter encoding support, fixes #1
dont promote small fonts to headings, fixes #2