Skip to content

Commit

Permalink
Fix converting mm to emus
Browse files Browse the repository at this point in the history
  • Loading branch information
onizet committed Sep 23, 2024
1 parent 63b53ff commit 1666f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Html2OpenXml/Primitives/Unit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static long ComputeInEmus(UnitMetric type, double value)
case UnitMetric.Emus: return (long) value;
case UnitMetric.Inch: return (long) (value * 914400L);
case UnitMetric.Centimeter: return (long) (value * 360000L);
case UnitMetric.Millimeter: return (long) (value * 3600000L);
case UnitMetric.Millimeter: return (long) (value * 36000L);
case UnitMetric.EM:
// well this is a rough conversion but considering 1em = 12pt (http://sureshjain.wordpress.com/2007/07/06/53/)
return (long) (value / 72 * 914400L * 12);
Expand Down

0 comments on commit 1666f5b

Please sign in to comment.