×

Method for displaying text on a rendering device to accurately represent the text as if displayed on a target device

  • US 5,778,403 A
  • Filed: 09/01/1994
  • Issued: 07/07/1998
  • Est. Priority Date: 09/01/1994
  • Status: Expired due to Term
First Claim
Patent Images

1. A method in a computer system for displaying a line of text on a rendering device, the line of text to be displayed in a manner that visually approximates a display of the line of text on a target device, the line of text comprising a plurality of characters, the target device having a target font with a target advance width for each character, the rendering device having a rendering font with a rendering advance width for each character, the method comprising:

  • initializing a position of each character of the line of text in proportion to the target advance widths of the target font; and

    for each character of the line of text after a first character of the line of text,selecting the character;

    subtracting the position of a character immediately preceding the selected character from the position of the selected character to calculate a current advance width of the preceding character;

    subtracting the current advance width of the preceding character from the rendering advance width of the preceding character to calculate an advance width error of the preceding character;

    subtracting the position of the selected character from a character immediately following the selected character to calculate a current advance width of the selected character;

    subtracting the current advance width of the selected character from a rendering advance width of the selected character to calculate an advance width error of the selected character;

    subtracting the advance width error of the preceding character from the advance width error of the selected character to generate an overall error; and

    when the overall error is not zero, adjusting the position of the selected character to apportion the overall error equally between the advance width of the preceding character and the advance width of the selected character, and wherein, when the selected character is a new character that is inserted into a line of text already displayed, the newly inserted character is treated as the first character of the line so that only the positions of characters following the newly inserted character are initialized and adjusted; and

    outputting the line of text to the rendering device based on the adjusted position of the characters.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×