From df26761dc0e4608585ec1697c4b6db26c9db94a3 Mon Sep 17 00:00:00 2001 From: Arindam Chaudhuri Date: Tue, 13 Dec 2022 10:38:47 +0530 Subject: [PATCH] fixed : sometimes text was drawn upscaled on final image in text-tool --- plugins/text-tool/text_tool.cpp | 4 +++- src/common.h | 2 +- windows/PhotoQuick.nsi | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/text-tool/text_tool.cpp b/plugins/text-tool/text_tool.cpp index 963b391..89b7ab2 100644 --- a/plugins/text-tool/text_tool.cpp +++ b/plugins/text-tool/text_tool.cpp @@ -325,10 +325,12 @@ TextToolDialog:: onBgColorChange(int index) updateCurrentTextbox(); } - void TextToolDialog:: accept() { + // image needs to set pixel density, otherwise drawing text gives weird scaled fonts + image.setDotsPerMeterX(this->logicalDpiX()/0.0254); + image.setDotsPerMeterY(this->logicalDpiY()/0.0254); painter.begin(&image); painter.scale(1.0/scale, 1.0/scale); for (TextBox &textbox : textboxes) { diff --git a/src/common.h b/src/common.h index f8ffc5d..8b6f9d4 100644 --- a/src/common.h +++ b/src/common.h @@ -5,7 +5,7 @@ #include "exif.h" #define PROG_NAME "PhotoQuick" -#define PROG_VERSION "4.15.2" +#define PROG_VERSION "4.15.3" #define COPYRIGHT_YEAR "2017-2021" #define AUTHOR_NAME "Arindam Chaudhuri" #define AUTHOR_EMAIL "ksharindam@gmail.com" diff --git a/windows/PhotoQuick.nsi b/windows/PhotoQuick.nsi index 63dc81d..69cccad 100755 --- a/windows/PhotoQuick.nsi +++ b/windows/PhotoQuick.nsi @@ -1,6 +1,6 @@ ; HM NIS Edit Wizard helper defines !define PROG_NAME "PhotoQuick" -!define PROG_VERSION "4.15.2" +!define PROG_VERSION "4.15.3" !define PROG_PUBLISHER "Arindamsoft" !define PROG_ICON "photoquick.ico" !define PROG_EXEC "photoquick.exe"