1. A computer-implemented method for rendering on a display of an electronic device a pre-corrected image of an original image to compensate for a second-order visual impairment of a user of the device such that the pre-corrected image when displayed on the display would be perceived by the user to be in better optical focus than the user would perceive a display of the original image, comprising: receiving hardware characteristics of the display; receiving at least one parameter describing the visual impairment of the user, wherein the parameter is at least one from the group consisting of: a sphere parameter, a cylinder and axis parameters, and a near point of accommodation or another mathematically-equivalent set of parameters representing the visual impairment of the user; receiving at least one parameter describing the conditions under which the display is seen by the user; calculating, directly using the at least one parameter describing the visual impairment of the user, a Point Spread Function (PSF), or another mathematically-equivalent representation of an imaging capability of an eye's optical system including an optical transfer function (OTF); calculating a pre-corrected image corresponding to at least a portion of the original image to compensate for the visual impairment of the user, using a constrained optimization technique that maximizes perceived quality of the pre-corrected image according to constraints determined by a set of images capable of being displayed according to the hardware characteristics, and rendering on the display the pre-corrected image, wherein the rendering comprises a separate pre-correction of text elements of the original image implemented as a rendering effect performed by a font rendering module of an operating system, separate from correction to non-text elements of the original image.