[TD]fix Text sizes not exact

This commit is contained in:
Wanderer Fan
2022-05-14 11:42:27 -04:00
committed by WandererFan
parent 8b4e114b9d
commit 71426aa467
10 changed files with 67 additions and 45 deletions

View File

@@ -31,6 +31,7 @@
#include <App/Material.h>
#include <Base/Console.h>
#include <Base/Parameter.h>
#include <Base/Tools.h>
#include <Mod/TechDraw/App/DrawUtil.h>
@@ -94,7 +95,9 @@ void QGIHighlight::makeHighlight()
void QGIHighlight::makeReference()
{
prepareGeometryChange();
m_refFont.setPixelSize(QGIView::calculateFontPixelSize(m_refSize));
int fontSize = QGIView::exactFontSize(Base::Tools::toStdString(m_refFont.family()),
m_refSize);
m_refFont .setPixelSize(fontSize);
m_reference->setFont(m_refFont);
m_reference->setPlainText(m_refText);
double fudge = Rez::guiX(1.0);