Manipulating the font size results in the script_cache going stale. From MSDN
The application should never pass the same handle for different fonts or different sizes.
This is however exactly what happens when the font size changes as a result of zooming(both in and out). ScriptShape and relative functions will only inspect the hardware device context only if the required data is not cached and hence the data from a previous call to these functions is retrieved even though the font size has changed hence the bug where text both doesn't wrap and doesn't paint as it should.
In patch one, I have tried to keep track of the script_cache objects alongside the relevant font.
Patch two fixes an issue where the cursor doesn't scale after zooming until after one interacts with the editor.
Signed-off-by: David Kahurani firstname.lastname@example.org