• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Displaying Text

Java's Graphics class provides seven methods related to displaying text. Before plunging into the various aspects of drawing text, however, you should be familiar with the following common terms for fonts and text:

  • Baseline— The imaginary line that the text rests on.

  • Descent— The distance below the baseline that a particular character extends. The letters g and j, for example, extend below the baseline.

  • Ascent— The distance above the baseline that a particular character extends. For example, the letter d has a higher ascent than the letter x.

  • Leading— The space between a line of text's lowest descent and the following line of text's highest ascent. Without leading, the letters g and j would touch the letters M and h on the next line.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint