[EMAIL PROTECTED] wrote:
Hi,
Am Working on porting OpenOffice onto DirectFB.Have completed the
implementation of most of the major functionality.
But facing some issues relating document font rendering.
Am getting the warning Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() for
a regular document text

Have used pango to render the font and implemented a PangoFontLayout class
deriving from SalLayout in unx under vcl.
Following is the code to implement the UTF-16 to UTF-8 conversion where i
have found out the problem is arising.
  m_pLayoutText = new ByteString( rArgs.mpStr, rArgs.mnLength);
  m_pLayoutText->Convert( RTL_TEXTENCODING_UNICODE, RTL_TEXTENCODING_UTF8 );
  pango_layout_set_text( m_pPangoLayout, m_pLayoutText->GetBuffer(),
rArgs.mnLength );

What is rArgs in your code snippet? A (class instance wrapping a) char[] that contains UTF-16 (-LE or -BE?) data? What strikes me as odd is that you use rArgs.mnLength in the final call, instead of m_pLayoutText->GetLength().

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to