From b65451c2b41b003c42b70038096deb70b5cd2681 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Sun, 26 Oct 2025 13:18:07 +0100 Subject: [PATCH] Import: Make sure to not convert text height from draw units to points When importing DXF files using the C++ importer, TEXT and MTEXT entities had incorrect heights. For example: - text with height 100mm in the DXF file was imported as 35.28mm in FC. The scaling factor was consistent to be 0.3528. The issue was that we were applying a point-to-millimeter conversion to the text height , but that seems to be incorrect since according to DXF spec, TEXT and MTEXT entity heights are always specified in drawing units, not in points, so just remove that code. --- src/Mod/Import/App/dxf/dxf.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index c3a88bddf3..b11070822c 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2172,8 +2172,7 @@ bool CDxfRead::ReadText() ResolveEntityAttributes(); if ((this->*stringToUTF8)(textPrefix)) { - OnReadText(insertionPoint, height * 25.4 / 72.0, textPrefix, rotation); - // NOLINTEND(cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers) + OnReadText(insertionPoint, height, textPrefix, rotation); } else { ImportError("Unable to process encoding for TEXT/MTEXT '%s'\n", textPrefix);