Apache OpenOffice (AOO) Bugzilla – Issue 89844
Aqua: Move ExtLeading below the text line
Last modified: 2013-08-07 14:43:03 UTC
With fixing issue #89545 in cws_aquavcl08, now fonts on Mac OS X become rendered with proper ascent and descent, which fixes UI text rendering at the right positioning. However, as its leading is now assigned as mnExtLeading instead of addition for mnDescent, sw documents show these ExtLeading above the text lines. But typical Mac OS X application put these leadings below the text lines, the layout of document made by sw looks different compared with Apple's Pages application. So I'd suggest moving these ExtLeading below the text line for Aqua with changes below. Index: fntcache.cxx =================================================================== RCS file: /cvs/sw/sw/source/core/txtnode/fntcache.cxx,v retrieving revision 1.95 diff -u -r1.95 fntcache.cxx --- fntcache.cxx 10 Apr 2008 15:50:58 -0000 1.95 +++ fntcache.cxx 23 May 2008 09:52:12 -0000 @@ -347,7 +347,11 @@ { CreateScrFont( *pSh, rOut ); ASSERT( USHRT_MAX != nScrAscent, "nScrAscent is going berzerk" ) +#if defined(MACOSX) + nRet = nScrAscent; +#else nRet = nScrAscent + GetFontLeading( pSh, rRefDev );; +#endif } else { @@ -361,7 +365,11 @@ ( (OutputDevice&)rRefDev).SetFont( aOldFnt ); } +#if defined(MACOSX) + nRet = nPrtAscent; +#else nRet = nPrtAscent + GetFontLeading( pSh, rRefDev );; +#endif } ASSERT( USHRT_MAX != nRet, "GetFontAscent returned USHRT_MAX" )
@fme: please review the patch for SW to move extleading below the text line. IMHO it should be done for all platforms. I vaguely remember that the older VCL change mentioned in issue 89545 (zeroing Aquas extleading and extending the descent instead) had to do with the fact that VCL alone had no other way to extend the linespacing below the baseline except by increasing the descent.
fme: Looks fine for me. The patch does not affect line heights, only the ascent in manipulated, therefore: fme->hdu: Go. Regarding the other platforms: Actually I don't want to change this unless we have found the time to evaluate what MS Word does.
Applied the patch in CWS hb09 and wrote a followup issue 89954 for doing it on all other platforms too.
Verified in CWS hb09.
Got into DEV300_m24 => closing