nanogui: Problem with Unicode strings in nano-x/nxlib/FLTK


Previous by date: 21 Mar 2006 12:08:57 +0000 How to implement WS_EX_TRANSPARENT, Uwe Klatt
Next by date: 21 Mar 2006 12:08:57 +0000 Re: FreeType2 with Portrait Mode, Uwe Klatt
Previous in thread:
Next in thread: 21 Mar 2006 12:08:57 +0000 Re: Problem with Unicode strings in nano-x/nxlib/FLTK, Greg Haerr

Subject: Problem with Unicode strings in nano-x/nxlib/FLTK
From: "Ivan Tarapov" ####@####.####
Date: 21 Mar 2006 12:08:57 +0000
Message-Id: <20060321120849.8A5A0CACE4@mail.telcos.net.ua>

Hello. 

 

A little while ago, I've had a problem with drawing Unicode strings with pcf
fonts.

 

Since then I have been struggling to solve this problem. I have found the
reason of pcf fonts not being recognized by the system, installed the patch
to fix it, found the way to plug the font and now I'm having another
problem. 

 

I have an application that is comprised of FLTK communicating through nxlib
with nano-x. It runs on a board with ARM processor. 

 

The problem is on the stage of drawing. FLTK converts the string (correctly
- I've checked that) into UTF-16 and then it is passed to nxlib's
XDrawString16 function. From what I can see in the code, this string is
passed to GrText with GR_TFXCHAR2B|GR_TFBASELINE format modifiers, which
seem perfectly appropriate in this case. The byte sequence passed is correct
UTF-16 string. However on the screen, each drawn symbol is followed by a
square symbol (which, I suppose is the way of system drawing symbols, for
which it couldn't find appropriate glyphs). I.e., instead of a string "03:43
am" a string like "0│3│:│4│3│ │a│m│" is displayed. If I try to output
Russian symbols (my ultimate goal), a question mark is drawn instead of the
symbol. It seems to me that somewhere the supplied bytes array is still
interpreted as single-byte string, despite the flags passed to GrText (I
used GR_TFUC16 and GR_TFUTF8 to no avail). Could anyone suggest any solution
to this problem? 

 

Thanks

 

 

 


Previous by date: 21 Mar 2006 12:08:57 +0000 How to implement WS_EX_TRANSPARENT, Uwe Klatt
Next by date: 21 Mar 2006 12:08:57 +0000 Re: FreeType2 with Portrait Mode, Uwe Klatt
Previous in thread:
Next in thread: 21 Mar 2006 12:08:57 +0000 Re: Problem with Unicode strings in nano-x/nxlib/FLTK, Greg Haerr


Powered by ezmlm-browse 0.20.