Fix text position measurement on devices with non-integer window.devicePixelRatio*8