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 ); For a simple line text properly formatted there is no problem. But Have noticed significant corruption in rendered text when 1)multiple tabs are present infont of a line in the sample doc. 2)Extra spaces are present in the original doc. 3)A space in the form of a "grey area" is present in the original doc. ...and many more instances not found yet. A removal of the above spaces and tabs removes the warning and the document is rendered cleanly without corruption. Any ideas on the same will be greatle appreciated. :) Regards, Karl -- View this message in context: http://www.nabble.com/Getting-warning--Pango-WARNING-**%3A-Invalid-UTF-8-string-passed-to-pango_layout_set_text%28%29--tp17643055p17643055.html Sent from the openoffice - dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
