From c43fb928603491630d7d4afc76d8fe04a5b8e3bb Mon Sep 17 00:00:00 2001 From: Green Date: Sat, 25 Jan 2025 18:27:22 +0300 Subject: [PATCH] Fixed the correction of large text size in svg --- DesktopEditor/raster/Metafile/svg/SvgObjects/CText.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DesktopEditor/raster/Metafile/svg/SvgObjects/CText.cpp b/DesktopEditor/raster/Metafile/svg/SvgObjects/CText.cpp index af4dcf12916..aa3a67b8fb0 100644 --- a/DesktopEditor/raster/Metafile/svg/SvgObjects/CText.cpp +++ b/DesktopEditor/raster/Metafile/svg/SvgObjects/CText.cpp @@ -442,14 +442,14 @@ namespace SVG if (!Equals(0., dFontHeight) && dFontHeight < MIN_FONT_SIZE) { - dXScale *= dFontHeight / MIN_FONT_SIZE; - dYScale *= dFontHeight / MIN_FONT_SIZE; + dXScale *= MIN_FONT_SIZE / dFontHeight; + dYScale *= MIN_FONT_SIZE / dFontHeight; dFontHeight = MIN_FONT_SIZE; } else if (!Equals(0., dFontHeight) && dFontHeight > MAX_FONT_SIZE) { - dXScale *= MAX_FONT_SIZE / dFontHeight; - dYScale *= MAX_FONT_SIZE / dFontHeight; + dXScale *= dFontHeight / MAX_FONT_SIZE; + dYScale *= dFontHeight / MAX_FONT_SIZE; dFontHeight = MAX_FONT_SIZE; }