public final int[] getFontSizes() {
    Registry reg = getRegistry();
    int begin = reg.getInteger("MAIN", "font.sizes.minimum");
    int end = reg.getInteger("MAIN", "font.sizes.maximum");
    int granularity = reg.getInteger("MAIN", "font.sizes.granularity");
    if (begin > end) {
      throw new IllegalArgumentException(
      "Invalid font size range; minimum font size > maximum font size.");
    }
    if (((end - begin) <= granularity)) {
      throw new IllegalArgumentException(
      "The granularity >= (maximum font size - minimum font size).");
    }
    if (((end - begin) % granularity) > 0) {
      throw new IllegalArgumentException(
      "(Maximum font size - minimum font size) not divisible by granularity.");
    }
    
    int[] sizes = new int[((end - begin) / granularity) + 1];
    for (int i = 0; i < sizes.length; i++) {
      sizes[i] = begin + granularity * i;
    }
    return sizes;
  }