calculateFontsize method

double calculateFontsize(
  1. double fontSize,
  2. double dif,
  3. int number
)

Implementation

double calculateFontsize(double fontSize, double dif, int number) {
  switch (number) {
    case 1:
      return (fontSize - (dif / 5 * 4));
    case 2:
      return (fontSize - (dif / 5 * 3));
    case 3:
      return (fontSize - (dif / 5 * 2));
    case 4:
      return (fontSize - (dif / 5));
    case 6:
      return (fontSize + (dif / 5));
    case 7:
      return (fontSize + (dif / 5 * 2));
    case 8:
      return (fontSize + (dif / 5 * 3));
    case 9:
      return (fontSize + (dif / 5 * 4));
    default:
      return fontSize;
  }
}