Changeset 11735

Show
Ignore:
Timestamp:
09/06/10 17:43:59 (21 months ago)
Author:
robert
Message:

Further work on new 3D text support

Location:
OpenSceneGraph/trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgtext3D/GlyphGeometry.cpp

    r11731 r11735  
    410410///////////////////////////////////////////////////////////////////////////////////////// 
    411411// 
    412 // BevelProfile 
    413 // 
    414 BevelProfile::BevelProfile() 
    415 { 
    416     flatBevel(); 
    417 } 
    418  
    419 void BevelProfile::flatBevel(float width) 
    420 { 
    421     _vertices.clear(); 
    422  
    423     if (width>0.5f) width = 0.5f; 
    424  
    425     _vertices.push_back(osg::Vec2(0.0f,0.0f)); 
    426  
    427     _vertices.push_back(osg::Vec2(width,1.0f)); 
    428  
    429     if (width<0.5f) _vertices.push_back(osg::Vec2(1-width,1.0f)); 
    430  
    431     _vertices.push_back(osg::Vec2(1.0f,0.0f)); 
    432 } 
    433  
    434 void BevelProfile::roundedBevel(float width, unsigned int numSteps) 
    435 { 
    436     _vertices.clear(); 
    437  
    438     if (width>0.5f) width = 0.5f; 
    439  
    440     unsigned int i = 0; 
    441     for(; i<=numSteps; ++i) 
    442     { 
    443         float angle = float(osg::PI)*0.5f*(float(i)/float(numSteps)); 
    444         _vertices.push_back( osg::Vec2((1.0f-cosf(angle))*width, sinf(angle)) ); 
    445     } 
    446  
    447     // start the second half one into the curve if the width is half way across 
    448     i = width<0.5f ? 0 : 1; 
    449     for(; i<=numSteps; ++i) 
    450     { 
    451         float angle = float(osg::PI)*0.5f*(float(numSteps-i)/float(numSteps)); 
    452         _vertices.push_back( osg::Vec2(1.0-(1.0f-cosf(angle))*width, sin(angle)) ); 
    453     } 
    454 } 
    455  
    456 void BevelProfile::roundedBevel2(float width, unsigned int numSteps) 
    457 { 
    458     _vertices.clear(); 
    459  
    460     if (width>0.5f) width = 0.5f; 
    461  
    462     float h = 0.1f; 
    463     float r = 1.0f-h; 
    464      
    465     _vertices.push_back(osg::Vec2(0.0,0.0)); 
    466  
    467     unsigned int i = 0; 
    468     for(; i<=numSteps; ++i) 
    469     { 
    470         float angle = float(osg::PI)*0.5f*(float(i)/float(numSteps)); 
    471         _vertices.push_back( osg::Vec2((1.0f-cosf(angle))*width, h + sinf(angle)*r) ); 
    472     } 
    473  
    474     // start the second half one into the curve if the width is half way across 
    475     i = width<0.5f ? 0 : 1; 
    476     for(; i<=numSteps; ++i) 
    477     { 
    478         float angle = float(osg::PI)*0.5f*(float(numSteps-i)/float(numSteps)); 
    479         _vertices.push_back( osg::Vec2(1.0-(1.0f-cosf(angle))*width, h + sin(angle)*r) ); 
    480     } 
    481  
    482     _vertices.push_back(osg::Vec2(1.0,0.0)); 
    483  
    484 } 
    485  
    486 void BevelProfile::print(std::ostream& fout) 
    487 { 
    488     OSG_NOTICE<<"print bevel"<<std::endl; 
    489     for(Vertices::iterator itr = _vertices.begin(); 
    490         itr != _vertices.end(); 
    491         ++itr) 
    492     { 
    493         OSG_NOTICE<<"  "<<*itr<<std::endl; 
    494     } 
    495 } 
    496  
    497 ///////////////////////////////////////////////////////////////////////////////////////// 
    498 // 
    499412// computeGlyphGeometry 
    500413// 
     
    602515// computeTextGeometry 
    603516// 
    604 osg::Geometry* computeTextGeometry(osg::Geometry* glyphGeometry, BevelProfile& profile, float width) 
     517osg::Geometry* computeTextGeometry(osg::Geometry* glyphGeometry, const osgText::Bevel& profile, float width) 
    605518{ 
    606519    osg::Vec3Array* orig_vertices = dynamic_cast<osg::Vec3Array*>(glyphGeometry->getVertexArray()); 
     
    699612        unsigned int no_vertices_on_boundary = bevel->size()/2; 
    700613 
    701         osgText::BevelProfile::Vertices& profileVertices = profile.getVertices(); 
     614        const osgText::Bevel::Vertices& profileVertices = profile.getVertices(); 
    702615        unsigned int no_vertices_on_bevel = profileVertices.size(); 
    703616 
     
    782695// computeShellGeometry 
    783696// 
    784 osg::Geometry* computeShellGeometry(osg::Geometry* glyphGeometry, BevelProfile& profile, float width) 
     697osg::Geometry* computeShellGeometry(osg::Geometry* glyphGeometry, const osgText::Bevel& profile, float width) 
    785698{ 
    786699    osg::Vec3Array* orig_vertices = dynamic_cast<osg::Vec3Array*>(glyphGeometry->getVertexArray()); 
     
    925838        unsigned int no_vertices_on_boundary = bevel->size()/2; 
    926839 
    927         osgText::BevelProfile::Vertices& profileVertices = profile.getVertices(); 
     840        const osgText::Bevel::Vertices& profileVertices = profile.getVertices(); 
    928841        unsigned int no_vertices_on_bevel = profileVertices.size(); 
    929842 
  • OpenSceneGraph/trunk/examples/osgtext3D/GlyphGeometry.h

    r11731 r11735  
    1616 
    1717#include <osgText/Font3D> 
     18#include "TextNode.h" 
    1819 
    1920namespace osgText 
    2021{ 
    2122 
    22 class BevelProfile 
    23 { 
    24     public: 
    25  
    26         typedef std::vector<osg::Vec2> Vertices; 
    27  
    28         BevelProfile(); 
    29  
    30         void flatBevel(float width=0.25f); 
    31  
    32         void roundedBevel(float width=0.5f, unsigned int numSteps=10); 
    33  
    34         void roundedBevel2(float width=0.5f, unsigned int numSteps=10); 
    35  
    36         void print(std::ostream& fout); 
    37  
    38         Vertices& getVertices() { return _vertices; } 
    39  
    40     protected: 
    41  
    42         Vertices _vertices; 
    43 }; 
    44  
    4523extern osg::Geometry* computeGlyphGeometry(osgText::Glyph3D* glyph, float bevelThickness, float shellThickness); 
    4624 
    47 extern osg::Geometry* computeTextGeometry(osg::Geometry* glyphGeometry, BevelProfile& profile, float width); 
     25extern osg::Geometry* computeTextGeometry(osg::Geometry* glyphGeometry, const Bevel& profile, float width); 
    4826 
    49 extern osg::Geometry* computeShellGeometry(osg::Geometry* glyphGeometry, BevelProfile& profile, float width); 
     27extern osg::Geometry* computeShellGeometry(osg::Geometry* glyphGeometry, const Bevel& profile, float width); 
    5028 
    5129} 
  • OpenSceneGraph/trunk/examples/osgtext3D/TextNode.cpp

    r11734 r11735  
    2929Bevel::Bevel() 
    3030{ 
    31     _thickness = 0.1f; 
     31    _thickness = 0.02f; 
    3232    flatBevel(); 
    3333} 
     
    192192    if (style) 
    193193    { 
    194         size.y() = characterSize * style->getWidthRatio(); 
    195         size.z() = characterSize * style->getThicknessRatio(); 
     194        size.y() = characterSize; 
     195        size.z() = characterSize; 
    196196    } 
    197197 
     
    243243            if (glyph) 
    244244            { 
    245                 technique->addCharacter(pos, size, glyph, style); 
    246                 pos += osg::Vec3(size.x()*(glyph->getHorizontalAdvance()*characterWidthScale), 0.0f ,0.0f); 
     245                osg::Vec3 local_scale( size ); 
     246                local_scale *= (1.0f/font->getScale()); 
     247 
     248                technique->addCharacter(pos, local_scale, glyph, style); 
     249                pos += osg::Vec3(size.x()*(glyph->getHorizontalWidth()/font->getScale()), 0.0f ,0.0f); 
    247250            } 
    248251        } 
     
    302305    OSG_NOTICE<<"TextTechnique::addCharacter 3D("<<position<<", "<<size<<", "<<glyph<<", "<<style<<")"<<std::endl; 
    303306 
    304     double scale = size.x() / glyph->getVerticalHeight(); 
    305  
    306307    osg::ref_ptr<osg::PositionAttitudeTransform> transform = new osg::PositionAttitudeTransform; 
    307308    transform->setPosition(position); 
    308309    transform->setAttitude(osg::Quat(osg::inDegrees(90.0),osg::Vec3d(1.0,0.0,0.0))); 
    309     transform->setScale(osg::Vec3d(scale, scale, scale)); 
     310    transform->setScale(size); 
    310311 
    311312    osg::ref_ptr<osg::Geode> geode = new osg::Geode; 
    312313 
    313     bool outline = false; 
    314     float thickness = 5; 
    315     float width = 10; 
    316     BevelProfile profile; 
     314    const Bevel* bevel = style ? style->getBevel() : 0; 
     315    bool outline = style ? style->getOutlineRatio()>0.0f : false; 
     316    float width = style->getThicknessRatio(); 
    317317    float creaseAngle = 30.0f; 
    318318    bool smooth = true; 
    319319 
    320     osg::ref_ptr<osg::Geometry> glyphGeometry = osgText::computeGlyphGeometry(glyph, thickness, width); 
    321     osg::ref_ptr<osg::Geometry> textGeometry = osgText::computeTextGeometry(glyphGeometry.get(), profile, width); 
    322     osg::ref_ptr<osg::Geometry> shellGeometry = outline ? osgText::computeShellGeometry(glyphGeometry.get(), profile, width) : 0; 
    323     if (textGeometry.valid()) geode->addDrawable(textGeometry.get()); 
    324     if (shellGeometry.valid()) geode->addDrawable(shellGeometry.get()); 
    325  
    326     // create the normals 
    327     if (smooth && textGeometry.valid()) 
    328     { 
    329         osgUtil::SmoothingVisitor::smooth(*textGeometry, osg::DegreesToRadians(creaseAngle)); 
     320    if (bevel) 
     321    { 
     322        float thickness = bevel->getBevelThickness(); 
     323 
     324        osg::ref_ptr<osg::Geometry> glyphGeometry = osgText::computeGlyphGeometry(glyph, thickness, width); 
     325        osg::ref_ptr<osg::Geometry> textGeometry = osgText::computeTextGeometry(glyphGeometry.get(), *bevel, width); 
     326        osg::ref_ptr<osg::Geometry> shellGeometry = outline ? osgText::computeShellGeometry(glyphGeometry.get(), *bevel, width) : 0; 
     327        if (textGeometry.valid()) geode->addDrawable(textGeometry.get()); 
     328        if (shellGeometry.valid()) geode->addDrawable(shellGeometry.get()); 
     329 
     330        // create the normals 
     331        if (smooth && textGeometry.valid()) 
     332        { 
     333            osgUtil::SmoothingVisitor::smooth(*textGeometry, osg::DegreesToRadians(creaseAngle)); 
     334        } 
     335    } 
     336    else 
     337    { 
    330338    } 
    331339 
  • OpenSceneGraph/trunk/examples/osgtext3D/osgtext3D.cpp

    r11734 r11735  
    7575    OSG_NOTICE<<"creaseAngle="<<creaseAngle<<std::endl; 
    7676 
    77     osgText::BevelProfile profile; 
     77    osgText::Bevel profile; 
    7878    float ratio = 0.5; 
    7979    while(arguments.read("--rounded",ratio)) { profile.roundedBevel(ratio); } 
     
    170170    osg::ref_ptr<osgText::Style> style = new osgText::Style; 
    171171 
    172     float thickness = 0.0f; 
     172    float thickness = 0.1f; 
    173173    while(arguments.read("--thickness",thickness)) {} 
    174174    style->setThicknessRatio(thickness); 
     175 
     176    // set up any bevel if required 
     177    float r; 
     178    osg::ref_ptr<osgText::Bevel> bevel; 
     179    while(arguments.read("--rounded",r)) { bevel = new osgText::Bevel; bevel->roundedBevel2(r); } 
     180    while(arguments.read("--rounded")) { bevel = new osgText::Bevel; bevel->roundedBevel2(0.25); } 
     181    while(arguments.read("--flat",r)) { bevel = new osgText::Bevel; bevel->flatBevel(r); } 
     182    while(arguments.read("--flat")) { bevel = new osgText::Bevel; bevel->flatBevel(0.25); } 
     183    while(arguments.read("--bevel-thickness",r)) { if (bevel.valid()) bevel->setBevelThickness(r); } 
     184 
     185    style->setBevel(bevel); 
    175186 
    176187    osgText::TextNode* text = new osgText::TextNode; 
     
    181192    text->update(); 
    182193 
     194    viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); 
     195    viewer.addEventHandler(new osgViewer::StatsHandler); 
    183196    viewer.setSceneData(text); 
    184197 
  • OpenSceneGraph/trunk/include/osgText/Text3D

    r11732 r11735  
    1717 
    1818#include <osgText/TextBase> 
    19 #include <osgText/Font3D> 
    20  
     19#include <osgText/Font> 
    2120 
    2221namespace osgText { 
     
    7675    /** Set the Font to use to render the text. 
    7776      * setFont(0) sets the use of the default font.*/ 
    78     inline void setFont(Font3D* font=0) { setFont(osg::ref_ptr<Font3D>(font)); }; 
    79  
    80     /** Set the Font to use to render the text.*/ 
    81     void setFont(osg::ref_ptr<Font3D> font); 
    82  
     77    void setFont(Font* font); 
    8378 
    8479    /** Set the font, loaded from the specified front file, to use to render the text, 
     
    8883 
    8984    /** Get the font. Return 0 if default is being used.*/ 
    90     const Font3D* getFont() const { return _font.get(); } 
     85    const Font* getFont() const { return _font.get(); } 
    9186 
    9287 
     
    157152    TextRenderInfo _textRenderInfo; 
    158153 
    159     osg::ref_ptr<Font3D> _font; 
     154    osg::ref_ptr<Font> _font; 
    160155 
    161156    float _characterDepth; 
  • OpenSceneGraph/trunk/src/osgPlugins/freetype/FreeTypeFont.cpp

    r11732 r11735  
    3636        _maxX(-FLT_MAX), 
    3737        _minX(FLT_MAX), 
    38         _minY(FLT_MAX) 
     38        _minY(FLT_MAX), 
     39        _coord_scale(1.0/64.0) 
    3940    { 
    4041    } 
     
    5657    } 
    5758 
    58     void addVertex(const osg::Vec3& pos) 
    59     { 
     59    void addVertex(osg::Vec3 pos) 
     60    { 
     61        _previous = pos; 
     62 
     63        pos *= _coord_scale; 
     64 
    6065        if (!_verts->empty() && _verts->back()==pos) 
    6166        { 
     
    8590    void conicTo(const osg::Vec2& control, const osg::Vec2& pos) 
    8691    { 
    87         osg::Vec3 p0 = _verts->back(); 
     92        osg::Vec3 p0 = _previous; 
    8893        osg::Vec3 p1 = osg::Vec3(control.x(),control.y(),0); 
    8994        osg::Vec3 p2 = osg::Vec3(pos.x(),pos.y(),0); 
     
    104109    void cubicTo(const osg::Vec2& control1, const osg::Vec2& control2, const osg::Vec2& pos) 
    105110    { 
    106         osg::Vec3 p0 = _verts->back(); 
     111        osg::Vec3 p0 = _previous; 
    107112        osg::Vec3 p1 = osg::Vec3(control1.x(),control1.y(),0); 
    108113        osg::Vec3 p2 = osg::Vec3(control2.x(),control2.y(),0); 
     
    137142    osg::ref_ptr<osg::Vec3Array>    _verts; 
    138143    osg::ref_ptr<osg::Geometry>     _geometry; 
     144    osg::Vec3                       _previous; 
    139145    int                             _idx; 
    140146    int                             _numSteps; 
     
    143149    double                          _minX; 
    144150    double                          _minY; 
     151    double                          _coord_scale; 
     152 
    145153}; 
    146154 
    147155 
    148 #define FT_NUM(x) (x/64.0) 
    149156int moveTo( const FT_Vector* to, void* user ) 
    150157{ 
    151158    Char3DInfo* char3d = (Char3DInfo*)user; 
    152     char3d->moveTo( osg::Vec2(FT_NUM(to->x),FT_NUM(to->y)) ); 
     159    char3d->moveTo( osg::Vec2(to->x,to->y) ); 
    153160    return 0; 
    154161} 
     
    156163{ 
    157164    Char3DInfo* char3d = (Char3DInfo*)user; 
    158     char3d->lineTo( osg::Vec2(FT_NUM(to->x),FT_NUM(to->y)) ); 
     165    char3d->lineTo( osg::Vec2(to->x,to->y) ); 
    159166    return 0; 
    160167} 
     
    162169{ 
    163170    Char3DInfo* char3d = (Char3DInfo*)user; 
    164     char3d->conicTo( osg::Vec2(FT_NUM(control->x),FT_NUM(control->y)), osg::Vec2(FT_NUM(to->x),FT_NUM(to->y)) ); 
     171    char3d->conicTo( osg::Vec2(control->x,control->y), osg::Vec2(to->x,to->y) ); 
    165172    return 0; 
    166173} 
     
    169176    Char3DInfo* char3d = (Char3DInfo*)user; 
    170177    char3d->cubicTo( 
    171         osg::Vec2(FT_NUM(control1->x),FT_NUM(control1->y)), 
    172         osg::Vec2(FT_NUM(control2->x),FT_NUM(control2->y)), 
    173         osg::Vec2(FT_NUM(to->x),FT_NUM(to->y)) ); 
     178        osg::Vec2(control1->x,control1->y), 
     179        osg::Vec2(control2->x,control2->y), 
     180        osg::Vec2(to->x,to->y) ); 
    174181    return 0; 
    175182} 
    176 #undef FT_NUM 
    177183 
    178184} 
     
    184190    _face(face), 
    185191    _flags(flags), 
    186     _scale(1.0f) 
     192    _scale(1.0f), 
     193    _freetype_scale(1.0f) 
    187194{ 
    188195    init(); 
     
    195202    _face(face), 
    196203    _flags(flags), 
    197     _scale(1.0f) 
     204    _scale(1.0f), 
     205    _freetype_scale(1.0f) 
    198206{ 
    199207    init(); 
     
    280288        // double width = (xmax - xmin)/64.0; 
    281289 
    282         _scale = 1.0/height; 
     290#if 1 
     291        _freetype_scale = 1.0f/height; 
     292        _scale = 1.0f; 
     293#else 
     294        _freetype_scale = 1.0f; 
     295        _scale = 1.0f/height; 
     296#endif 
    283297    } 
    284298} 
     
    408422 
    409423 
    410     FT_Glyph_Metrics* metrics = &(glyphslot->metrics); 
    411  
    412     glyph->setHorizontalBearing(osg::Vec2((float)metrics->horiBearingX/64.0f,(float)(metrics->horiBearingY-metrics->height)/64.0f)); // bottom left. 
    413     glyph->setHorizontalAdvance((float)metrics->horiAdvance/64.0f); 
    414     glyph->setVerticalBearing(osg::Vec2((float)metrics->vertBearingX/64.0f,(float)(metrics->vertBearingY-metrics->height)/64.0f)); // top middle. 
    415     glyph->setVerticalAdvance((float)metrics->vertAdvance/64.0f); 
     424    FT_Glyph_Metrics* metrics = &(_face->glyph->metrics); 
     425 
     426    float coord_scale = _freetype_scale/64.0f; 
     427 
     428    glyph->setHorizontalBearing(osg::Vec2((float)metrics->horiBearingX * coord_scale,(float)(metrics->horiBearingY-metrics->height) * coord_scale)); // bottom left. 
     429    glyph->setHorizontalAdvance((float)metrics->horiAdvance * coord_scale); 
     430    glyph->setVerticalBearing(osg::Vec2((float)metrics->vertBearingX * coord_scale,(float)(metrics->vertBearingY-metrics->height) * coord_scale)); // top middle. 
     431    glyph->setVerticalAdvance((float)metrics->vertAdvance * coord_scale); 
    416432 
    417433//    cout << "      in getGlyph() implementation="<<this<<"  "<<_filename<<"  facade="<<_facade<<endl; 
     
    452468    } 
    453469 
     470    float coord_scale = _freetype_scale/64.0f; 
     471 
    454472    // ** init FreeType to describe the glyph 
    455473    FreeType::Char3DInfo char3d(_facade->getNumberCurveSamples()); 
     474    char3d._coord_scale = coord_scale; 
    456475 
    457476    FT_Outline outline = _face->glyph->outline; 
     
    597616    FT_Glyph_Metrics* metrics = &(_face->glyph->metrics); 
    598617 
    599     glyph3D->setHorizontalBearing(osg::Vec2((float)metrics->horiBearingX/64.0f,(float)(metrics->horiBearingY-metrics->height)/64.0f)); // bottom left. 
    600     glyph3D->setHorizontalAdvance((float)metrics->horiAdvance/64.0f); 
    601     glyph3D->setVerticalBearing(osg::Vec2((float)metrics->vertBearingX/64.0f,(float)(metrics->vertBearingY-metrics->height)/64.0f)); // top middle. 
    602     glyph3D->setVerticalAdvance((float)metrics->vertAdvance/64.0f); 
    603  
    604     glyph3D->setWidth((float)metrics->width / 64.0f); 
    605     glyph3D->setHeight((float)metrics->height / 64.0f); 
    606  
     618    glyph3D->setHorizontalBearing(osg::Vec2((float)metrics->horiBearingX * coord_scale,(float)(metrics->horiBearingY-metrics->height) * coord_scale)); // bottom left. 
     619    glyph3D->setHorizontalAdvance((float)metrics->horiAdvance * coord_scale); 
     620    glyph3D->setVerticalBearing(osg::Vec2((float)metrics->vertBearingX * coord_scale,(float)(metrics->vertBearingY-metrics->height) * coord_scale)); // top middle. 
     621    glyph3D->setVerticalAdvance((float)metrics->vertAdvance * coord_scale); 
     622 
     623    glyph3D->setWidth((float)metrics->width * coord_scale); 
     624    glyph3D->setHeight((float)metrics->height * coord_scale); 
    607625 
    608626    FT_BBox ftbb; 
     
    614632    long ymax = ft_ceiling( ftbb.yMax ); 
    615633 
    616     osg::BoundingBox bb(xmin / 64.0f, ymin / 64.0f, 0.0f, xmax / 64.0f, ymax / 64.0f, 0.0f); 
     634    osg::BoundingBox bb(xmin * coord_scale, ymin * coord_scale, 0.0f, xmax * coord_scale, ymax * coord_scale, 0.0f); 
    617635 
    618636    glyph3D->setBoundingBox(bb); 
  • OpenSceneGraph/trunk/src/osgPlugins/freetype/FreeTypeFont.h

    r11732 r11735  
    5959    unsigned int            _flags; 
    6060    float                   _scale; 
     61    float                   _freetype_scale; 
    6162}; 
    6263 
  • OpenSceneGraph/trunk/src/osgText/Font.cpp

    r11732 r11735  
    343343Glyph* Font::getGlyph(const FontResolution& fontRes, unsigned int charcode) 
    344344{ 
     345    OSG_NOTICE<<"Font::getGlyph("<<charcode<<")"<<std::endl; 
     346 
    345347    { 
    346348        OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_glyphMapMutex); 
     
    365367Glyph3D* Font::getGlyph3D(unsigned int charcode) 
    366368{ 
     369    OSG_NOTICE<<"Font::getGlyph3D("<<charcode<<")"<<std::endl; 
     370 
    367371    { 
    368372        OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_glyphMapMutex); 
  • OpenSceneGraph/trunk/src/osgText/Text3D.cpp

    r11732 r11735  
    103103} 
    104104 
    105 void Text3D::setFont(osg::ref_ptr<Font3D> font) 
     105void Text3D::setFont(Font* font) 
    106106{ 
    107107    _font = font; 
     
    112112void Text3D::setFont(const std::string & fontfile) 
    113113{ 
    114     setFont(readRefFont3DFile(fontfile)); 
     114    setFont(readRefFontFile(fontfile)); 
    115115} 
    116116 
  • OpenSceneGraph/trunk/src/osgWrappers/serializers/osgText/Text3D.cpp

    r11028 r11735  
    1212{ 
    1313    std::string fontName; is.readWrappedString( fontName ); 
    14     text.setFont( osgText::readFont3DFile(fontName) ); 
     14    text.setFont( osgText::readFontFile(fontName) ); 
    1515    return true; 
    1616}