diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 285f8fa934..380a460f64 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -1375,9 +1375,11 @@ public class HtmlHelper { if (value.endsWith("pc")) // 6 pc = 72 pt return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 12 / DEFAULT_FONT_SIZE_PT; if (value.endsWith("cm")) // 1 inch = 2.54 cm - return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 2.54f / 72 / DEFAULT_FONT_SIZE_PT; + return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 2.54f * 72 / DEFAULT_FONT_SIZE_PT; + if (value.endsWith("mm")) // 1 inch = 25.4 mm + return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 25.4f * 72 / DEFAULT_FONT_SIZE_PT; if (value.endsWith("in")) // 1 inch = 72pt - return Float.parseFloat(value.substring(0, value.length() - 2).trim()) / 72 / DEFAULT_FONT_SIZE_PT; + return Float.parseFloat(value.substring(0, value.length() - 2).trim()) * 72 / DEFAULT_FONT_SIZE_PT; return Float.parseFloat(value.trim()) / DEFAULT_FONT_SIZE; } catch (NumberFormatException ex) { Log.i(ex);