Re: [osg-users] utf-8?

2007-11-23 Thread Jean-Sébastien Guay

>> 2. Could it be that you have several copies around and your program is
>> loading the one which hasn't got those characters?
>
> I have only one Arial file.

Are you sure your program is not picking up the arial.ttf that's in  
OpenSceneGraph-Data/fonts? If you have OSG_FILE_PATH set, then it  
could be loading up that one, and it's only 42.5k so I'd guess it  
doesn't contain the characters you want.

Setting OSG_NOTIFY_LEVEL=DEBUG will tell you which arial.ttf it is loading.

J-S
-- 
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Johan Johnsson
Tnxc alot the problem was solved using second parameters in:
text1->setText(test, osgText::String::ENCODING_UTF8);

with -> osgText::String::ENCODING_UTF8 = worked
without = not worked.

On Fri, 23 Nov 2007 13:35:20 +0100, Thibault Genessay <[EMAIL PROTECTED]>  
wrote:

> You might try to have a look at the Character Set setting of your
> project (under Configuration Properties / General). If your previous
> project file was using the Unicode character set, while your new one
> the multi-byte character set, you might have a difference. I've never
> had a rea in-depth understanding of this setting, but I kinda suppose
> it must be set to unicode for unicode-aware apps.
>
> You should also try the different combinations of the second parameter
> to osgText::Text::setText() and the actual encoding of the file on the
> disk. In my case, I've let this parameter to its default value and
> also saved the file using the default encoding (unicode codepage 1200
> which I suspect is UCS-2 with a microsoft-specific codepage).
>
> If you did not read it yet, I really recommend the page
> http://www.joelonsoftware.com/articles/Unicode.html. I have read it
> about 10 times and now I'm beginning to understand how this unicode
> thing works :) It might help you pinpoint the exact source of your
> problem.
>
> Good luck
>
> Thibault
>
> On Nov 23, 2007 1:18 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> I think the problem is in visual studio to be honest, i know i can save
>> the cpp as encoded types maybe i save it to wrong unicode type?
>>
>>
>> On Fri, 23 Nov 2007 12:54:41 +0100, Alberto Luaces <[EMAIL PROTECTED]>  
>> wrote:
>>
>> > El Friday 23 November 2007 12:29:06 Johan Johnsson escribió:
>> >> > 1. What is the size in bytes of the arial.ttf file you are
>> >> > using?
>> >>
>> >> 359 kb
>> >
>> > Then I think you are using the correct one, that is included with the
>> > Windows
>> > installation. Would it help to set the OSGNOTIFYLEVEL environment
>> > variable to
>> > DEBUG and inspect the output of the program?
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> >  
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>
>> --
>> Mr. Johan Johnsson
>> AutoSim AS, Strandveien 106, 9006 Tromsø
>> Visit us at http://www.autosim.no
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Thibault Genessay
You might try to have a look at the Character Set setting of your
project (under Configuration Properties / General). If your previous
project file was using the Unicode character set, while your new one
the multi-byte character set, you might have a difference. I've never
had a rea in-depth understanding of this setting, but I kinda suppose
it must be set to unicode for unicode-aware apps.

You should also try the different combinations of the second parameter
to osgText::Text::setText() and the actual encoding of the file on the
disk. In my case, I've let this parameter to its default value and
also saved the file using the default encoding (unicode codepage 1200
which I suspect is UCS-2 with a microsoft-specific codepage).

If you did not read it yet, I really recommend the page
http://www.joelonsoftware.com/articles/Unicode.html. I have read it
about 10 times and now I'm beginning to understand how this unicode
thing works :) It might help you pinpoint the exact source of your
problem.

Good luck

Thibault

On Nov 23, 2007 1:18 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> I think the problem is in visual studio to be honest, i know i can save
> the cpp as encoded types maybe i save it to wrong unicode type?
>
>
> On Fri, 23 Nov 2007 12:54:41 +0100, Alberto Luaces <[EMAIL PROTECTED]> wrote:
>
> > El Friday 23 November 2007 12:29:06 Johan Johnsson escribió:
> >> > 1. What is the size in bytes of the arial.ttf file you are
> >> > using?
> >>
> >> 359 kb
> >
> > Then I think you are using the correct one, that is included with the
> > Windows
> > installation. Would it help to set the OSGNOTIFYLEVEL environment
> > variable to
> > DEBUG and inspect the output of the program?
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> Mr. Johan Johnsson
> AutoSim AS, Strandveien 106, 9006 Tromsø
> Visit us at http://www.autosim.no
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Johan Johnsson
I think the problem is in visual studio to be honest, i know i can save  
the cpp as encoded types maybe i save it to wrong unicode type?


On Fri, 23 Nov 2007 12:54:41 +0100, Alberto Luaces <[EMAIL PROTECTED]> wrote:

> El Friday 23 November 2007 12:29:06 Johan Johnsson escribió:
>> > 1. What is the size in bytes of the arial.ttf file you are
>> > using?
>>
>> 359 kb
>
> Then I think you are using the correct one, that is included with the  
> Windows
> installation. Would it help to set the OSGNOTIFYLEVEL environment  
> variable to
> DEBUG and inspect the output of the program?
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Alberto Luaces
El Friday 23 November 2007 12:29:06 Johan Johnsson escribió:
> > 1. What is the size in bytes of the arial.ttf file you are
> > using?
>
> 359 kb

Then I think you are using the correct one, that is included with the Windows 
installation. Would it help to set the OSGNOTIFYLEVEL environment variable to 
DEBUG and inspect the output of the program?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Johan Johnsson
On Fri, 23 Nov 2007 11:59:44 +0100, Alberto Luaces <[EMAIL PROTECTED]> wrote:

> El Friday 23 November 2007 11:20:31 Johan Johnsson escribió:
>> yes i have copied them from the characther map in arial
>
> Out of curiosity:
>
> 1. What is the size in bytes of the arial.ttf file you are
> using?

359 kb

> 2. Could it be that you have several copies around and your program is
> loading the one which hasn't got those characters?

I have only one Arial file.
___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Alberto Luaces
El Friday 23 November 2007 11:20:31 Johan Johnsson escribió:
> yes i have copied them from the characther map in arial

Out of curiosity:

1. What is the size in bytes of the arial.ttf file you are 
using?
2. Could it be that you have several copies around and your program is 
loading the one which hasn't got those characters?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Johan Johnsson
Yes they do and it is the same characters i represented on the display  
before i deleted the project.

On Fri, 23 Nov 2007 11:09:52 +0100, Robert Osfield  
<[EMAIL PROTECTED]> wrote:

> Does the font handle the characters you are interested in?
>
> On Nov 23, 2007 10:00 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>>
>> damnit it worked , but then i incidentaly removed the project, now i  
>> cant
>> get it to work:
>>
>> osgText::Text* text1 = new osgText::Text;
>>  osgText::String* string = new osgText::String("لْعَرَبيّة",
>> osgText::String::ENCODING_UTF8);
>>  std::string test = string->createUTF8EncodedString();
>>
>>  text1->setFont("fonts/arial.ttf");
>>  text1->setCharacterSize(characterSize);
>>  text1->setPosition(pos);
>>  text1->setAxisAlignment(osgText::Text::XY_PLANE);
>>  text1->setText(test);
>>  geode->addDrawable(text1);
>>
>>
>> just wierd letters, (i use visual studio 2003 if that is to any help, i
>> know i can save the code files in different encoding methods, atm i save
>> them as Unicode(big-endian).
>>
>>
>> On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson <[EMAIL PROTECTED]>
>>
>> wrote:
>>
>> > tnx very much -the problem was the font.
>> >
>> > On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay
>> > <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >> Hi Johan,
>> >>
>> >> Did you check that the font file itself does include the glyphs that
>> >> you try to display ?
>> >> Also, try to pass your input data as a wide character string, i.e.
>> >> L"لْعَرَبيّة"
>> >>
>> >> I have a similar problem in the past and solved it using wchar_t
>> >> strings in my source files, and using a different font that actually
>> >> had the glyphs.
>> >>
>> >> Hope this helps
>> >>
>> >> Thibault
>> >>
>> >>
>> >> On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> >>> I may be doing this wrong, because its just showing some wierd  
>> letters:
>> >>>
>> >>>  osgText::Text* text1 = new osgText::Text;
>> >>>  osgText::String* string = new osgText::String("لْعَرَبيّة",
>> >>> osgText::String::ENCODING_UTF8);
>> >>>  std::string test = string->createUTF8EncodedString();
>> >>>
>> >>>
>> >>>
>> >>> On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
>> >>> <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>> > On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> >>> >> Can the scenegraph represent utf-8 on the screen?
>> >>> >
>> >>> > You mean does osgText support UTF-8 encoding of strings?  The  
>> answer
>> >>> > is yes, have a look at osgText::String for details.
>> >>> >
>> >>> > Robert.
>> >>> > ___
>> >>> > osg-users mailing list
>> >>> > osg-users@lists.openscenegraph.org
>> >>> >
>> >>>  
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Mr. Johan Johnsson
>> >>> AutoSim AS, Strandveien 106, 9006 Tromsø
>> >>> Visit us at http://www.autosim.no
>> >>> ___
>> >>> osg-users mailing list
>> >>> osg-users@lists.openscenegraph.org
>> >>>  
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >>>
>> >> ___
>> >> osg-users mailing list
>> >> osg-users@lists.openscenegraph.org
>> >>  
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >
>> >
>> >
>>
>>
>>
>> --
>> Mr. Johan Johnsson
>> AutoSim AS, Strandveien 106, 9006 Tromsø
>> Visit us at http://www.autosim.no
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Johan Johnsson
yes i have copied them from the characther map in arial


On Fri, 23 Nov 2007 11:10:28 +0100, Mario Valle <[EMAIL PROTECTED]> wrote:

> Does Arial.ttf have those arabic characters?
> Try change font file.
> Ciao!
>   mario
>
>
> Johan Johnsson wrote:
>> damnit it worked , but then i incidentaly removed the project, now i  
>> cant
>> get it to work:
>>
>> osgText::Text* text1 = new osgText::Text;
>>  osgText::String* string = new osgText::String("لْعَرَبيّة",
>> osgText::String::ENCODING_UTF8);
>>  std::string test = string->createUTF8EncodedString();
>>
>>  text1->setFont("fonts/arial.ttf");
>>  text1->setCharacterSize(characterSize);
>>  text1->setPosition(pos);
>>  text1->setAxisAlignment(osgText::Text::XY_PLANE);
>>  text1->setText(test);
>>  geode->addDrawable(text1);
>>
>>
>> just wierd letters, (i use visual studio 2003 if that is to any help, i
>> know i can save the code files in different encoding methods, atm i save
>> them as Unicode(big-endian).
>>
>>
>> On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson <[EMAIL PROTECTED]>
>> wrote:
>>
>>> tnx very much -the problem was the font.
>>>
>>> On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay
>>> <[EMAIL PROTECTED]>
>>> wrote:
>>>
 Hi Johan,

 Did you check that the font file itself does include the glyphs that
 you try to display ?
 Also, try to pass your input data as a wide character string, i.e.
 L"لْعَرَبيّة"

 I have a similar problem in the past and solved it using wchar_t
 strings in my source files, and using a different font that actually
 had the glyphs.

 Hope this helps

 Thibault


 On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> I may be doing this wrong, because its just showing some wierd  
> letters:
>
>  osgText::Text* text1 = new osgText::Text;
>  osgText::String* string = new osgText::String("لْعَرَبيّة",
> osgText::String::ENCODING_UTF8);
>  std::string test = string->createUTF8EncodedString();
>
>
>
> On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
> <[EMAIL PROTECTED]> wrote:
>
>> On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>>> Can the scenegraph represent utf-8 on the screen?
>> You mean does osgText support UTF-8 encoding of strings?  The answer
>> is yes, have a look at osgText::String for details.
>>
>> Robert.
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> Mr. Johan Johnsson
> AutoSim AS, Strandveien 106, 9006 Tromsø
> Visit us at http://www.autosim.no
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>>
>



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Mario Valle
Does Arial.ttf have those arabic characters?
Try change font file.
Ciao!
mario


Johan Johnsson wrote:
> damnit it worked , but then i incidentaly removed the project, now i cant  
> get it to work:
> 
> osgText::Text* text1 = new osgText::Text;
>  osgText::String* string = new osgText::String("لْعَرَبيّة",  
> osgText::String::ENCODING_UTF8);
>  std::string test = string->createUTF8EncodedString();
> 
>  text1->setFont("fonts/arial.ttf");
>  text1->setCharacterSize(characterSize);
>  text1->setPosition(pos);
>  text1->setAxisAlignment(osgText::Text::XY_PLANE);
>  text1->setText(test);
>  geode->addDrawable(text1);
> 
> 
> just wierd letters, (i use visual studio 2003 if that is to any help, i  
> know i can save the code files in different encoding methods, atm i save  
> them as Unicode(big-endian).
> 
> 
> On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson <[EMAIL PROTECTED]>  
> wrote:
> 
>> tnx very much -the problem was the font.
>>
>> On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay  
>> <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Hi Johan,
>>>
>>> Did you check that the font file itself does include the glyphs that
>>> you try to display ?
>>> Also, try to pass your input data as a wide character string, i.e.
>>> L"لْعَرَبيّة"
>>>
>>> I have a similar problem in the past and solved it using wchar_t
>>> strings in my source files, and using a different font that actually
>>> had the glyphs.
>>>
>>> Hope this helps
>>>
>>> Thibault
>>>
>>>
>>> On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
 I may be doing this wrong, because its just showing some wierd letters:

  osgText::Text* text1 = new osgText::Text;
  osgText::String* string = new osgText::String("لْعَرَبيّة",
 osgText::String::ENCODING_UTF8);
  std::string test = string->createUTF8EncodedString();



 On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
 <[EMAIL PROTECTED]> wrote:

> On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> Can the scenegraph represent utf-8 on the screen?
> You mean does osgText support UTF-8 encoding of strings?  The answer
> is yes, have a look at osgText::String for details.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
>
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



 --
 Mr. Johan Johnsson
 AutoSim AS, Strandveien 106, 9006 Tromsø
 Visit us at http://www.autosim.no
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
> 
> 
> 

-- 
Ing. Mario Valle
Visualization Group  | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)  | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Robert Osfield
Does the font handle the characters you are interested in?

On Nov 23, 2007 10:00 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>
> damnit it worked , but then i incidentaly removed the project, now i cant
> get it to work:
>
> osgText::Text* text1 = new osgText::Text;
>  osgText::String* string = new osgText::String("لْعَرَبيّة",
> osgText::String::ENCODING_UTF8);
>  std::string test = string->createUTF8EncodedString();
>
>  text1->setFont("fonts/arial.ttf");
>  text1->setCharacterSize(characterSize);
>  text1->setPosition(pos);
>  text1->setAxisAlignment(osgText::Text::XY_PLANE);
>  text1->setText(test);
>  geode->addDrawable(text1);
>
>
> just wierd letters, (i use visual studio 2003 if that is to any help, i
> know i can save the code files in different encoding methods, atm i save
> them as Unicode(big-endian).
>
>
> On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson <[EMAIL PROTECTED]>
>
> wrote:
>
> > tnx very much -the problem was the font.
> >
> > On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay
> > <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Hi Johan,
> >>
> >> Did you check that the font file itself does include the glyphs that
> >> you try to display ?
> >> Also, try to pass your input data as a wide character string, i.e.
> >> L"لْعَرَبيّة"
> >>
> >> I have a similar problem in the past and solved it using wchar_t
> >> strings in my source files, and using a different font that actually
> >> had the glyphs.
> >>
> >> Hope this helps
> >>
> >> Thibault
> >>
> >>
> >> On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> >>> I may be doing this wrong, because its just showing some wierd letters:
> >>>
> >>>  osgText::Text* text1 = new osgText::Text;
> >>>  osgText::String* string = new osgText::String("لْعَرَبيّة",
> >>> osgText::String::ENCODING_UTF8);
> >>>  std::string test = string->createUTF8EncodedString();
> >>>
> >>>
> >>>
> >>> On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
> >>> <[EMAIL PROTECTED]> wrote:
> >>>
> >>> > On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> >>> >> Can the scenegraph represent utf-8 on the screen?
> >>> >
> >>> > You mean does osgText support UTF-8 encoding of strings?  The answer
> >>> > is yes, have a look at osgText::String for details.
> >>> >
> >>> > Robert.
> >>> > ___
> >>> > osg-users mailing list
> >>> > osg-users@lists.openscenegraph.org
> >>> >
> >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >>>
> >>>
> >>>
> >>> --
> >>> Mr. Johan Johnsson
> >>> AutoSim AS, Strandveien 106, 9006 Tromsø
> >>> Visit us at http://www.autosim.no
> >>> ___
> >>> osg-users mailing list
> >>> osg-users@lists.openscenegraph.org
> >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >>>
> >> ___
> >> osg-users mailing list
> >> osg-users@lists.openscenegraph.org
> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> >
>
>
>
> --
> Mr. Johan Johnsson
> AutoSim AS, Strandveien 106, 9006 Tromsø
> Visit us at http://www.autosim.no
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-23 Thread Johan Johnsson

damnit it worked , but then i incidentaly removed the project, now i cant  
get it to work:

osgText::Text* text1 = new osgText::Text;
 osgText::String* string = new osgText::String("لْعَرَبيّة",  
osgText::String::ENCODING_UTF8);
 std::string test = string->createUTF8EncodedString();

 text1->setFont("fonts/arial.ttf");
 text1->setCharacterSize(characterSize);
 text1->setPosition(pos);
 text1->setAxisAlignment(osgText::Text::XY_PLANE);
 text1->setText(test);
 geode->addDrawable(text1);


just wierd letters, (i use visual studio 2003 if that is to any help, i  
know i can save the code files in different encoding methods, atm i save  
them as Unicode(big-endian).


On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson <[EMAIL PROTECTED]>  
wrote:

> tnx very much -the problem was the font.
>
> On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay  
> <[EMAIL PROTECTED]>
> wrote:
>
>> Hi Johan,
>>
>> Did you check that the font file itself does include the glyphs that
>> you try to display ?
>> Also, try to pass your input data as a wide character string, i.e.
>> L"لْعَرَبيّة"
>>
>> I have a similar problem in the past and solved it using wchar_t
>> strings in my source files, and using a different font that actually
>> had the glyphs.
>>
>> Hope this helps
>>
>> Thibault
>>
>>
>> On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>>> I may be doing this wrong, because its just showing some wierd letters:
>>>
>>>  osgText::Text* text1 = new osgText::Text;
>>>  osgText::String* string = new osgText::String("لْعَرَبيّة",
>>> osgText::String::ENCODING_UTF8);
>>>  std::string test = string->createUTF8EncodedString();
>>>
>>>
>>>
>>> On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
>>> <[EMAIL PROTECTED]> wrote:
>>>
>>> > On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>>> >> Can the scenegraph represent utf-8 on the screen?
>>> >
>>> > You mean does osgText support UTF-8 encoding of strings?  The answer
>>> > is yes, have a look at osgText::String for details.
>>> >
>>> > Robert.
>>> > ___
>>> > osg-users mailing list
>>> > osg-users@lists.openscenegraph.org
>>> >
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>>
>>> --
>>> Mr. Johan Johnsson
>>> AutoSim AS, Strandveien 106, 9006 Tromsø
>>> Visit us at http://www.autosim.no
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-21 Thread Johan Johnsson
tnx very much -the problem was the font.

On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay <[EMAIL PROTECTED]>  
wrote:

> Hi Johan,
>
> Did you check that the font file itself does include the glyphs that
> you try to display ?
> Also, try to pass your input data as a wide character string, i.e.  
> L"لْعَرَبيّة"
>
> I have a similar problem in the past and solved it using wchar_t
> strings in my source files, and using a different font that actually
> had the glyphs.
>
> Hope this helps
>
> Thibault
>
>
> On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> I may be doing this wrong, because its just showing some wierd letters:
>>
>>  osgText::Text* text1 = new osgText::Text;
>>  osgText::String* string = new osgText::String("لْعَرَبيّة",
>> osgText::String::ENCODING_UTF8);
>>  std::string test = string->createUTF8EncodedString();
>>
>>
>>
>> On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
>> <[EMAIL PROTECTED]> wrote:
>>
>> > On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> >> Can the scenegraph represent utf-8 on the screen?
>> >
>> > You mean does osgText support UTF-8 encoding of strings?  The answer
>> > is yes, have a look at osgText::String for details.
>> >
>> > Robert.
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> >  
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>
>> --
>> Mr. Johan Johnsson
>> AutoSim AS, Strandveien 106, 9006 Tromsø
>> Visit us at http://www.autosim.no
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-21 Thread Thibault Genessay
Hi Johan,

Did you check that the font file itself does include the glyphs that
you try to display ?
Also, try to pass your input data as a wide character string, i.e. L"لْعَرَبيّة"

I have a similar problem in the past and solved it using wchar_t
strings in my source files, and using a different font that actually
had the glyphs.

Hope this helps

Thibault


On Nov 21, 2007 1:15 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> I may be doing this wrong, because its just showing some wierd letters:
>
>  osgText::Text* text1 = new osgText::Text;
>  osgText::String* string = new osgText::String("لْعَرَبيّة",
> osgText::String::ENCODING_UTF8);
>  std::string test = string->createUTF8EncodedString();
>
>
>
> On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield
> <[EMAIL PROTECTED]> wrote:
>
> > On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> >> Can the scenegraph represent utf-8 on the screen?
> >
> > You mean does osgText support UTF-8 encoding of strings?  The answer
> > is yes, have a look at osgText::String for details.
> >
> > Robert.
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> Mr. Johan Johnsson
> AutoSim AS, Strandveien 106, 9006 Tromsø
> Visit us at http://www.autosim.no
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-21 Thread Johan Johnsson
I may be doing this wrong, because its just showing some wierd letters:

 osgText::Text* text1 = new osgText::Text;
 osgText::String* string = new osgText::String("لْعَرَبيّة",  
osgText::String::ENCODING_UTF8);
 std::string test = string->createUTF8EncodedString();



On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield  
<[EMAIL PROTECTED]> wrote:

> On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
>> Can the scenegraph represent utf-8 on the screen?
>
> You mean does osgText support UTF-8 encoding of strings?  The answer
> is yes, have a look at osgText::String for details.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] utf-8?

2007-11-21 Thread Robert Osfield
On Nov 21, 2007 9:04 AM, Johan Johnsson <[EMAIL PROTECTED]> wrote:
> Can the scenegraph represent utf-8 on the screen?

You mean does osgText support UTF-8 encoding of strings?  The answer
is yes, have a look at osgText::String for details.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] utf-8?

2007-11-21 Thread Johan Johnsson
Can the scenegraph represent utf-8 on the screen?

-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org