diff --git a/src/osgPlugins/dxf/dxfEntity.cpp b/src/osgPlugins/dxf/dxfEntity.cpp index edb27034e..062974ac6 100644 --- a/src/osgPlugins/dxf/dxfEntity.cpp +++ b/src/osgPlugins/dxf/dxfEntity.cpp @@ -910,10 +910,10 @@ dxfText::drawScene(scene* sc) sc->ocs(m); ref_ptr _text = new osgText::Text; - _text->setText(_string); + _text->setText(_string, encoding); + _text->setFont(font); _text->setCharacterSize( _height, 1.0/_xscale ); - _text->setFont("arial.ttf"); Quat qr( DegreesToRadians(_rotation), Z_AXIS ); diff --git a/src/osgPlugins/dxf/dxfEntity.h b/src/osgPlugins/dxf/dxfEntity.h index 071f42b45..ee553cb3d 100644 --- a/src/osgPlugins/dxf/dxfEntity.h +++ b/src/osgPlugins/dxf/dxfEntity.h @@ -293,6 +293,8 @@ class dxfText : public dxfBasicEntity { public: dxfText() : + encoding(osgText::String::ENCODING_ASCII), + font("arial.ttf"), _string(""), _point1(0,0,0), _point2(0,0,0), @@ -310,6 +312,10 @@ public: virtual void assign(dxfFile* dxf, codeValue& cv); virtual void drawScene(scene* sc); + // application settings + osgText::String::Encoding encoding; + std::string font; + protected: std::string _string; // 1 osg::Vec3d _point1; // 10,20,30