From aa3634979a6fa8c36fad232d5ff588386499638a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 7 Dec 2012 10:19:05 +0000 Subject: [PATCH] From Stephan Huber, attached is a fix for the bug of present3D not loading fonts across http. I pass SlideShowConstructor's options-object to readFontFile when constructing any text-objects so freetype can pick up the font-data from the curl-plugin. It works fine now on my end. --- src/osgPresentation/SlideShowConstructor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osgPresentation/SlideShowConstructor.cpp b/src/osgPresentation/SlideShowConstructor.cpp index ab4f0da6c..380f885c1 100644 --- a/src/osgPresentation/SlideShowConstructor.cpp +++ b/src/osgPresentation/SlideShowConstructor.cpp @@ -472,7 +472,7 @@ void SlideShowConstructor::addLayer(bool inheritPreviousLayers, bool defineAsBas osg::Vec3 localPosition = computePositionInModelCoords(_titlePositionData); osgText::Text* text = new osgText::Text; - text->setFont(_titleFontData.font); + text->setFont(osgText::readFontFile(_titleFontData.font, _options)); text->setColor(_titleFontData.color); text->setCharacterSize(_titleFontData.characterSize*_slideHeight); text->setFontResolution(110,120); @@ -691,7 +691,7 @@ void SlideShowConstructor::addBullet(const std::string& bullet, PositionData& po osg::Vec3 localPosition = computePositionInModelCoords(positionData); - text->setFont(fontData.font); + text->setFont(osgText::readFontFile(fontData.font, _options)); text->setColor(fontData.color); text->setCharacterSize(fontData.characterSize*_slideHeight); text->setCharacterSizeMode(fontData.characterSizeMode); @@ -739,7 +739,7 @@ void SlideShowConstructor::addParagraph(const std::string& paragraph, PositionDa osgText::Text* text = new osgText::Text; - text->setFont(fontData.font); + text->setFont(osgText::readFontFile(fontData.font, _options)); text->setColor(fontData.color); text->setCharacterSize(fontData.characterSize*_slideHeight); text->setCharacterSizeMode(fontData.characterSizeMode);