Improve canvas scaling