code: public int getAscent(String text) {
          int max = 0;
          char chars[] = text.toCharArray();
          for (int k = 0; k < chars.length; ++k) {
              int bbox[] = getCharBBox(chars[k]);
              if (bbox != null && bbox[3] > max)
                  max = bbox[3];
          }
          return max;
      }
docs: Gets the ascent of a <CODE>String</CODE> in normalized 1000 units. The ascent will always be
  greater than or equal to zero even if all the characters have a lower ascent.
  @param text the <CODE>String</CODE> to get the ascent of
  @return the ascent in normalized 1000 units