double getFontRatio(double val) { final res = (val / refWidth) * 100; if (screenWidth < screenHeight) { return res * safeBlockHorizontal; } return res * safeBlockVertical; }