mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Range check font size
This commit is contained in:
parent
3471750ef4
commit
9e80060dd8
1 changed files with 6 additions and 2 deletions
|
@ -481,12 +481,16 @@ public class HtmlHelper {
|
|||
if (size.startsWith("-")) {
|
||||
if (s < 0)
|
||||
size = "smaller";
|
||||
else
|
||||
throw new NumberFormatException("size=" + size);
|
||||
} else if (size.startsWith("+")) {
|
||||
if (s > 0)
|
||||
size = "larger";
|
||||
} else if (s >= 1 && s < 3)
|
||||
else
|
||||
throw new NumberFormatException("size=" + size);
|
||||
} else if (s < 3)
|
||||
size = "small";
|
||||
else if (s > 3 && s <= 7)
|
||||
else if (s > 3)
|
||||
size = "large";
|
||||
else
|
||||
size = "medium";
|
||||
|
|
Loading…
Reference in a new issue