ooo-build r11333 - in trunk: . patches/cairo patches/src680



Author: rengelhard
Date: Mon Jan 21 07:24:37 2008
New Revision: 11333
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11333&view=rev

Log:
2008-01-20  Rene Engelhard  <rene debian org>

        * patches/src680/ooo64508.vcl.honourfontconfighinting.diff: update
          from Fedora, remving the cairo font parts because it needs Gtk 2.10,
          formally was in ooo59127.vcl.honourcairofont.diff and will be split
          to there now, too ...
        * patches/src680/ooo59127.vcl.honourcairofont.diff: update with the
          Cairo parts of above.
        * patches/src680/apply: apply above again, apply
          cairo-canvas-fail-if-no-xrender.diff only for < ooh680-m4 (it's in
          thbpp10)
        * patches/src680/apply,
          patches/src680/buildfix-font-hints-svp.diff: remove, obsolete (in
          the new ooo64508.vcl.honourfontconfighinting.diff)
        * patches/src680/cairocanvas-image-borders.diff: move ..
        * patches/cairo/cairocanvas-image-borders.diff: .. here


Added:
   trunk/patches/cairo/cairocanvas-image-borders.diff
      - copied unchanged from r11331, /trunk/patches/src680/cairocanvas-image-borders.diff
Removed:
   trunk/patches/src680/buildfix-font-hints-svp.diff
   trunk/patches/src680/cairocanvas-image-borders.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply
   trunk/patches/src680/ooo59127.vcl.honourcairofont.diff
   trunk/patches/src680/ooo64508.vcl.honourfontconfighinting.diff

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Mon Jan 21 07:24:37 2008
@@ -1535,10 +1535,11 @@
 cairo-config_office-configure-in.diff, i#70519, tml
 cairo-cairo-1-4-10-diff.diff, i#70519, tml
 
+[ cairocanvas < ooh680-m4 ]
 # don't crash if xrender extension is not present
 cairo-canvas-fail-if-no-xrender.diff, i#84049, fridrich
 
-
+[ cairocanvas ]
 # Additional diffs for cairocanvas on Win32
 cairo-canvas-win32.diff, i#70519, n#300398, tml
 
@@ -1610,11 +1611,9 @@
 
 
 [ FedoraFixes ]
-#FIXME src680: ooo64508.vcl.honourfontconfighinting.diff
+ooo64508.vcl.honourfontconfighinting.diff
 ooo84684.vcl.fixfontconfig.diff
 
-#FIXME src680: buildfix-font-hints-svp.diff
-
 ooo67658.sfx2.reloadcrash.diff
 
 oooXXXXX.vcl.x86_64.impressatk.diff
@@ -1627,7 +1626,7 @@
 
 # needs Gtk2.0 >= 2.10 and cairo
 [ CairoFonts ]
-#FIXME src680: ooo59127.vcl.honourcairofont.diff
+ooo59127.vcl.honourcairofont.diff
 
 
 [ GStreamer ]

Modified: trunk/patches/src680/ooo59127.vcl.honourcairofont.diff
==============================================================================
--- trunk/patches/src680/ooo59127.vcl.honourcairofont.diff	(original)
+++ trunk/patches/src680/ooo59127.vcl.honourcairofont.diff	Mon Jan 21 07:24:37 2008
@@ -52,33 +52,36 @@
  // ------------------------------------------------------------
  
  #ifndef ENUM_KEYFUNCTYPE_DECLARED
-diff -ru vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/gcach_ftyp.cxx
---- vcl/source/glyphs/gcach_ftyp.cxx	2006-05-23 12:35:49.000000000 +0100
-+++ vcl/source/glyphs/gcach_ftyp.cxx	2006-05-23 12:46:15.000000000 +0100
-@@ -870,6 +870,22 @@
+Index: source/glyphs/gcach_ftyp.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v
+retrieving revision 1.139.12.2
+diff -u -r1.139.12.2 gcach_ftyp.cxx
+--- vcl/source/glyphs/gcach_ftyp.cxx	24 Jan 2007 15:08:39 -0000	1.139.12.2
++++ vcl/source/glyphs/gcach_ftyp.cxx	13 Apr 2007 11:33:47 -0000
+@@ -886,6 +886,21 @@
+                 break;
+            case HINT_FULL:
+            default:
++               switch (aHints.GetSubPixel())
++               {
++                       case SUBPIXEL_NONE:
++                           break;
++                       default:
++                       case SUBPIXEL_UNKNOWN:
++                       case SUBPIXEL_RGB:
++                       case SUBPIXEL_BGR:
++                           mnLoadFlags |= FT_LOAD_TARGET_LCD;
++                           break;
++                       case SUBPIXEL_VRGB:
++                       case SUBPIXEL_VBGR:
++                           mnLoadFlags |= FT_LOAD_TARGET_LCD_V;
++                           break;
++               }
+                 break;
+        }
      }
- #endif
- 
-+    switch (aHints.GetSubPixel())
-+    {
-+        default:
-+        case SUBPIXEL_UNKNOWN:
-+        case SUBPIXEL_NONE:
-+            break;
-+        case SUBPIXEL_RGB:
-+        case SUBPIXEL_BGR:
-+            mnLoadFlags |= FT_LOAD_TARGET_LCD;
-+            break;
-+        case SUBPIXEL_VRGB:
-+        case SUBPIXEL_VBGR:
-+            mnLoadFlags |= FT_LOAD_TARGET_LCD_V;
-+            break;
-+    }
-+
-     if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
-         mnLoadFlags |= FT_LOAD_NO_BITMAP;
- }
-@@ -1176,13 +1216,15 @@
+@@ -1197,13 +1238,15 @@
          }
      }
  
@@ -180,6 +183,15 @@
  #ifndef FC_WEIGHT_BOOK
  #define FC_WEIGHT_BOOK 75
  #endif
+@@ -151,7 +153,7 @@
+ 
+     void FcPatternDestroy( FcPattern* pPattern )
+     { m_pFcPatternDestroy( pPattern ); }
+-    
++
+     FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
+     { return m_pFcFontList( pConfig, pPattern, pSet ); }
+ 
 @@ -774,14 +777,19 @@
      rWrapper.FcPatternAddDouble( pPattern, FC_PIXEL_SIZE, nSize);
  
@@ -187,7 +199,7 @@
 -    int hintstyle = FC_HINT_FULL;
 +    int hintstyle = FC_HINT_FULL, rgba = FC_RGBA_UNKNOWN;
  
-     rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
+     rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchFont );
 +    GdkScreen *pScreen = gdk_screen_get_default();
 +    if (const cairo_font_options_t *pOptions = pScreen ? gdk_screen_get_font_options(pScreen) : 0)
 +	cairo_ft_font_options_substitute(pOptions, pPattern);
@@ -213,8 +225,8 @@
 +        {
 +	    default:
 +	    case FC_RGBA_UNKNOWN:
-+	        break;
 +                aHints.m_eSubPixel = fcsubpixel::Unknown;
++	        break;
 +	    case FC_RGBA_RGB:
 +                aHints.m_eSubPixel = fcsubpixel::RGB;
 +	        break;

Modified: trunk/patches/src680/ooo64508.vcl.honourfontconfighinting.diff
==============================================================================
--- trunk/patches/src680/ooo64508.vcl.honourfontconfighinting.diff	(original)
+++ trunk/patches/src680/ooo64508.vcl.honourfontconfighinting.diff	Mon Jan 21 07:24:37 2008
@@ -47,7 +47,7 @@
 diff -ru vcl/inc/outdev.hxx vcl/inc/outdev.hxx
 --- vcl/inc/vcl/outdev.hxx	2006-05-04 08:55:40.000000000 +0100
 +++ vcl/inc/vcl/outdev.hxx	2006-05-05 10:27:05.000000000 +0100
-@@ -105,6 +105,8 @@
+@@ -106,6 +106,8 @@
  class FontCharMap;
  class SalLayout;
  class ImplLayoutArgs;
@@ -56,7 +56,7 @@
  class VirtualDevice;
  
  namespace basegfx {
-@@ -543,6 +545,7 @@
+@@ -566,6 +568,7 @@
  
      SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
      SAL_DLLPRIVATE static BOOL ImplIsUnderlineAbove( const Font& );
@@ -146,148 +146,6 @@
  FontMetric OutputDevice::GetFontMetric() const
  {
      DBG_TRACE( "OutputDevice::GetFontMetric()" );
-diff -ru vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/gcach_ftyp.cxx
---- vcl/source/glyphs/gcach_ftyp.cxx	2006-05-04 08:55:40.000000000 +0100
-+++ vcl/source/glyphs/gcach_ftyp.cxx	2006-05-05 10:26:37.000000000 +0100
-@@ -41,6 +41,7 @@
- #include <vcl/impfont.hxx>
- #include <vcl/bitmap.hxx>
- #include <vcl/bmpacc.hxx>
-+#include <vcl/virdev.hxx>
- 
- #include <tools/poly.hxx>
- #include <basegfx/matrix/b2dhommatrix.hxx>
-@@ -594,9 +595,6 @@
-             aDFA.mbSubsettable= false;
-             aDFA.mbEmbeddable = false;
- 
--            aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
--            aDFA.meAntiAlias = ANTIALIAS_DONTKNOW;
--
-             FT_Done_Face( aFaceFT );
-             AddFontFile( aCFileName, nFaceNum, ++mnNextFontId, aDFA, NULL );
-             ++nCount;
-@@ -676,6 +674,7 @@
- :   ServerFont( rFSD ),
-     mnPrioEmbedded(nDefaultPrioEmbedded),
-     mnPrioAntiAlias(nDefaultPrioAntiAlias),
-+    mnPrioAutoHint(nDefaultPrioAutoHint),
-     mpFontInfo( pFI ),
-     maFaceFT( NULL ),
-     maSizeFT( NULL ),
-@@ -805,42 +804,67 @@
- 
-     mbArtItalic = (rFSD.meItalic != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE);
-     mbArtBold = (rFSD.meWeight > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
-+    mbUseGamma = false;
-+    if (mbArtBold)
-+    {
-+	    //static const int TT_CODEPAGE_RANGE_874  = (1L << 16); // Thai
-+	    //static const int TT_CODEPAGE_RANGE_932  = (1L << 17); // JIS/Japan
-+	    //static const int TT_CODEPAGE_RANGE_936  = (1L << 18); // Chinese: Simplified
-+	    //static const int TT_CODEPAGE_RANGE_949  = (1L << 19); // Korean Wansung
-+	    //static const int TT_CODEPAGE_RANGE_950  = (1L << 20); // Chinese: Traditional
-+	    //static const int TT_CODEPAGE_RANGE_1361 = (1L << 21); // Korean Johab
-+	    static const int TT_CODEPAGE_RANGES1_CJKT = 0x3F0000; // all of the above
-+	    const TT_OS2* pOs2 = (const TT_OS2*)FT_Get_Sfnt_Table( maFaceFT, ft_sfnt_os2 );
-+	    if ((pOs2) && (pOs2->ulCodePageRange1 & TT_CODEPAGE_RANGES1_CJKT )
-+		&& rFSD.mnHeight < 20)
-+		mbUseGamma = true;
-+    }
-+
-+    ImplFontHints aHints;
-+    VirtualDevice vdev( 1 );
-+    vdev.ImplGetFontHints( pFI->GetFontAttributes(), mnWidth, aHints );
-+
-+    FontAutoHint eHint = aHints.GetUseAutoHint();
-+    if (eHint == AUTOHINT_DONTKNOW)
-+        eHint = mbUseGamma ? AUTOHINT_TRUE : AUTOHINT_FALSE;
- 
--    //static const int TT_CODEPAGE_RANGE_874  = (1L << 16); // Thai
--    //static const int TT_CODEPAGE_RANGE_932  = (1L << 17); // JIS/Japan
--    //static const int TT_CODEPAGE_RANGE_936  = (1L << 18); // Chinese: Simplified
--    //static const int TT_CODEPAGE_RANGE_949  = (1L << 19); // Korean Wansung
--    //static const int TT_CODEPAGE_RANGE_950  = (1L << 20); // Chinese: Traditional
--    //static const int TT_CODEPAGE_RANGE_1361 = (1L << 21); // Korean Johab
--    static const int TT_CODEPAGE_RANGES1_CJKT = 0x3F0000; // all of the above
--    const TT_OS2* pOs2 = (const TT_OS2*)FT_Get_Sfnt_Table( maFaceFT, ft_sfnt_os2 );
--    if ((pOs2) && (pOs2->ulCodePageRange1 & TT_CODEPAGE_RANGES1_CJKT )
--        && rFSD.mnHeight < 20)
--        mbUseGamma = true;
--    else
--        mbUseGamma = false;
--
--    if (mbUseGamma)
-+    if (eHint == AUTOHINT_TRUE)
-         mnLoadFlags |= FT_LOAD_FORCE_AUTOHINT;
- 
-     if( (mnSin != 0) && (mnCos != 0) ) // hinting for 0/90/180/270 degrees only
-         mnLoadFlags |= FT_LOAD_NO_HINTING;
-     mnLoadFlags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; //#88334#
- 
--    if (mpFontInfo->DontUseAntiAlias())
--        mnPrioAntiAlias = 0;
--    if (mpFontInfo->DontUseEmbeddedBitmaps())
--        mnPrioEmbedded = 0;
-+    if (aHints.DontUseAntiAlias())
-+      mnPrioAntiAlias = 0;
-+    if (aHints.DontUseEmbeddedBitmaps())
-+      mnPrioEmbedded = 0;
-+    if (aHints.DontUseHinting())
-+      mnPrioAutoHint = 0;
- 
- #if (FTVERSION >= 2005) || defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER)
--    if( nDefaultPrioAutoHint <= 0 )
-+    if( mnPrioAutoHint <= 0 )
- #endif
-         mnLoadFlags |= FT_LOAD_NO_HINTING;
- 
--#ifdef FT_LOAD_TARGET_LIGHT
-+#if defined(FT_LOAD_TARGET_LIGHT) && defined(FT_LOAD_TARGET_NORMAL)
-     // enable "light hinting" if available
-     if( !(mnLoadFlags & FT_LOAD_NO_HINTING) && (nFTVERSION >= 2103))
--        mnLoadFlags |= FT_LOAD_TARGET_LIGHT;
-+    {
-+       switch (aHints.GetHintStyle())
-+       {
-+           default:
-+           case HINT_SLIGHT:
-+           case HINT_MEDIUM:
-+                mnLoadFlags |= FT_LOAD_TARGET_LIGHT;
-+                break;
-+           case HINT_FULL:
-+                mnLoadFlags |= FT_LOAD_TARGET_NORMAL;
-+                break;
-+           case HINT_NONE:
-+                break;
-+       }
-+    }
- #endif
- 
-     if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
-@@ -1297,11 +1321,11 @@
- #if (FTVERSION >= 2002)
-     // for 0/90/180/270 degree fonts enable autohinting even if not advisable
-     // non-hinted and non-antialiased bitmaps just look too ugly
--    if( (mnCos==0 || mnSin==0) && (nDefaultPrioAutoHint > 0) )
-+    if( (mnCos==0 || mnSin==0) && (mnPrioAutoHint > 0) )
-         nLoadFlags &= ~FT_LOAD_NO_HINTING;
- #endif
- 
--    if( mnPrioEmbedded <= nDefaultPrioAutoHint )
-+    if( mnPrioEmbedded <= mnPrioAutoHint )
-         nLoadFlags |= FT_LOAD_NO_BITMAP;
- 
-     FT_Error rc = -1;
-@@ -1446,7 +1470,7 @@
-     // autohinting in FT<=2.0.4 makes antialiased glyphs look worse
-     nLoadFlags |= FT_LOAD_NO_HINTING;
- #else
--    if( (nGlyphFlags & GF_UNHINTED) || (nDefaultPrioAutoHint < mnPrioAntiAlias) )
-+    if( (nGlyphFlags & GF_UNHINTED) || (mnPrioAutoHint < mnPrioAntiAlias) )
-         nLoadFlags |= FT_LOAD_NO_HINTING;
- #endif
- 
 diff -ru vcl/source/glyphs/gcach_ftyp.hxx vcl/source/glyphs/gcach_ftyp.hxx
 --- vcl/source/glyphs/gcach_ftyp.hxx	2006-05-04 08:55:40.000000000 +0100
 +++ vcl/source/glyphs/gcach_ftyp.hxx	2006-05-04 14:53:16.000000000 +0100
@@ -822,7 +680,7 @@
 +    FcBool embitmap = true, antialias = true, autohint = true, hinting = true;
 +    int hintstyle = FC_HINT_FULL;
 +
-+    rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
++    rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchFont );
 +    rWrapper.FcDefaultSubstitute( pPattern );
 +    FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool( pPattern, FC_EMBEDDED_BITMAP, 0, &embitmap );
 +    FcResult eAntialias = rWrapper.FcPatternGetBool( pPattern, FC_ANTIALIAS, 0, &antialias );
@@ -883,18 +741,18 @@
 diff -ru psprint/source/fontmanager/fontmanager.cxx psprint/source/fontmanager/fontmanager.cxx
 --- psprint/source/fontmanager/fontmanager.cxx	2006-05-08 16:00:10.000000000 -0400
 +++ psprint/source/fontmanager/fontmanager.cxx	2006-05-08 16:00:32.000000000 -0400
-@@ -379,9 +379,7 @@
+@@ -391,9 +391,7 @@
+         m_nXMax( 0 ),
          m_nYMax( 0 ),
          m_bHaveVerticalSubstitutedGlyphs( false ),
-         m_bUserOverride( false ),
--  		m_bCJKSupport( false ), 
+-        m_bUserOverride( false ),
 -        m_eEmbeddedbitmap( fcstatus::isunset ),
 -        m_eAntialias( fcstatus::isunset )
-+  		m_bCJKSupport( false ) 
++        m_bUserOverride( false )
  {
  }
  
-@@ -2594,8 +2592,6 @@
+@@ -2761,8 +2759,6 @@
      rInfo.m_eWeight         = pFont->m_eWeight;
      rInfo.m_ePitch          = pFont->m_ePitch;
      rInfo.m_aEncoding       = pFont->m_aEncoding;
@@ -903,7 +761,7 @@
      rInfo.m_aAliases.clear();
      for( ::std::list< int >::iterator it = pFont->m_aAliases.begin(); it != pFont->m_aAliases.end(); ++it )
          rInfo.m_aAliases.push_back( m_pAtoms->getString( ATOM_FAMILYNAME, *it ) );
-@@ -4002,8 +4002,6 @@
+@@ -4006,8 +4002,6 @@
          BuiltinFont* pFont = new BuiltinFont();
          pFont->m_nDirectory = 0;
          pFont->m_bUserOverride = false;
@@ -912,3 +770,246 @@
          pFont->m_pMetrics = new PrintFontMetrics;
          memset( pFont->m_pMetrics->m_aPages, 0xff, sizeof( pFont->m_pMetrics->m_aPages ) );
          pFont->m_pMetrics->m_bKernPairsQueried = true;
+Index: source/glyphs/gcach_ftyp.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v
+retrieving revision 1.139.12.2
+diff -u -r1.139.12.2 gcach_ftyp.cxx
+--- vcl/source/glyphs/gcach_ftyp.cxx	24 Jan 2007 15:08:39 -0000	1.139.12.2
++++ vcl/source/glyphs/gcach_ftyp.cxx	13 Apr 2007 11:33:47 -0000
+@@ -44,6 +44,7 @@
+ #include <vcl/impfont.hxx>
+ #include <vcl/bitmap.hxx>
+ #include <vcl/bmpacc.hxx>
++#include <vcl/virdev.hxx>
+ 
+ #include <tools/poly.hxx>
+ #include <basegfx/matrix/b2dhommatrix.hxx>
+@@ -616,9 +617,6 @@
+             aDFA.mbSubsettable= false;
+             aDFA.mbEmbeddable = false;
+ 
+-            aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
+-            aDFA.meAntiAlias = ANTIALIAS_DONTKNOW;
+-
+             FT_Done_Face( aFaceFT );
+             AddFontFile( aCFileName, nFaceNum, ++mnNextFontId, aDFA, NULL );
+             ++nCount;
+@@ -698,6 +696,7 @@
+ :   ServerFont( rFSD ),
+     mnPrioEmbedded(nDefaultPrioEmbedded),
+     mnPrioAntiAlias(nDefaultPrioAntiAlias),
++    mnPrioAutoHint(nDefaultPrioAutoHint),
+     mpFontInfo( pFI ),
+     maFaceFT( NULL ),
+     maSizeFT( NULL ),
+@@ -830,42 +829,69 @@
+ 
+     mbArtItalic = (rFSD.meItalic != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE);
+     mbArtBold = (rFSD.meWeight > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
++    mbUseGamma = false;
++    if (mbArtBold)
++    {
++	    //static const int TT_CODEPAGE_RANGE_874  = (1L << 16); // Thai
++	    //static const int TT_CODEPAGE_RANGE_932  = (1L << 17); // JIS/Japan
++	    //static const int TT_CODEPAGE_RANGE_936  = (1L << 18); // Chinese: Simplified
++	    //static const int TT_CODEPAGE_RANGE_949  = (1L << 19); // Korean Wansung
++	    //static const int TT_CODEPAGE_RANGE_950  = (1L << 20); // Chinese: Traditional
++	    //static const int TT_CODEPAGE_RANGE_1361 = (1L << 21); // Korean Johab
++	    static const int TT_CODEPAGE_RANGES1_CJKT = 0x3F0000; // all of the above
++	    const TT_OS2* pOs2 = (const TT_OS2*)FT_Get_Sfnt_Table( maFaceFT, ft_sfnt_os2 );
++	    if ((pOs2) && (pOs2->ulCodePageRange1 & TT_CODEPAGE_RANGES1_CJKT )
++		&& rFSD.mnHeight < 20)
++		mbUseGamma = true;
++    }
++
++    ImplFontHints aHints;
++    VirtualDevice vdev( 1 );
++    vdev.ImplGetFontHints( pFI->GetFontAttributes(), mnWidth, aHints );
++
++    FontAutoHint eHint = aHints.GetUseAutoHint();
++    if (eHint == AUTOHINT_DONTKNOW)
++        eHint = mbUseGamma ? AUTOHINT_TRUE : AUTOHINT_FALSE;
+ 
+-    //static const int TT_CODEPAGE_RANGE_874  = (1L << 16); // Thai
+-    //static const int TT_CODEPAGE_RANGE_932  = (1L << 17); // JIS/Japan
+-    //static const int TT_CODEPAGE_RANGE_936  = (1L << 18); // Chinese: Simplified
+-    //static const int TT_CODEPAGE_RANGE_949  = (1L << 19); // Korean Wansung
+-    //static const int TT_CODEPAGE_RANGE_950  = (1L << 20); // Chinese: Traditional
+-    //static const int TT_CODEPAGE_RANGE_1361 = (1L << 21); // Korean Johab
+-    static const int TT_CODEPAGE_RANGES1_CJKT = 0x3F0000; // all of the above
+-    const TT_OS2* pOs2 = (const TT_OS2*)FT_Get_Sfnt_Table( maFaceFT, ft_sfnt_os2 );
+-    if ((pOs2) && (pOs2->ulCodePageRange1 & TT_CODEPAGE_RANGES1_CJKT )
+-        && rFSD.mnHeight < 20)
+-        mbUseGamma = true;
+-    else
+-        mbUseGamma = false;
+-
+-    if (mbUseGamma)
++    if (eHint == AUTOHINT_TRUE)
+         mnLoadFlags |= FT_LOAD_FORCE_AUTOHINT;
+ 
+     if( (mnSin != 0) && (mnCos != 0) ) // hinting for 0/90/180/270 degrees only
+         mnLoadFlags |= FT_LOAD_NO_HINTING;
+     mnLoadFlags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; //#88334#
+ 
+-    if (mpFontInfo->DontUseAntiAlias())
+-        mnPrioAntiAlias = 0;
+-    if (mpFontInfo->DontUseEmbeddedBitmaps())
+-        mnPrioEmbedded = 0;
++    if (aHints.DontUseAntiAlias())
++      mnPrioAntiAlias = 0;
++    if (aHints.DontUseEmbeddedBitmaps())
++      mnPrioEmbedded = 0;
++    if (aHints.DontUseHinting())
++      mnPrioAutoHint = 0;
+ 
+ #if (FTVERSION >= 2005) || defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER)
+-    if( nDefaultPrioAutoHint <= 0 )
++    if( mnPrioAutoHint <= 0 )
+ #endif
+         mnLoadFlags |= FT_LOAD_NO_HINTING;
+ 
+-#ifdef FT_LOAD_TARGET_LIGHT
+-    // enable "light hinting" if available
++#if defined(FT_LOAD_TARGET_LIGHT) && defined(FT_LOAD_TARGET_NORMAL)
+     if( !(mnLoadFlags & FT_LOAD_NO_HINTING) && (nFTVERSION >= 2103))
+-        mnLoadFlags |= FT_LOAD_TARGET_LIGHT;
++    {
++       mnLoadFlags |= FT_LOAD_TARGET_NORMAL;
++       switch (aHints.GetHintStyle())
++       {
++           case HINT_NONE:
++                mnLoadFlags |= FT_LOAD_NO_HINTING;
++                break;
++           case HINT_SLIGHT:
++                mnLoadFlags |= FT_LOAD_TARGET_LIGHT;
++                break;
++           case HINT_MEDIUM:
++                break;
++           case HINT_FULL:
++           default:
++                break;
++       }
++    }
++
+ #endif
+ 
+     if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
+@@ -1334,11 +1377,11 @@
+ #if (FTVERSION >= 2002)
+     // for 0/90/180/270 degree fonts enable autohinting even if not advisable
+     // non-hinted and non-antialiased bitmaps just look too ugly
+-    if( (mnCos==0 || mnSin==0) && (nDefaultPrioAutoHint > 0) )
++    if( (mnCos==0 || mnSin==0) && (mnPrioAutoHint > 0) )
+         nLoadFlags &= ~FT_LOAD_NO_HINTING;
+ #endif
+ 
+-    if( mnPrioEmbedded <= nDefaultPrioAutoHint )
++    if( mnPrioEmbedded <= mnPrioAutoHint )
+         nLoadFlags |= FT_LOAD_NO_BITMAP;
+ 
+     FT_Error rc = -1;
+@@ -1489,7 +1532,7 @@
+     // autohinting in FT<=2.0.4 makes antialiased glyphs look worse
+     nLoadFlags |= FT_LOAD_NO_HINTING;
+ #else
+-    if( (nGlyphFlags & GF_UNHINTED) || (nDefaultPrioAutoHint < mnPrioAntiAlias) )
++    if( (nGlyphFlags & GF_UNHINTED) || (mnPrioAutoHint < mnPrioAntiAlias) )
+         nLoadFlags |= FT_LOAD_NO_HINTING;
+ #endif
+ 
+Index: svppspgraphics.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/headless/svppspgraphics.cxx,v
+retrieving revision 1.2
+diff -u -r1.2 svppspgraphics.cxx
+--- vcl/unx/headless/svppspgraphics.cxx	24 Jul 2007 10:28:29 -0000	1.2
++++ vcl/unx/headless/svppspgraphics.cxx	15 Aug 2007 11:59:04 -0000
+@@ -1175,32 +1175,6 @@
+     aDFA.mePitch        = ToFontPitch (rInfo.m_ePitch);
+     aDFA.mbSymbolFlag   = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL);
+ 
+-    switch (rInfo.m_eEmbeddedbitmap)
+-    {
+-        default:
+-            aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
+-            break;
+-        case psp::fcstatus::istrue:
+-            aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_TRUE;
+-            break;
+-        case psp::fcstatus::isfalse:
+-            aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_FALSE;
+-            break;
+-    }
+-
+-    switch (rInfo.m_eAntialias)
+-    {
+-        default:
+-            aDFA.meAntiAlias = ANTIALIAS_DONTKNOW;
+-            break;
+-        case psp::fcstatus::istrue:
+-            aDFA.meAntiAlias = ANTIALIAS_TRUE;
+-            break;
+-        case psp::fcstatus::isfalse:
+-            aDFA.meAntiAlias = ANTIALIAS_FALSE;
+-            break;
+-    }
+-
+     // special case for the ghostscript fonts
+     if( aDFA.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
+         aDFA.maName = aDFA.maName.Copy( 4 );
+@@ -1386,3 +1360,7 @@
+     return bRet && m_bSwallowFaxNo;
+ }
+ 
++void PspGraphics::GetFontHints( const ImplFontAttributes& , int , ImplFontHints& ) const
++{
++}
++
+Index: svppspgraphics.hxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/headless/svppspgraphics.hxx,v
+retrieving revision 1.2
+diff -u -r1.2 svppspgraphics.hxx
+--- vcl/unx/headless/svppspgraphics.hxx	24 Jul 2007 10:28:40 -0000	1.2
++++ vcl/unx/headless/svppspgraphics.hxx	15 Aug 2007 12:02:57 -0000
+@@ -201,6 +201,7 @@
+ 
+     virtual BOOL			drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+     virtual bool            filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
++    virtual void                        GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
+ };
+ 
+ #endif // _SVP_PSPGRAPHICS_HXX
+Index: svpgdi.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/headless/svpgdi.cxx,v
+retrieving revision 1.2
+diff -u -r1.2 svpgdi.cxx
+--- vcl/unx/headless/svpgdi.cxx	24 Jul 2007 10:27:28 -0000	1.2
++++ vcl/unx/headless/svpgdi.cxx	15 Aug 2007 12:06:47 -0000
+@@ -535,3 +535,7 @@
+ {
+     return FALSE;
+ }
++
++void SvpSalGraphics::GetFontHints( const ImplFontAttributes& , int , ImplFontHints& ) const
++{
++}
+Index: svpgdi.hxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/headless/svpgdi.hxx,v
+retrieving revision 1.2
+diff -u -r1.2 svpgdi.hxx
+--- vcl/unx/headless/svpgdi.hxx	24 Jul 2007 10:27:38 -0000	1.2
++++ vcl/unx/headless/svpgdi.hxx	15 Aug 2007 12:07:36 -0000
+@@ -176,6 +176,8 @@
+     virtual void			invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ 
+     virtual BOOL			drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
++
++    virtual void                        GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
+ };
+ 
+ #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]