Skip to content

Commit

Permalink
[TD]Fix Annotation font size and descenders
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Sep 17, 2019
1 parent 4556d3f commit f76e74d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Mod/TechDraw/App/DrawViewAnnotation.cpp
Expand Up @@ -61,12 +61,13 @@ DrawViewAnnotation::DrawViewAnnotation(void)
Base::Reference<ParameterGrp> 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.");

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp
Expand Up @@ -157,7 +157,7 @@ void QGIViewAnnotation::drawAnnotation()
ss << "<br>" << *it ;
}
}
ss << "</p>\n</body>\n</html> ";
ss << "<br></p>\n</body>\n</html> ";

prepareGeometryChange();
m_textItem->setTextWidth(Rez::guiX(viewAnno->MaxWidth.getValue()));
Expand Down

0 comments on commit f76e74d

Please sign in to comment.