Esempio n. 1
0
  private static String[] getFontList() {
    String[] nameArray =
        GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
    List<String> nameVector = new ArrayList<String>(nameArray.length);

    for (int i = 0, j; i < nameArray.length; i++) {
      for (j = 0; j < HIDEFONTS.length; j++) {
        if (nameArray[i].contains(HIDEFONTS[j])) break;
      }

      if (j == HIDEFONTS.length) nameVector.add(nameArray[i]);
    }

    String[] _array = new String[nameVector.size()];
    return nameVector.toArray(_array);
  }
Esempio n. 2
0
  private String[] getFontList() {
    String[] nameArray =
        GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
    Vector nameVector = new Vector(nameArray.length);

    for (int i = 0, j; i < nameArray.length; i++) {
      for (j = 0; j < HIDEFONTS.length; j++) {
        if (nameArray[i].indexOf(HIDEFONTS[j]) >= 0) break;
      }

      if (j == HIDEFONTS.length) nameVector.addElement(nameArray[i]);
    }

    String[] _array = new String[nameVector.size()];
    nameVector.copyInto(_array);
    return _array;
  }