Fixed bug where string were not measured correctly on newline. Introduced test in the DemoState for this bug.