Issue 89844 - Aqua: Move ExtLeading below the text line
Summary: Aqua: Move ExtLeading below the text line
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: DEV300m12
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hdu@apache.org
QA Contact: issues@sw
URL:
Keywords: aqua
Depends on: 89545
Blocks: 89954
  Show dependency tree
 
Reported: 2008-05-23 11:02 UTC by ekato
Modified: 2013-08-07 14:43 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ekato 2008-05-23 11:02:02 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" )
Comment 1 hdu@apache.org 2008-05-23 12:38:01 UTC
@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.
Comment 2 frank.meies 2008-05-23 13:26:46 UTC
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.
Comment 3 hdu@apache.org 2008-05-26 10:34:35 UTC
Applied the patch in CWS hb09  and wrote a followup issue 89954 for doing it on all other platforms too.
Comment 4 hdu@apache.org 2008-06-05 10:15:23 UTC
Verified in CWS hb09.
Comment 5 hdu@apache.org 2008-07-21 16:00:08 UTC
Got into DEV300_m24 => closing