Method and apparatus for filling contours in digital typefaces
摘要:
A method and apparatus is described which fills in the pixels missed when drop-out occurs during the fill process of character contours. The character contour is decomposed into a series of rook moves. The pixel selected is the one more covered by the actual shape of the portion of the curve where the rook moves are coincident and dropout occurs. This is dependent upon the slope of each of the curves at the location of dropout. Preferably the length of the sequence of colinear consecutive rook moves is used to approximate the slopes of the curves. The target pixel of the longest sequence of colinear rook moves is more covered than its opposite pixel and therefore the target pixel is set. The target pixel for a rook move is the pixel in the winding direction (i.e., left or right direction) along the rook move. Thus the target pixel of the stronger rook moves will be set and added to the bit map image generated using a outline fill process. In the preferred embodiment, the rook moves are examined to determine the length of a sequence, that is the number of rook moves that are sequentially in alignment with one another. A strength value is then assigned to each of those rook moves in a sequence equal to the number of rook moves in the sequence. The strength value of the rook move is then compared to the strength value of the opposite pixel, that is the pixel opposite the target pixel for a particular rook move. If the strength value of the target pixel of the rook move is greater than the strength of the opposite pixel, the opposite pixel value if reset to zero and the target pixel is set to equal the strength of the sequence. This process is performed for each rook move in a sequence and for each sequence of rook moves around the contour of the character. Once all rook moves have been evaluated, the value is assigned to the pixels of the character according to this process, are adjusted to reflect a bit map image to be displayed. This is achieved by turning on all bits which are greater than zero. The bit map generated is then logically ORed with the bit map generated using the contour fill process to provide a filled character in which drop out is eliminated and the distortion to the character is minimized.
信息查询
0/0