From 8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 13:47:06 +0200 Subject: Merging upstream version 4:24.2.4. Signed-off-by: Daniel Baumann --- svgio/source/svgreader/SvgNumber.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'svgio/source/svgreader/SvgNumber.cxx') diff --git a/svgio/source/svgreader/SvgNumber.cxx b/svgio/source/svgreader/SvgNumber.cxx index c1558f3e64..72a44dbdd0 100644 --- a/svgio/source/svgreader/SvgNumber.cxx +++ b/svgio/source/svgreader/SvgNumber.cxx @@ -35,10 +35,11 @@ double SvgNumber::solveNonPercentage(const InfoProvider& rInfoProvider) const switch (meUnit) { + // See https://drafts.csswg.org/css-values-4/#font-relative-length case SvgUnit::em: - return mfNumber * rInfoProvider.getCurrentFontSizeInherited(); + return mfNumber * rInfoProvider.getCurrentFontSize(); case SvgUnit::ex: - return mfNumber * rInfoProvider.getCurrentXHeightInherited() * 0.5; + return mfNumber * rInfoProvider.getCurrentXHeight(); case SvgUnit::px: return mfNumber; case SvgUnit::pt: -- cgit v1.2.3