[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 06:56:42 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 43e01a422c292daeb4ce2436aac151bd213deac8
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 2 01:16:02 2002 +0000

    i        Implemented rendering of diacriticals.
    
            * Misc.subproj/WebUnicode.h:
            * Misc.subproj/WebUnicode.m:
            (_unicodeDigitValue):
            (_unicodeCategory):
            (_unicodeDirection):
            (_unicodeJoining):
            (_unicodeDecompositionTag):
            (_unicodeMirrored):
            (_unicodeCombiningClass):
            (_unicodeLower):
            (_unicodeUpper):
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:rightToLeft:]):
            (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:]):
            (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]):
    
            Removed old implementation.
    
            * kwq/KWQChar.mm:
            (QChar::direction):
    
            Renamed JoiningCenter -> JoiningCausing.
    
            * kwq/WebCoreUnicode.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index f94fbce..18af7df 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,14 @@
+2002-11-01  Richard Williamson   <rjw at apple.com>
+
+        Removed old implementation.
+        
+        * kwq/KWQChar.mm:
+        (QChar::direction):
+        
+        Renamed JoiningCenter -> JoiningCausing.
+        
+        * kwq/WebCoreUnicode.h:
+
 2002-11-01  Darin Adler  <darin at apple.com>
 
 	- fixed 3062598 -- meta refresh of 0.1s fails
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f94fbce..18af7df 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2002-11-01  Richard Williamson   <rjw at apple.com>
+
+        Removed old implementation.
+        
+        * kwq/KWQChar.mm:
+        (QChar::direction):
+        
+        Renamed JoiningCenter -> JoiningCausing.
+        
+        * kwq/WebCoreUnicode.h:
+
 2002-11-01  Darin Adler  <darin at apple.com>
 
 	- fixed 3062598 -- meta refresh of 0.1s fails
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f94fbce..18af7df 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2002-11-01  Richard Williamson   <rjw at apple.com>
+
+        Removed old implementation.
+        
+        * kwq/KWQChar.mm:
+        (QChar::direction):
+        
+        Renamed JoiningCenter -> JoiningCausing.
+        
+        * kwq/WebCoreUnicode.h:
+
 2002-11-01  Darin Adler  <darin at apple.com>
 
 	- fixed 3062598 -- meta refresh of 0.1s fails
diff --git a/WebCore/kwq/KWQChar.mm b/WebCore/kwq/KWQChar.mm
index b0c2790..680d6e4 100644
--- a/WebCore/kwq/KWQChar.mm
+++ b/WebCore/kwq/KWQChar.mm
@@ -107,79 +107,6 @@ QChar QChar::upper() const
 
 QChar::Direction QChar::direction() const
 {
-#ifdef OLD_WAY
-    uint8_t type;
-    QChar::Direction dir = DirL;
-
-     if (c == ' ')
-         return DirWS;
-
-    // Early out for latin1.
-    if (c < 0x7f)
-        return dir;
-        
-    CFUniCharGetBidiCategory (&c, 1, &type);
-    switch (type){
-        case kCFUniCharBiDiPropertyON:
-            dir = DirON;
-            break;
-        case kCFUniCharBiDiPropertyL:
-            dir = DirL;
-            break;
-        case kCFUniCharBiDiPropertyR:
-            dir = DirR;
-            break;
-        case kCFUniCharBiDiPropertyAN:
-            dir = DirAN;
-            break;
-        case kCFUniCharBiDiPropertyEN:
-            dir = DirEN;
-            break;
-        case kCFUniCharBiDiPropertyAL:
-            dir = DirAL;
-            break;
-        case kCFUniCharBiDiPropertyNSM:
-            dir = DirNSM;
-            break;
-        case kCFUniCharBiDiPropertyCS:
-            dir = DirCS;
-            break;
-        case kCFUniCharBiDiPropertyES:
-            dir = DirES;
-            break;
-        case kCFUniCharBiDiPropertyET:
-            dir = DirET;
-            break;
-        case kCFUniCharBiDiPropertyBN:
-            dir = DirBN;
-            break;
-        case kCFUniCharBiDiPropertyS:
-            dir = DirS;
-            break;
-        case kCFUniCharBiDiPropertyWS:
-            dir = DirWS;
-            break;
-        case kCFUniCharBiDiPropertyB:
-            dir = DirB;
-            break;
-        case kCFUniCharBiDiPropertyRLO:
-            dir = DirRLO;
-            break;
-        case kCFUniCharBiDiPropertyRLE:
-            dir = DirRLE;
-            break;
-        case kCFUniCharBiDiPropertyLRO:
-            dir = DirLRO;
-            break;
-        case kCFUniCharBiDiPropertyLRE:
-            dir = DirLRE;
-            break;
-        case kCFUniCharBiDiPropertyPDF:
-            dir = DirPDF;
-            break;
-    }
-    return dir;
-#endif
     return (QChar::Direction)WebCoreUnicodeDirectionFunction(c);
 }
 
diff --git a/WebCore/kwq/WebCoreUnicode.h b/WebCore/kwq/WebCoreUnicode.h
index 30c6eee..344acfb 100644
--- a/WebCore/kwq/WebCoreUnicode.h
+++ b/WebCore/kwq/WebCoreUnicode.h
@@ -126,7 +126,7 @@ extern "C" {
         JoiningOther,
         JoiningDual,
         JoiningRight,
-        JoiningCenter
+        JoiningCausing
     } WebCoreUnicodeJoining;
 
     typedef enum
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a5c4cda..0ac933a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2002-11-01  Richard Williamson   <rjw at apple.com>
+
+        Implemented rendering of diacriticals.
+        
+        * Misc.subproj/WebUnicode.h:
+        * Misc.subproj/WebUnicode.m:
+        (_unicodeDigitValue):
+        (_unicodeCategory):
+        (_unicodeDirection):
+        (_unicodeJoining):
+        (_unicodeDecompositionTag):
+        (_unicodeMirrored):
+        (_unicodeCombiningClass):
+        (_unicodeLower):
+        (_unicodeUpper):
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:rightToLeft:]):
+        (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:]):
+        (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]):
+
 2002-11-01  Darin Adler  <darin at apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index a5c4cda..0ac933a 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-11-01  Richard Williamson   <rjw at apple.com>
+
+        Implemented rendering of diacriticals.
+        
+        * Misc.subproj/WebUnicode.h:
+        * Misc.subproj/WebUnicode.m:
+        (_unicodeDigitValue):
+        (_unicodeCategory):
+        (_unicodeDirection):
+        (_unicodeJoining):
+        (_unicodeDecompositionTag):
+        (_unicodeMirrored):
+        (_unicodeCombiningClass):
+        (_unicodeLower):
+        (_unicodeUpper):
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:rightToLeft:]):
+        (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:]):
+        (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]):
+
 2002-11-01  Darin Adler  <darin at apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
diff --git a/WebKit/Misc.subproj/WebUnicode.h b/WebKit/Misc.subproj/WebUnicode.h
index 458d5f9..499f396 100644
--- a/WebKit/Misc.subproj/WebUnicode.h
+++ b/WebKit/Misc.subproj/WebUnicode.h
@@ -4,8 +4,11 @@
 
         Private header file.
 */
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern void composeLigatures(UniChar *str, unsigned int stringLength);
 extern void WebKitInitializeUnicode(void);
-
 extern const unsigned char * const combining_info[];
 extern const char * const decimal_info[];
 extern const unsigned char * const unicode_info[];
@@ -15,3 +18,12 @@ extern const unsigned short decomposition_map[];
 extern const unsigned short symmetricPairs[];
 extern int symmetricPairsSize;
 extern const unsigned short * const case_info[];
+extern const unsigned short * const ligature_info[];
+extern const unsigned short ligature_map[];
+#ifdef __cplusplus
+}
+#endif
+
+#define WK_CELL(ucs) ((unsigned char) ucs & 0xff)
+#define WK_ROW(ucs) ((unsigned char) (ucs>>8)&0xff)
+
diff --git a/WebKit/Misc.subproj/WebUnicode.m b/WebKit/Misc.subproj/WebUnicode.m
index 3bf0fca..0a749de 100644
--- a/WebKit/Misc.subproj/WebUnicode.m
+++ b/WebKit/Misc.subproj/WebUnicode.m
@@ -3,50 +3,46 @@
 	Copyright 2001, 2002, Apple Computer, Inc.
 */
 #import <WebKit/WebUnicode.h>
-
 #import <WebCore/WebCoreUnicode.h>
 
-#define CELL(ucs) ((unsigned char) ucs & 0xff)
-#define ROW(ucs) ((unsigned char) (ucs>>8)&0xff)
-
 
 static int _unicodeDigitValue(UniChar c)
 {
-    const char *dec_row = decimal_info[ROW(c)];
+    const char *dec_row = decimal_info[WK_ROW(c)];
     if( !dec_row )
 	return -1;
-    return dec_row[CELL(c)];
+    return dec_row[WK_CELL(c)];
 }
 
 static WebCoreUnicodeCategory _unicodeCategory(UniChar c)
 {
-    return (WebCoreUnicodeCategory)(unicode_info[ROW(c)][CELL(c)]);
+    return (WebCoreUnicodeCategory)(unicode_info[WK_ROW(c)][WK_CELL(c)]);
 }
 
 static WebCoreUnicodeDirection _unicodeDirection(UniChar c)
 {
-    const unsigned char *rowp = direction_info[ROW(c)];
+    const unsigned char *rowp = direction_info[WK_ROW(c)];
     
     if(!rowp) 
         return DirectionL;
-    return (WebCoreUnicodeDirection) ( *(rowp+CELL(c)) &0x1f );
+    return (WebCoreUnicodeDirection) ( *(rowp+WK_CELL(c)) &0x1f );
 }
 
 static WebCoreUnicodeJoining _unicodeJoining(UniChar c)
 {
-    const unsigned char *rowp = direction_info[ROW(c)];
+    const unsigned char *rowp = direction_info[WK_ROW(c)];
     if ( !rowp )
 	return JoiningOther;
-    return (WebCoreUnicodeJoining) ((*(rowp+CELL(c)) >> 5) &0x3);
+    return (WebCoreUnicodeJoining) ((*(rowp+WK_CELL(c)) >> 5) &0x3);
 }
 
 static WebCoreUnicodeDecomposition _unicodeDecompositionTag(UniChar c)
 {
-    const unsigned short *r = decomposition_info[ROW(c)];
+    const unsigned short *r = decomposition_info[WK_ROW(c)];
     if(!r)
         return DecompositionSingle;
 
-    unsigned short pos = r[CELL(c)];
+    unsigned short pos = r[WK_CELL(c)];
     if(!pos)
         return DecompositionSingle;
 
@@ -55,10 +51,10 @@ static WebCoreUnicodeDecomposition _unicodeDecompositionTag(UniChar c)
 
 static bool _unicodeMirrored(UniChar c)
 {
-    const unsigned char *rowp = direction_info[ROW(c)];
+    const unsigned char *rowp = direction_info[WK_ROW(c)];
     if ( !rowp )
 	return FALSE;
-    return *(rowp+CELL(c))>128;
+    return *(rowp+WK_CELL(c))>128;
 }
 
 static UniChar _unicodeMirroredChar(UniChar c)
@@ -76,17 +72,17 @@ static UniChar _unicodeMirroredChar(UniChar c)
 
 static WebCoreUnicodeCombiningClass _unicodeCombiningClass (UniChar c)
 {
-    const unsigned char *rowp = combining_info[ROW(c)];
+    const unsigned char *rowp = combining_info[WK_ROW(c)];
     if ( !rowp )
 	return 0;
-    return *(rowp+CELL(c));
+    return *(rowp+WK_CELL(c));
 }
 
 static UniChar _unicodeLower(UniChar c)
 {
     if ( _unicodeCategory(c) != Letter_Uppercase )
 	return c;
-    unsigned short lower = *( case_info[ROW(c)] + CELL(c) );
+    unsigned short lower = *( case_info[WK_ROW(c)] + WK_CELL(c) );
     if ( lower == 0 )
 	return c;
     return lower;
@@ -96,7 +92,7 @@ static UniChar _unicodeUpper(UniChar c)
 {
     if ( _unicodeCategory(c) != Letter_Lowercase )
 	return c;
-    unsigned short upper = *(case_info[ROW(c)]+CELL(c));
+    unsigned short upper = *(case_info[WK_ROW(c)]+WK_CELL(c));
     if ( upper == 0 )
 	return c;
     return upper;
@@ -116,269 +112,3 @@ void WebKitInitializeUnicode(void)
     WebCoreUnicodeUpperFunction = _unicodeUpper;
 }
 
-#ifdef QT_CODE
-
-// small class used internally in QString::Compose()
-class QLigature
-{
-public:
-    QLigature( QChar c );
-
-    Q_UINT16 first() { cur = ligatures; return cur ? *cur : 0; }
-    Q_UINT16 next() { return cur && *cur ? *(cur++) : 0; }
-    Q_UINT16 current() { return cur ? *cur : 0; }
-
-    int match(QString & str, unsigned int index);
-    QChar head();
-    QChar::Decomposition tag();
-
-private:
-    Q_UINT16 *ligatures;
-    Q_UINT16 *cur;
-};
-
-QLigature::QLigature( QChar c )
-{
-    const Q_UINT16 *r = ligature_info[c.row()];
-    if( !r )
-	ligatures = 0;
-    else
-    {
-	const Q_UINT16 pos = r[c.cell()];
-	ligatures = (Q_UINT16 *)&(ligature_map[pos]);
-    }
-    cur = ligatures;
-}
-
-QChar QLigature::head()
-{
-    if(current())
-	return QChar(decomposition_map[current()+1]);
-
-    return QChar::null;
-}
-
-QChar::Decomposition QLigature::tag()
-{
-    if(current())
-	return (QChar::Decomposition) decomposition_map[current()];
-
-    return QChar::Canonical;
-}
-
-int QLigature::match(QString & str, unsigned int index)
-{
-    unsigned int i=index;
-
-    if(!current()) return 0;
-
-    Q_UINT16 lig = current() + 2;
-    Q_UINT16 ch;
-
-    while ((i < str.length()) && (ch = decomposition_map[lig])) {
-	if (str[(int)i] != QChar(ch))
-	    return 0;
-	i++; lig++;
-    }
-
-    if (!decomposition_map[lig])
-    {
-	return i-index;
-    }
-    return 0;
-}
-
-
-// this function is just used in QString::compose()
-static inline bool format(QChar::Decomposition tag, QString & str,
-			  int index, int len)
-{
-    unsigned int l = index + len;
-    unsigned int r = index;
-
-    bool left = FALSE, right = FALSE;
-
-    left = ((l < str.length()) &&
-	    ((str[(int)l].joining() == QChar::Dual) ||
-	     (str[(int)l].joining() == QChar::Right)));
-    if (r > 0) {
-	r--;
-	//printf("joining(right) = %d\n", str[(int)r].joining());
-	right = (str[(int)r].joining() == QChar::Dual);
-    }
-
-
-    switch (tag) {
-    case QChar::Medial:
-	return (left & right);
-    case QChar::Initial:
-	return (left && !right);
-    case QChar::Final:
-	return (right);// && !left);
-    case QChar::Isolated:
-    default:
-	return (!right && !left);
-    }
-} // format()
-
-/*
-  QString::compose() and visual() were developed by Gordon Tisher
-  <tisher at uniserve.ca>, with input from Lars Knoll <knoll at mpi-hd.mpg.de>,
-  who developed the unicode data tables.
-*/
-/*!
-    \warning This function is not supported in Qt 3.x. It is provided
-    for experimental and illustrative purposes only. It is mainly of
-    interest to those experimenting with Arabic and other
-    composition-rich texts.
-
-    Applies possible ligatures to a QString. Useful when
-    composition-rich text requires rendering with glyph-poor fonts,
-    but it also makes compositions such as QChar(0x0041) ('A') and
-    QChar(0x0308) (Unicode accent diaresis), giving QChar(0x00c4)
-    (German A Umlaut).
-*/
-void QString::compose()
-{
-#ifndef QT_NO_UNICODETABLES
-    unsigned int index=0, len;
-    unsigned int cindex = 0;
-
-    QChar code, head;
-
-    QMemArray<QChar> dia;
-
-    QString composed = *this;
-
-    while (index < length()) {
-	code = at(index);
-	//printf("\n\nligature for 0x%x:\n", code.unicode());
-	QLigature ligature(code);
-	ligature.first();
-	while(ligature.current()) {
-	    if ((len = ligature.match(*this, index)) != 0) {
-		head = ligature.head();
-		unsigned short code = head.unicode();
-		// we exclude Arabic presentation forms A and a few
-		// other ligatures, which are undefined in most fonts
-		if(!(code > 0xfb50 && code < 0xfe80) &&
-		   !(code > 0xfb00 && code < 0xfb2a)) {
-				// joining info is only needed for Arabic
-		    if (format(ligature.tag(), *this, index, len)) {
-			//printf("using ligature 0x%x, len=%d\n",code,len);
-			// replace letter
-			composed.replace(cindex, len, QChar(head));
-			index += len-1;
-			// we continue searching in case we have a final
-			// form because medial ones are preferred.
-			if ( len != 1 || ligature.tag() !=QChar::Final )
-			    break;
-		    }
-		}
-	    }
-	    ligature.next();
-	}
-	cindex++;
-	index++;
-    }
-    *this = composed;
-#endif
-}
-
-
-
-
-
-
-bool QChar::isPrint() const
-{
-    Category c = category();
-    return !(c == Other_Control || c == Other_NotAssigned);
-}
-
-/*!
-    Returns TRUE if the character is a separator character
-    (Separator_* categories); otherwise returns FALSE.
-*/
-bool QChar::isSpace() const
-{
-    if( !row() )
-	if( cell() >= 9 && cell() <=13 ) return TRUE;
-    Category c = category();
-    return c >= Separator_Space && c <= Separator_Paragraph;
-}
-
-/*!
-    Returns TRUE if the character is a mark (Mark_* categories);
-    otherwise returns FALSE.
-*/
-bool QChar::isMark() const
-{
-    Category c = category();
-    return c >= Mark_NonSpacing && c <= Mark_Enclosing;
-}
-
-/*!
-    Returns TRUE if the character is a punctuation mark (Punctuation_*
-    categories); otherwise returns FALSE.
-*/
-bool QChar::isPunct() const
-{
-    Category c = category();
-    return (c >= Punctuation_Connector && c <= Punctuation_Other);
-}
-
-/*!
-    Returns TRUE if the character is a letter (Letter_* categories);
-    otherwise returns FALSE.
-*/
-bool QChar::isLetter() const
-{
-    Category c = category();
-    return (c >= Letter_Uppercase && c <= Letter_Other);
-}
-
-/*!
-    Returns TRUE if the character is a number (of any sort - Number_*
-    categories); otherwise returns FALSE.
-
-    \sa isDigit()
-*/
-bool QChar::isNumber() const
-{
-    Category c = category();
-    return c >= Number_DecimalDigit && c <= Number_Other;
-}
-
-/*!
-    Returns TRUE if the character is a letter or number (Letter_* or
-    Number_* categories); otherwise returns FALSE.
-*/
-bool QChar::isLetterOrNumber() const
-{
-    Category c = category();
-    return (c >= Letter_Uppercase && c <= Letter_Other)
-	|| (c >= Number_DecimalDigit && c <= Number_Other);
-}
-
-
-/*!
-    Returns TRUE if the character is a decimal digit
-    (Number_DecimalDigit); otherwise returns FALSE.
-*/
-bool QChar::isDigit() const
-{
-    return (category() == Number_DecimalDigit);
-}
-
-
-/*!
-    Returns TRUE if the character is a symbol (Symbol_* categories);
-    otherwise returns FALSE.
-*/
-bool QChar::isSymbol() const
-{
-    Category c = category();
-    return c >= Symbol_Math && c <= Symbol_Other;
-}
-#endif
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index 97ae56e..5d2df43 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -10,6 +10,8 @@
 #import <ApplicationServices/ApplicationServices.h>
 #import <CoreGraphics/CoreGraphicsPrivate.h>
 
+#import <WebCore/WebCoreUnicode.h>
+
 #import <WebKit/WebGlyphBuffer.h>
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebTextRendererFactory.h>
@@ -441,7 +443,7 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
     
     if (length == 0)
         return;
-        
+                
     // FIXME:  the character to glyph translation must result in less than
     // length glyphs.  This isn't always true.
     if (length > LOCAL_BUFFER_SIZE) {
@@ -712,14 +714,16 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
             break;
         }
 
-        //if (IsNonBaseChar(c)) {
-        //    return [self slowFloatWidthForCharacters: &characters[pos] stringLength: stringLength-pos fromCharacterPostion: 0 numberOfCharacters: len applyRounding: applyRounding];
-        //}
-
         glyphID = glyphForCharacter(characterToGlyphMap, c);
         if (glyphID == nonGlyphID) {
             glyphID = [self extendCharacterToGlyphMapToInclude: c];
         }
+
+#ifdef DEBUG_DIACRITICAL
+        if (IsNonBaseChar(c)){
+            printf ("NonBaseCharacter 0x%04x, joining attribute %d, combining class %d, direction %d, glyph %d, width %f\n", c, WebCoreUnicodeJoiningFunction(c), WebCoreUnicodeCombiningClassFunction(c), WebCoreUnicodeDirectionFunction(c), glyphID, widthForGlyph(self, glyphToWidthMap, glyphID));
+        }
+#endif
         
         // Try to find a substitute font if this font didn't have a glyph for a character in the
         // string.  If one isn't found we end up drawing and measuring the 0 glyph, usually a box.
@@ -781,6 +785,11 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
                 widthBuffer[numGlyphs] = lastWidth;
             numGlyphs++;
         }
+
+#ifdef DEBUG_COMBINING        
+        if (WebCoreUnicodeJoiningFunction(c) != 0 || WebCoreUnicodeCombiningClassFunction(c) != 0)
+            printf ("Character 0x%04x, joining attribute %d, combining class %d, direction %d\n", c, WebCoreUnicodeJoiningFunction(c), WebCoreUnicodeCombiningClassFunction(c), WebCoreUnicodeDirectionFunction(c));
+#endif
         
         totalWidth += lastWidth;       
     }
@@ -825,9 +834,9 @@ static void _drawGlyphs(NSFont *font, NSColor *color, CGGlyph *glyphs, CGSize *a
     short unsigned int buffer[INCREMENTAL_BLOCK_SIZE+2];
     
     for (i = 0; i < count; i++){
-        if (IsNonBaseChar(i+start))
-            buffer[i] = 0;
-        else
+        //if (IsNonBaseChar(i+start))
+        //    buffer[i] = 0;
+        //else
             buffer[i] = i+start;
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list