Claims
- 1. A computer-implemented method for processing a character for display on a raster output device having an resolution defined by a set of output pixel positions, the method comprising:
aligning one or more stems of the character to a best sub-pixel boundary, wherein the best sub-pixel boundary is selected from a plurality of sub-pixel boundaries based on a smallest difference between ideal locations for the stems of the character and locations of aligned stems of the character to a respective sub-pixel boundary; rendering the character at a resolution higher than the resolution of the raster output device; and down sampling the aligned character to the raster output device resolution.
- 2. The method of claim 1, wherein the character is created at a type size by a font having font metrics including hinting information defining a center of a stem, and wherein the step of aligning the stem of the character includes laying down the character and determining an alignment grid that best aligns the center of the stem to a sub-pixel boundary.
- 3. The method of claim 1, further including:
receiving sub-pixel geometry information for the output device defining a geometry of the addressable sub-pixels for each pixel of the output device; and where the step of aligning the stem of the character includes using the sub-pixel geometry information to determine which sub-pixels of which pixels to illuminate when the stem of the character is not aligned to a pixel boundary.
- 4. The method of claim 1, wherein down sampling includes:
receiving device specific data derived specifically for the output device where the device specific data includes a plurality of functions, one for each color plane used by the output device; and determining an intensity for each sub-pixel of a pixel in the selected alignment grid using the device specific data to derive intensity data specifically for the output device.
- 5. The method of claim 1, wherein aligning includes:
obtaining a stem width; converting the obtained stem width into an integer number of device pixels; if the number of device pixels is a non-zero even number, determining an ideal alignment of a center of the stem to be a boundary between two sub-pixels; and if the number of device pixels is not a non-zero even number, determining an ideal alignment of a center of the stem to be a sub-pixel center.
- 6. The method of claim 1, wherein aligning includes:
for each stem calculating a difference between an ideal stem center location and a stem center location imposed by each of the one or more sub-pixel alignment grids; and selecting the sub-pixel alignment grid having the smallest difference between any ideal stem center location and a stem center location imposed by the sub-pixel alignment grid.
- 7. The method of claim 1, wherein aligning includes:
for each stem calculating a difference between an ideal stem center location and a stem center location imposed by each of the one or more sub-pixel alignment grids; and selecting the sub-pixel alignment grid for which the sum of the calculated differences between the ideal stem center locations and the stem center locations imposed by the sub-pixel alignment grid is the smallest.
- 8. The method of claim 1, wherein rendering includes:
rendering the character at a resolution that is three or more times higher than the resolution of the raster output device.
- 9. The method of claim 1, wherein rendering includes:
rendering the character in accordance with a hard-edged policy that does not allow anti-aliasing of horizontal and vertical stems.
- 10. The method of claim 1, wherein rendering includes:
rendering the character in accordance with a soft-edged policy that allows anti-aliasing of horizontal and vertical stems.
- 11. The method of claim 1, wherein rendering includes:
dynamically determining if the rendering is to be performed in accordance with a hard-edged policy or a soft-edged policy.
- 12. The method of claim 1, wherein rendering includes:
determining, based on user input, if the rendering is to be performed in accordance with a hard-edged policy or a soft-edged policy.
- 13. A computer program product, tangibly stored on a computer-readable medium, for processing a character for display on a raster output device having an resolution defined by a set of output pixel positions, comprising instructions operable to cause a programmable processor to:
align one or more stems of the character to a best sub-pixel boundary, wherein the best sub-pixel boundary is selected from a plurality of sub-pixel boundaries based on a smallest difference between ideal locations for the stems of the character and locations of aligned stems of the character to a respective sub-pixel boundary; render the character at a resolution higher than the resolution of the raster output device; and down sample the aligned character to the raster output device resolution.
- 14. The computer program product of claim 13, wherein the character is created at a type size by a font having font metrics including hinting information defining a center of a stem and wherein the instructions to align the stem of the character include instructions to lay down the character and determining an alignment grid that best aligns the center of the stem to a sub-pixel boundary.
- 15. The computer program product of claim 13, further including instructions to:
receive sub-pixel geometry information for the output device defining a geometry of the addressable sub-pixels for each pixel of the output device; and where the instructions to align the stem of the character include instructions to use the sub-pixel geometry information to determine which sub-pixels of which pixels to illuminate when the stem of the character is not aligned to a pixel boundary.
- 16. The computer program product of claim 13, wherein the instructions to down sample include instructions to:
receive device specific data derived specifically for the output device where the device specific data includes a plurality of functions, one for each color plane used by the output device; and determine an intensity for each sub-pixel of a pixel in the selected alignment grid using the device specific data to derive intensity data specifically for the output device.
- 17. The computer program product of claim 13, wherein the instructions to align include instructions to:
obtain a stem width; convert the obtained stem width into an integer number of device pixels; if the number of device pixels is a non-zero even number, determine an ideal alignment of a center of the stem to be a boundary between two sub-pixels; and if the number of device pixels is not a non-zero even number, determine an ideal alignment of a center of the stem to be a sub-pixel center.
- 18. The computer program product of claim 17, wherein the instructions to select an alignment grid include instructions to:
for each stem calculate a difference between an ideal stem center location and a stem center location imposed by each of the one or more sub-pixel alignment grids; and select the sub-pixel alignment grid having the smallest difference between any ideal stem center location and a stem center location imposed by the sub-pixel alignment grid.
- 19. The computer program product of claim 17, wherein the instructions to select an alignment grid include instructions to:
for each stem calculate a difference between an ideal stem center location and a stem center location imposed by each of the one or more sub-pixel alignment grids; and select the sub-pixel alignment grid for which the sum of the calculated differences between the ideal stem center locations and the stem center locations imposed by the sub-pixel alignment grid is the smallest.
- 20. The computer program product of claim 13, wherein the instructions to render include instructions to:
render the character at a resolution that is three or more times higher than the resolution of the raster output device.
- 21. The computer program product of claim 13, wherein the instructions to render include instructions to:
render the character in accordance with a hard-edged policy that does not allow anti-aliasing of horizontal and vertical stems.
- 22. The computer program product of claim 13, wherein the instructions to render include instructions to:
determine if the rendering is to be performed in accordance with a hard-edged policy or a soft-edged policy, wherein the hard-eged policy does not allow anti-aliasing of horizontal and vertical stems, and the soft-edged policy allows anti-aliasing of horizontal and vertical stems.
- 23. The computer program product of claim 13, wherein the instructions to render include instructions to:
dynamically determine if the rendering is to be performed in accordance with a hard-edged policy or a soft-edged policy.
- 24. The computer program product of claim 13, wherein the instructions to render include instructions to:
determine, based on user input, if the rendering is to be performed in accordance with a hard-edged policy or a soft-edged policy.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is a continuation of and claims priority to pending U.S. application Ser. No. 09/378,237, filed Aug. 19, 1999, which is hereby incorporated by reference in its entirety for all purposes.
Continuations (1)
|
Number |
Date |
Country |
Parent |
09378237 |
Aug 1999 |
US |
Child |
10388828 |
Mar 2003 |
US |