Apache OpenOffice (AOO) Bugzilla – Issue 103400
PDF horizontal layout bug when glyphs are out of order
Last modified: 2009-07-10 12:06:11 UTC
Some glyphs in a PDF export are displaced with Burmese text using the Padauk font. The fix for i100522 uses an abs to fix the problem with 180 degree rotated text. This assumes that the glyphs are strictly in left to right order. However, the abs also takes affect when you have a negative advance between two glyphs with zero rotation causing incorrect positioning. A better fix would be to invert the sign of the correction only in the case where the angle is really 180 (PI). Index: vcl/source/gdi/pdfwriter_impl.cxx =================================================================== --- vcl/source/gdi/pdfwriter_impl.cxx (revision 272475) +++ vcl/source/gdi/pdfwriter_impl.cxx (working copy) @@ -6680,7 +6680,9 @@ appendHex( rGlyphs[nPos].m_nMappedGlyphId, aUnkernedLine ); // check for adjustment double fTheoreticalGlyphWidth = rGlyphs[nPos].m_aPos.X() - rGlyphs[nPos-1].m_aPos.X(); - fTheoreticalGlyphWidth = fabs( fTheoreticalGlyphWidth ); // #i100522# workaround until #i87686# gets fixed + // #i100522# workaround until #i87686# gets fixed + if (fAngle > M_PI - 0.005 && fAngle < M_PI + 0.005) + fTheoreticalGlyphWidth = -fTheoreticalGlyphWidth; fTheoreticalGlyphWidth = 1000.0 * fTheoreticalGlyphWidth / fXScale / double(nPixelFontHeight); sal_Int32 nAdjustment = rGlyphs[nPos-1].m_nNativeWidth - sal_Int32(fTheoreticalGlyphWidth+0.5); if( nAdjustment != 0 )
Created attachment 63422 [details] file showing bad PDF rendering
Created attachment 63423 [details] bad rendering
Created attachment 63424 [details] correct rendering
Most probably a duplicate to issue 102603 (fixed in ooo311gsl04 => OOO310_m15/DEV300_m52). *** This issue has been marked as a duplicate of 102603 ***
Verified by private mail from issue submitter.
Closing resolved issue.