1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Added relative font size support

This commit is contained in:
M66B 2021-04-19 21:22:28 +02:00
parent cb4ec62787
commit 405b7ec4d6

View file

@ -477,13 +477,19 @@ public class HtmlHelper {
if (!TextUtils.isEmpty(size)) {
try {
int s = Integer.parseInt(size);
if (s < 3)
size = "small";
else if (s > 3)
size = "large";
else
size = "medium";
if (size.startsWith("-"))
size = "smaller";
else if (size.startsWith("+"))
size = "larger";
else {
int s = Integer.parseInt(size);
if (s < 3)
size = "small";
else if (s > 3)
size = "large";
else
size = "medium";
}
sb.append("font-size:").append(size).append(";");
} catch (NumberFormatException ex) {
Log.i(ex);