[Part] fix bold italic measurement text
- bold and italic font did not work for measurement text, see https://github.com/FreeCAD/FreeCAD/pull/7148#issuecomment-1247989284
This commit is contained in:
@@ -227,9 +227,17 @@ void PartGui::dumpLinearResults(const BRepExtrema_DistShapeShape &measure)
|
||||
auto PartGui::getDimensionsFontName()
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/Mod/Part");
|
||||
std::string fontName = group->GetASCII("DimensionsFontName", "defaultFont")
|
||||
+ (group->GetBool("DimensionsFontStyleBold", false) ? " :Bold" : "")
|
||||
+ (group->GetBool("DimensionsFontStyleItalic", false) ? " :Italic" : "");
|
||||
std::string fontName = group->GetASCII("DimensionsFontName", "defaultFont");
|
||||
// if there is only italic, we must output ":Italic", otherwise ":Bold Italic"
|
||||
if (group->GetBool("DimensionsFontStyleBold")) {
|
||||
fontName = fontName + " :Bold";
|
||||
if (group->GetBool("DimensionsFontStyleItalic"))
|
||||
fontName = fontName + " Italic";
|
||||
}
|
||||
else {
|
||||
if (group->GetBool("DimensionsFontStyleItalic"))
|
||||
fontName = fontName + " :Italic";
|
||||
}
|
||||
return fontName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user