Change cell_height and cell_width checks to be consistent with later check

This commit is contained in:
Luflosi
2019-02-25 16:13:56 +01:00
parent d4c2293d56
commit 4d4b690a99

View File

@@ -398,9 +398,9 @@ calc_cell_metrics(FontGroup *fg) {
if (OPT(adjust_line_height_frac) != 0.f) ch *= OPT(adjust_line_height_frac);
if (OPT(adjust_column_width_px != 0)) cw += OPT(adjust_column_width_px);
if (OPT(adjust_column_width_frac) != 0.f) cw *= OPT(adjust_column_width_frac);
if (cw >= 2 && cw < 1000) cell_width = cw;
if (cw >= 2 && cw <= 1000) cell_width = cw;
else log_error("Cell width invalid after adjustment, ignoring adjust_column_width");
if (ch >= 4 && ch < 1000) cell_height = ch;
if (ch >= 4 && ch <= 1000) cell_height = ch;
else log_error("Cell height invalid after adjustment, ignoring adjust_line_height");
int line_height_adjustment = cell_height - before_cell_height;
if (cell_height < 4) fatal("Line height too small after adjustment");