1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Fixed rem font sizes

This commit is contained in:
M66B 2021-01-05 14:08:39 +01:00
parent 39cf269959
commit 19bd88c91a

View file

@ -1364,10 +1364,10 @@ public class HtmlHelper {
try { try {
if (value.endsWith("%")) if (value.endsWith("%"))
return Float.parseFloat(value.substring(0, value.length() - 1).trim()) / 100 * current; return Float.parseFloat(value.substring(0, value.length() - 1).trim()) / 100 * current;
if (value.endsWith("em"))
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) * current;
if (value.endsWith("rem")) if (value.endsWith("rem"))
return Float.parseFloat(value.substring(0, value.length() - 3).trim()); return Float.parseFloat(value.substring(0, value.length() - 3).trim());
if (value.endsWith("em"))
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) * current;
if (value.endsWith("pt")) if (value.endsWith("pt"))
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / DEFAULT_FONT_SIZE_PT; return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / DEFAULT_FONT_SIZE_PT;
if (value.endsWith("px")) if (value.endsWith("px"))