Fix view offset

The basic problem seemed to be that VIEW_OFFSET_ had been calculated with the map font, not the standard font. But all windows have their position offset in the standard font defined. So that clashed.

Also contains some cleanup and a memory leak fix.

Intended to fix #6726