use CharSet = CharSet.Unicode for all text pInvoke functions
safeguard image generation width to 4096 pixels unless max width is provided