public static boolean isComplexText(char[] chs,int start,int limit){
  for (int i=start; i < limit; i++) {
    if (chs[i] < MIN_LAYOUT_CHARCODE) {
      continue;
    }
 else     if (isNonSimpleChar(chs[i])) {
      return true;
    }
  }
  return false;
}

public static boolean isComplexText ( char [ ] chs , int start , int limit ) { for ( int i = start ; i < limit ; i ++ ) { if ( chs [ i ] < MIN_LAYOUT_CHARCODE ) { continue ; } else if ( isNonSimpleChar ( chs [ i ] ) ) { return true ; } } return false ; }
if there is anything in the text which triggers a case where char - > glyph does not map 1 : 1 in straightforward left - > right ordering , then this method returns true . scripts which might require it but are not treated as such due to jdk implementations will not return true . ie a ' true ' return is an indication of the treatment by the implementation . whether supplementary characters should be considered is dependent on the needs of the caller . since this method accepts the ' char ' type then such chars are always represented by a pair . from a rendering perspective these will all ( in the cases i know of ) still be one unicode character - > one glyph . but if a caller is using this to discover any case where it cannot make naive assumptions about the number of chars , and how to index through them , then it may need the option to have a ' true ' return in such a case .
