[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:59:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit da478db6e2a629d6e88ff4f3a0aec29bdd0da207
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 29 05:43:23 2002 +0000

            Fixed basic font horkage caused by removal of KDE font matching code.  We
            now work correctly for the basic font families.
    
            Increased size default for initial layout.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@887 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ad90c1e..09418ce 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-03-28  Richard Williamson  <rjw at apple.com>
+
+        Fixed basic font horkage caused by removal of KDE font matching code.  We
+        now work correctly for the basic font families.
+        
+	* src/kwq/KWQFont.mm: (QFont::getFont):
+
 2002-03-28  Darin Adler  <darin at apple.com>
 
 	* src/kwq/KWQKloader.mm: (Cache::requestImage), (Cache::requestStyleSheet),
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ad90c1e..09418ce 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-03-28  Richard Williamson  <rjw at apple.com>
+
+        Fixed basic font horkage caused by removal of KDE font matching code.  We
+        now work correctly for the basic font families.
+        
+	* src/kwq/KWQFont.mm: (QFont::getFont):
+
 2002-03-28  Darin Adler  <darin at apple.com>
 
 	* src/kwq/KWQKloader.mm: (Cache::requestImage), (Cache::requestStyleSheet),
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ad90c1e..09418ce 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,10 @@
+2002-03-28  Richard Williamson  <rjw at apple.com>
+
+        Fixed basic font horkage caused by removal of KDE font matching code.  We
+        now work correctly for the basic font families.
+        
+	* src/kwq/KWQFont.mm: (QFont::getFont):
+
 2002-03-28  Darin Adler  <darin at apple.com>
 
 	* src/kwq/KWQKloader.mm: (Cache::requestImage), (Cache::requestStyleSheet),
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index d9430e9..5b22a79 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -25,6 +25,7 @@
 
 #include <qstring.h>
 #include <qfont.h>
+#include <kwqdebug.h>
 
 #import <Cocoa/Cocoa.h>
 
@@ -152,6 +153,8 @@ static NSMutableDictionary *fontCache = 0;
 
 @end
 
+static NSArray *_availableFamiles = 0;
+
 NSFont *QFont::getFont()
 {
     if (font == nil) {
@@ -168,8 +171,28 @@ NSFont *QFont::getFont()
         if (font == nil) {
             font = [[NSFontManager sharedFontManager] fontWithFamily:_family traits:_trait weight:5 size:_size];
             if (font == nil) {
-                loadDefaultFont();
-                font = [[NSFontManager sharedFontManager] fontWithFamily:defaultFontFamilyName traits:_trait weight:5 size:_size];
+                if (_availableFamiles == 0)
+                    _availableFamiles = [[[NSFontManager sharedFontManager] availableFontFamilies] retain];
+                    
+                // FIXME:  For now do a simple case insensitive search for a matching font.
+                // The font manager requires exact name matches.  The will at least address the problem
+                // of matching arial to Arial, etc.
+                int i, count = [_availableFamiles count];
+                NSString *actualFamily;
+                for (i = 0; i < count; i++){
+                    actualFamily = [_availableFamiles objectAtIndex: i];
+                    if ([_family caseInsensitiveCompare: actualFamily] == NSOrderedSame){
+                        [_family release];
+                        _family = [actualFamily retain];
+                        font = [[NSFontManager sharedFontManager] fontWithFamily:_family traits:_trait weight:5 size:_size];
+                        break;
+                    }
+                }
+                if (font == nil){
+                    KWQDEBUGLEVEL1(KWQ_LOG_FONTCACHE, "unable to find font for family %s\n", [_family cString]);
+                    loadDefaultFont();
+                    font = [[NSFontManager sharedFontManager] fontWithFamily:defaultFontFamilyName traits:_trait weight:5 size:_size];
+                }
             }
             [fontCache setObject: font forKey: fontKey];
         }
diff --git a/WebCore/src/kwq/KWQFont.mm b/WebCore/src/kwq/KWQFont.mm
index d9430e9..5b22a79 100644
--- a/WebCore/src/kwq/KWQFont.mm
+++ b/WebCore/src/kwq/KWQFont.mm
@@ -25,6 +25,7 @@
 
 #include <qstring.h>
 #include <qfont.h>
+#include <kwqdebug.h>
 
 #import <Cocoa/Cocoa.h>
 
@@ -152,6 +153,8 @@ static NSMutableDictionary *fontCache = 0;
 
 @end
 
+static NSArray *_availableFamiles = 0;
+
 NSFont *QFont::getFont()
 {
     if (font == nil) {
@@ -168,8 +171,28 @@ NSFont *QFont::getFont()
         if (font == nil) {
             font = [[NSFontManager sharedFontManager] fontWithFamily:_family traits:_trait weight:5 size:_size];
             if (font == nil) {
-                loadDefaultFont();
-                font = [[NSFontManager sharedFontManager] fontWithFamily:defaultFontFamilyName traits:_trait weight:5 size:_size];
+                if (_availableFamiles == 0)
+                    _availableFamiles = [[[NSFontManager sharedFontManager] availableFontFamilies] retain];
+                    
+                // FIXME:  For now do a simple case insensitive search for a matching font.
+                // The font manager requires exact name matches.  The will at least address the problem
+                // of matching arial to Arial, etc.
+                int i, count = [_availableFamiles count];
+                NSString *actualFamily;
+                for (i = 0; i < count; i++){
+                    actualFamily = [_availableFamiles objectAtIndex: i];
+                    if ([_family caseInsensitiveCompare: actualFamily] == NSOrderedSame){
+                        [_family release];
+                        _family = [actualFamily retain];
+                        font = [[NSFontManager sharedFontManager] fontWithFamily:_family traits:_trait weight:5 size:_size];
+                        break;
+                    }
+                }
+                if (font == nil){
+                    KWQDEBUGLEVEL1(KWQ_LOG_FONTCACHE, "unable to find font for family %s\n", [_family cString]);
+                    loadDefaultFont();
+                    font = [[NSFontManager sharedFontManager] fontWithFamily:defaultFontFamilyName traits:_trait weight:5 size:_size];
+                }
             }
             [fontCache setObject: font forKey: fontKey];
         }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index aca16d8..472ca27 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,11 @@
 2002-03-28  Richard Williamson  <rjw at apple.com>
 
+        Increased size default for initial layout.
+        
+	* WebView.subproj/IFPreferences.mm: (+[IFPreferences load]):
+
+2002-03-28  Richard Williamson  <rjw at apple.com>
+
         Fixed big leak of any document that had a frame or iframe.
         
 	* WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource retain]):
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index aca16d8..472ca27 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,11 @@
 2002-03-28  Richard Williamson  <rjw at apple.com>
 
+        Increased size default for initial layout.
+        
+	* WebView.subproj/IFPreferences.mm: (+[IFPreferences load]):
+
+2002-03-28  Richard Williamson  <rjw at apple.com>
+
         Fixed big leak of any document that had a frame or iframe.
         
 	* WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource retain]):
diff --git a/WebKit/WebView.subproj/IFPreferences.mm b/WebKit/WebView.subproj/IFPreferences.mm
index d650b5f..cc9b9f1 100644
--- a/WebKit/WebView.subproj/IFPreferences.mm
+++ b/WebKit/WebView.subproj/IFPreferences.mm
@@ -57,7 +57,7 @@ static IFPreferences *_standardPreferences = nil;
         @"Papyrus", 		WebKitFantasyFontPreferenceKey,
         @"6", 			WebKitMinimumFontSizePreferenceKey,
         @"1.5", 		WebKitInitialTimedLayoutDelayPreferenceKey,
-        @"2048", 		WebKitInitialTimedLayoutSizePreferenceKey,
+        @"4096", 		WebKitInitialTimedLayoutSizePreferenceKey,
         timedLayoutEnabled,	WebKitInitialTimedLayoutEnabledPreferenceKey,
         fontSizeArray,		WebKitFontSizesPreferenceKey,
         javaEnabled,		WebKitJavaEnabledPreferenceKey,
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index d650b5f..cc9b9f1 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -57,7 +57,7 @@ static IFPreferences *_standardPreferences = nil;
         @"Papyrus", 		WebKitFantasyFontPreferenceKey,
         @"6", 			WebKitMinimumFontSizePreferenceKey,
         @"1.5", 		WebKitInitialTimedLayoutDelayPreferenceKey,
-        @"2048", 		WebKitInitialTimedLayoutSizePreferenceKey,
+        @"4096", 		WebKitInitialTimedLayoutSizePreferenceKey,
         timedLayoutEnabled,	WebKitInitialTimedLayoutEnabledPreferenceKey,
         fontSizeArray,		WebKitFontSizesPreferenceKey,
         javaEnabled,		WebKitJavaEnabledPreferenceKey,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list