]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#2205 Ability to customize the arrows and texts of dimensions: applying Font value
authornds <nds@opencascade.com>
Wed, 4 Oct 2017 07:17:11 +0000 (10:17 +0300)
committernds <nds@opencascade.com>
Wed, 4 Oct 2017 07:17:11 +0000 (10:17 +0300)
src/SketchPlugin/SketchPlugin_Plugin.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.cpp

index 9feecc92a9e9062666c76ea43c40d6eba1cd53cc..8967c182d4c2aaf165ec2d02171277f8159b7f71 100644 (file)
@@ -173,9 +173,10 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
 #endif
 
   Config_PropManager::registerProp(SKETCH_TAB_NAME, "dimension_font", "Dimension font",
-    Config_Prop::String, "Arial");
+    Config_Prop::String, "Times-bold");
   std::ostringstream aStream;
   aStream << SketcherPrs_Tools::getDefaultTextHeight();
+
   Config_PropManager::registerProp(SKETCH_TAB_NAME, "dimension_value_size",
     "Dimension value size", Config_Prop::Integer, aStream.str());
   aStream.str("");
index c0c79a10a105438ba5b028f8affbc82f0d557763..898771342b3de09febe969382823f3307263257d 100644 (file)
@@ -94,6 +94,8 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
     theDimAspect->SetExtensionSize(
         (theTextSize / aViewerScale + SketcherPrs_Tools::getArrowSize()) / 2.0);
   }
+  theDimAspect->TextAspect()->SetFont(Config_PropManager::string(SKETCH_TAB_NAME,
+                                      "dimension_font").c_str());
 
   theDimAspect->SetArrowTailSize(theDimAspect->ArrowAspect()->Length());
   // The value of vertical aligment is sometimes changed