Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4340793

In solaris and win, Font.canDisplayUpTo() methods do not return -1 as said in th

XMLWordPrintable

    • 2d
    • beta
    • generic, x86, sparc
    • generic, solaris_7, windows_98
    • Verified

      In Solaris and Windows :
      Font.canDisplayUpTo(CharacterIterator iter), Font.canDisplayUpTo(String str) return the length of the string passed always even when the font is able to display all the characters perfectly. Document says that -1 should be returned if the font is able to display all the characters of the string passed. but -1 is not at all returned.

      Java2 Platform SE v1.4 Doc. says that these two methods should return -1 if the font can display all the characters in the string passed. But these methods always return the string length passed though the whole string is displayed perfectly by that particular font.
      In the document,in the description given for canDisplayUpTo(CharacterIterator) it is given that an offset into the string will be returned by this method which is the first char. that this font cannot display without using the missing glyph code. But under 'returns' heading ,for the same method it says that this method returns an offset into the string that can be displayed by this font. This is quite ambiguous.

            dougfelt Doug Felt
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: