Default font to Sans from osifont

This commit is contained in:
WandererFan 2016-06-28 09:40:03 -04:00 committed by wmayer
parent aa5df7c9ba
commit ed2de2c06e
6 changed files with 5 additions and 11 deletions

View File

@ -60,7 +60,7 @@ DrawViewAnnotation::DrawViewAnnotation(void)
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
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");

View File

@ -83,7 +83,7 @@ DrawViewDimension::DrawViewDimension(void)
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
ADD_PROPERTY_TYPE(References2D,(0,0),"Dimension",(App::PropertyType)(App::Prop_None),"Projected Geometry References");
ADD_PROPERTY_TYPE(References3D,(0,0),"Dimension",(App::PropertyType)(App::Prop_None),"3D Geometry References");

View File

@ -60,7 +60,7 @@ DrawViewSpreadsheet::DrawViewSpreadsheet(void)
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
ADD_PROPERTY_TYPE(Source ,(0),vgroup,App::Prop_None,"Spreadsheet to view");
ADD_PROPERTY_TYPE(CellStart ,("A1"),vgroup,App::Prop_None,"The top left cell of the range to display");

View File

@ -85,12 +85,6 @@ void TechDrawGuiExport initTechDrawGui()
TechDrawGui::Workbench::init();
//TODO: is this platform independent?? should osifont be added by installer?
//Load the osifont for Drawing View
// See https://code.google.com/p/osifont/
QFontDatabase fontDB;
fontDB.addApplicationFont(QString::fromAscii(":/fonts/osifont.ttf"));
TechDrawGui::ViewProviderPage::init();
TechDrawGui::ViewProviderDrawingView::init();

View File

@ -79,7 +79,7 @@ void QGCustomText::paint ( QPainter * painter, const QStyleOptionGraphicsItem *
//svg text is much larger than screen text. scene units(mm) vs points.
//need to scale text if going to svg.
//TODO: magic translation happens? approx: right ~8mm down: 12mm + (3mm per mm of text height)
//SVG transform matrix translation values are different for same font size + different fonts (osifont vs Ubuntu vs Arial)???
//SVG transform matrix translation values are different for same font size + different fonts (Sans vs Ubuntu vs Arial)???
// scale values are same for same font size + different fonts.
//double svgScale = 2.835; //72dpi/(25.4mm/in)
//double svgScale = 3.84; //96dpi/(25mm/in)

View File

@ -88,7 +88,7 @@ QGIView::QGIView()
m_pen.setColor(m_colCurrent);
hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
std::string fontName = hGrp->GetASCII("LabelFont", "Sans");
m_font.setFamily(QString::fromStdString(fontName));
m_font.setPointSize(5.0); //scene units (mm), not points