mirror of https://github.com/M66B/FairEmail.git
Added support for ex dimension
This commit is contained in:
parent
592ded9470
commit
802270160b
|
@ -1420,6 +1420,8 @@ public class HtmlHelper {
|
|||
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("ex")) // 1 ex = 0.5 em
|
||||
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 2 * current;
|
||||
if (value.endsWith("pt"))
|
||||
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / DEFAULT_FONT_SIZE_PT;
|
||||
if (value.endsWith("px"))
|
||||
|
|
Loading…
Reference in New Issue