From 3f2a89804058fde771fd656e8811cc0d6aa4605f Mon Sep 17 00:00:00 2001 From: wandererfan Date: Mon, 16 Sep 2019 15:46:07 -0400 Subject: [PATCH] [TD]Fix Annotation font size and descenders --- src/Mod/TechDraw/App/DrawViewAnnotation.cpp | 3 ++- src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawViewAnnotation.cpp b/src/Mod/TechDraw/App/DrawViewAnnotation.cpp index 828bf27e94..6b9402cf97 100644 --- a/src/Mod/TechDraw/App/DrawViewAnnotation.cpp +++ b/src/Mod/TechDraw/App/DrawViewAnnotation.cpp @@ -61,12 +61,13 @@ DrawViewAnnotation::DrawViewAnnotation(void) Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels"); std::string fontName = hGrp->GetASCII("LabelFont", "osifont"); + double defFontSize = hGrp->GetFloat("LabelSize", 5.0); ADD_PROPERTY_TYPE(Text ,("Default Text"),vgroup,App::Prop_None,"The text to be displayed"); ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),vgroup,App::Prop_None, "The name of the font to use"); ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the text"); - ADD_PROPERTY_TYPE(TextSize,(8.0),vgroup,App::Prop_None,"The size of the text in units"); + ADD_PROPERTY_TYPE(TextSize,(defFontSize),vgroup,App::Prop_None,"The size of the text in units"); ADD_PROPERTY_TYPE(MaxWidth,(-1.0),vgroup,App::Prop_None,"The maximum width of the Annotation block"); ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing adjustment. 100 is normal spacing."); diff --git a/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp b/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp index 0ec05e485f..fdd395b2b9 100644 --- a/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp @@ -157,7 +157,7 @@ void QGIViewAnnotation::drawAnnotation() ss << "
" << *it ; } } - ss << "

\n\n "; + ss << "

\n\n "; prepareGeometryChange(); m_textItem->setTextWidth(Rez::guiX(viewAnno->MaxWidth.getValue()));