Hi all,
I would like to show "Japanese Text" on scene graph.
I have tried as following, and English(and Geraman) text was shown but Japanese
text was not shown.
//Vector face
OSG::TextVectorFace *face = OSG::TextVectorFace::create("Arial",
OSG::TextFace::STYLE_PLAIN);
std::locale::global(std::locale("japanese"));
setlocale(LC_ALL, "japanese");
std::vector<std::wstring> lines;
lines.push_back(L"JR West"); // shown
lines.push_back(L"Train simulator!!"); // shown
std::wstring german = L"aaaa\u00fc"; // shown
lines.push_back(german);
//21 94 357E 8B9E B5FE E4BAAC 4EAC 京
//37 52 4554 9373 C5D4 E983BD 90FD 都
//std::wstring buf = L"\u4EAC\u90FD";
std::wstring japanese = L"aaa\u4EAC"; // shown only aaa
lines.push_back(japanese);
TextLayoutParam layoutParam;
TextLayoutResult layoutResult;
face->layout(lines, layoutParam, layoutResult);
OSG::Real32 scale = 4.f;
OSG::Real32 depth = 0.f;
OSG::UInt32 level = 2;
OSG::Real32 creaseAngle = OSG::Pi / 4.f;
OSG::NodePtr txtnode = face->makeNode(layoutResult, scale, depth, level,
creaseAngle);
How to show japanese text on scene graph?
Thank you.
Kazuhiko Kido <[email protected]>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users