Remove the use of the viewport hack

Since #3115 is now fixed, I removed the use of the viewport hack used to properly calculate the height of the editor. This also fixes scroll adjustment when changing the font, which was using the viewport hack and stopped working when #3115 was fixed.