Adjusted Stroke Rendering
First Claim
1. A method of asymmetrically adjusting a rendering of a glyph, comprising:
- receiving a glyph associated with a font, the glyph to be rendered at a size and having one or more strokes, each stroke having a first edge and a second edge;
calculating a scaled stem width for rendering the glyph at the size;
calculating a first initial adjustment value for the first edge of each stroke and a second initial adjustment value for the second edge of each stroke;
calculating an offset amount, being an amount by which one or more strokes of the glyph will be offset from a device resolution grid when a high resolution representation of the glyph is rendered as compared to an original position of an outline of the glyph, such that a minimum number of device pixels will be marked by the one or more strokes after adjusting the density values of one or more device pixels representing the glyph;
rendering the high resolution representation of the glyph so that one or more edges of at least one stroke is offset from the device resolution grid by the offset amount, the high resolution representation representing a set of device pixels and determining an initial density value for each of said device pixels;
for one or more of the device pixels in the set of device pixels, calculating a length of an edge of a stroke that passes through the device pixel;
for each of the one or more device pixels, calculating a final adjustment value based on the length of an edge of a stroke passing through the device pixel and either the first or the second initial adjustment value depending on whether the edge is the first or the second edge of the corresponding stroke; and
adjusting the density values of the one or more device pixels by the corresponding final adjustment value.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods and apparatus implementing and using techniques for rendering a stroke (e.g., a line or glyph). An initial adjustment value can be calculated for the stroke, and an offset amount calculated based on the initial adjustment value, such that a minimum number of device pixels will be marked by the stroke after adjusting density values of device pixels representing the stroke. A high resolution representation of the stroke (e.g., a set of device pixels each having an initial density value) is rendered so that one or more edges of the stroke is offset from a device resolution grid by the offset amount. A length of an edge of the stroke that passes through a device pixel can be calculated, and the density value of the device pixel adjusted by a final adjustment value based on the initial adjustment value and the length of the edge of the stroke.
-
Citations
18 Claims
-
1. A method of asymmetrically adjusting a rendering of a glyph, comprising:
-
receiving a glyph associated with a font, the glyph to be rendered at a size and having one or more strokes, each stroke having a first edge and a second edge; calculating a scaled stem width for rendering the glyph at the size; calculating a first initial adjustment value for the first edge of each stroke and a second initial adjustment value for the second edge of each stroke; calculating an offset amount, being an amount by which one or more strokes of the glyph will be offset from a device resolution grid when a high resolution representation of the glyph is rendered as compared to an original position of an outline of the glyph, such that a minimum number of device pixels will be marked by the one or more strokes after adjusting the density values of one or more device pixels representing the glyph; rendering the high resolution representation of the glyph so that one or more edges of at least one stroke is offset from the device resolution grid by the offset amount, the high resolution representation representing a set of device pixels and determining an initial density value for each of said device pixels; for one or more of the device pixels in the set of device pixels, calculating a length of an edge of a stroke that passes through the device pixel; for each of the one or more device pixels, calculating a final adjustment value based on the length of an edge of a stroke passing through the device pixel and either the first or the second initial adjustment value depending on whether the edge is the first or the second edge of the corresponding stroke; and adjusting the density values of the one or more device pixels by the corresponding final adjustment value. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer program product, tangibly stored on a computer-readable medium, for asymmetrically adjusting a rendering of a glyph, comprising instructions operable to cause a programmable processor to:
-
receive a glyph associated with a font, the glyph to be rendered at a size and having one or more strokes, each stroke having a first edge and a second edge; calculate a scaled stem width for rendering the glyph at the size; calculate a first initial adjustment value for the first edge of each stroke and a second initial adjustment value for the second edge of each stroke; calculate an offset amount, being an amount by which one or more strokes of the glyph will be offset from a device resolution grid when a high resolution representation of the glyph is rendered as compared to an original position of an outline of the glyph, such that a minimum number of device pixels will be marked by the one or more strokes after adjusting the density values of one or more device pixels representing the glyph; render the high resolution representation of the glyph so that one or more edges of at least one stroke is offset from the device resolution grid by the offset amount, the high resolution representation representing a set of device pixels and determining an initial density value for each of said device pixels; for one or more of the device pixels in the set of device pixels, calculate a length of an edge of a stroke that passes through the device pixel; for each of the one or more device pixels, calculate a final adjustment value based on the length of an edge of a stroke passing through the device pixel and either the first or the second initial adjustment value depending on whether the edge is the first or the second edge of the corresponding stroke; and adjust the density values of the one or more device pixels by the corresponding final adjustment value. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A system for asymmetrically adjusting a rendering of a glyph, comprising:
-
means for receiving a glyph associated with a font, the glyph to be rendered at a size and having one or more strokes, each stroke having a first edge and a second edge; means for calculating a scaled stem width for rendering the glyph at the size; means for calculating a first initial adjustment value for the first edge of each stroke and a second initial adjustment value for the second edge of each stroke; means for calculating an offset amount, being an amount by which one or more strokes of the glyph will be offset from a device resolution grid when a high resolution representation of the glyph is rendered as compared to an original position of an outline of the glyph, such that a minimum number of device pixels will be marked by the one or more strokes after adjusting the density values of one or more device pixels representing the glyph; means for rendering the high resolution representation of the glyph so that one or more edges of at least one stroke is offset from the device resolution grid by the offset amount, the high resolution representation representing a set of device pixels and determining an initial density value for each of said device pixels; for one or more of the device pixels in the set of device pixels, means for calculating a length of an edge of a stroke that passes through the device pixel; for each of the one or more device pixels, means for calculating a final adjustment value based on the length of an edge of a stroke passing through the device pixel and either the first or the second initial adjustment value depending on whether the edge is the first or the second edge of the corresponding stroke; and means for adjusting the density values of the one or more device pixels by the corresponding final adjustment value. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification