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:
parent
cb4ec62787
commit
405b7ec4d6
1 changed files with 13 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue