Macro LINE_SPACING previously used global grd_curcanv implicitly. Change it to take a canvas argument. Change all callers to pass grd_curcanv, so that usage is explicit.