i Implemented rendering of diacriticals.
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Nov 2002 01:16:02 +0000 (01:16 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Nov 2002 01:16:02 +0000 (01:16 +0000)
        * 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: https://svn.webkit.org/repository/webkit/trunk@2536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2002-12-03
WebCore/ChangeLog-2003-10-25
WebCore/ChangeLog-2005-08-23
WebCore/kwq/KWQChar.mm
WebCore/kwq/WebCoreUnicode.h
WebKit/ChangeLog
WebKit/ChangeLog-2002-12-03
WebKit/Misc.subproj/WebUnicode.h
WebKit/Misc.subproj/WebUnicode.m
WebKit/WebCoreSupport.subproj/WebTextRenderer.m

index f94fbcec194ebbe9764bbb65c98f095e478c16ca..18af7df2d296a6f27a89fda9e9bdd69866217c70 100644 (file)
@@ -1,3 +1,14 @@
+2002-11-01  Richard Williamson   <rjw@apple.com>
+
+        Removed old implementation.
+        
+        * kwq/KWQChar.mm:
+        (QChar::direction):
+        
+        Renamed JoiningCenter -> JoiningCausing.
+        
+        * kwq/WebCoreUnicode.h:
+
 2002-11-01  Darin Adler  <darin@apple.com>
 
        - fixed 3062598 -- meta refresh of 0.1s fails
index f94fbcec194ebbe9764bbb65c98f095e478c16ca..18af7df2d296a6f27a89fda9e9bdd69866217c70 100644 (file)
@@ -1,3 +1,14 @@
+2002-11-01  Richard Williamson   <rjw@apple.com>
+
+        Removed old implementation.
+        
+        * kwq/KWQChar.mm:
+        (QChar::direction):
+        
+        Renamed JoiningCenter -> JoiningCausing.
+        
+        * kwq/WebCoreUnicode.h:
+
 2002-11-01  Darin Adler  <darin@apple.com>
 
        - fixed 3062598 -- meta refresh of 0.1s fails
index f94fbcec194ebbe9764bbb65c98f095e478c16ca..18af7df2d296a6f27a89fda9e9bdd69866217c70 100644 (file)
@@ -1,3 +1,14 @@
+2002-11-01  Richard Williamson   <rjw@apple.com>
+
+        Removed old implementation.
+        
+        * kwq/KWQChar.mm:
+        (QChar::direction):
+        
+        Renamed JoiningCenter -> JoiningCausing.
+        
+        * kwq/WebCoreUnicode.h:
+
 2002-11-01  Darin Adler  <darin@apple.com>
 
        - fixed 3062598 -- meta refresh of 0.1s fails
index b0c279065c0f09ec5039f009f6fd4ceedba7cfdd..680d6e4e43285a7441df1e3090ef63c45029f053 100644 (file)
@@ -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);
 }
 
index 30c6eee1462f3174fb00fa7d190a79a1c847f3b7..344acfb766e279f0fd9195eddcb5c0aeee7255ea 100644 (file)
@@ -126,7 +126,7 @@ extern "C" {
         JoiningOther,
         JoiningDual,
         JoiningRight,
-        JoiningCenter
+        JoiningCausing
     } WebCoreUnicodeJoining;
 
     typedef enum
index a5c4cda715e45bd1eb61dd37c23d4ba7a6afe058..0ac933ad24bccb41b06edeca7e99f45e6434c99b 100644 (file)
@@ -1,3 +1,23 @@
+2002-11-01  Richard Williamson   <rjw@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@apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
index a5c4cda715e45bd1eb61dd37c23d4ba7a6afe058..0ac933ad24bccb41b06edeca7e99f45e6434c99b 100644 (file)
@@ -1,3 +1,23 @@
+2002-11-01  Richard Williamson   <rjw@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@apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
index 458d5f9fdd3dc941f67b26b6922c4b56a3782d1f..499f396ad1913aabbd244f1c23e5c36a24c60dba 100644 (file)
@@ -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)
+
index 3bf0fcaf9e43e9d0bcced8495db54e050d9ec75e..0a749de057e156c78e5dbdd4fd0044e36204c481 100644 (file)
@@ -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@uniserve.ca>, with input from Lars Knoll <knoll@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
index 97ae56e7bafb81e59732a4fb5948d6ec505c94ec..5d2df438899022cbe7e19e64f6b0ceac7e0f295f 100644 (file)
@@ -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;
     }