Fixing the adjust font restore scroll and adding unit tests

As requested I made a new request from #3250 with only the fixes made to the restore scroll and the unit tests. This time the restore scroll works perfect, and I made the unit tests use just one window for all the tests.