private static String cleanupFontName(final String baseFontName){
  final int length=baseFontName.length();
  final StringBuilder cleanedName=new StringBuilder(length);
  char c;
  for (int aa=0; aa < length; aa++) {
    c=baseFontName.charAt(aa);
    if (c == ' ' || c == '-') {
    }
 else     if (c == '#' && baseFontName.charAt(aa + 1) == '2' && (baseFontName.charAt(aa + 2) == '0' || baseFontName.charAt(aa + 2) == 'D')) {
      if (baseFontName.charAt(aa + 2) == 'D') {
        cleanedName.append('-');
      }
      aa+=2;
    }
 else {
      cleanedName.append(c);
    }
  }
  return cleanedName.toString();
}

private static String cleanupFontName ( final String baseFontName ) { final int length = baseFontName . length ( ) ; final StringBuilder cleanedName = new StringBuilder ( length ) ; char c ; for ( int aa = 0 ; aa < length ; aa ++ ) { c = baseFontName . charAt ( aa ) ; if ( c == ' ' || c == '-' ) { } else if ( c == '#' && baseFontName . charAt ( aa + 1 ) == '2' && ( baseFontName . charAt ( aa + 2 ) == '0' || baseFontName . charAt ( aa + 2 ) == 'D' ) ) { if ( baseFontName . charAt ( aa + 2 ) == 'D' ) { cleanedName . append ( '-' ) ; } aa += 2 ; } else { cleanedName . append ( c ) ; } } return cleanedName . toString ( ) ; }
remove unwanted chars from string name
