Scale the text offset by the device's pixel ratio

Fixes #1918