Hi,
I tried to use the TextFace classes, which work well for normal text. But if there are special character in the text it will not correctly displayed.
GeometryPtr geoText;
TextTXFFace *face = TextTXFFace::create( "SANS" );
//TextVectorFace *face = osg::TextVectorFace::create( "SANS" );
std::vector<std::string> lines;
lines.push_back(_text);
lines.push_back("Taste drücken");
if (face != 0)
{
addRefP(face);
TextLayoutParam layoutParam;
TextLayoutResult layoutResult;
face->layout(lines, layoutParam, layoutResult);
Real32 scale = 0.2f;
Real32 depth = 0.0f;
geoText = face->makeGeo(layoutResult, scale);//, depth);
ImagePtr img = face->getTexture();
SimpleTexturedMaterialPtr m = SimpleTexturedMaterial::create();
beginEditCP(m);
m->setImage(img);
endEditCP(m);
beginEditCP(geoText);
geoText->setMaterial(m);
endEditCP(geoText);
subRefP(face);
}
Bye
Mathias
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
