webengine/osswebengine/WebCore/platform/symbian/FontSymbian.cpp
changeset 10 a359256acfc6
parent 5 10e98eab6f85
child 47 e1bea15f9a39
--- a/webengine/osswebengine/WebCore/platform/symbian/FontSymbian.cpp	Fri Jul 03 15:54:40 2009 +0100
+++ b/webengine/osswebengine/WebCore/platform/symbian/FontSymbian.cpp	Thu Aug 27 07:44:59 2009 +0300
@@ -34,6 +34,8 @@
 
 namespace WebCore {
 
+const UChar UnicodeZeroWidthSpace = 0x200b;
+
 static void notSupported() { __ASSERT_ALWAYS( 0, User::Panic( _L("Font:"), 1 ) ); }
 
 void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, const GlyphBuffer& glyphBuffer,
@@ -111,6 +113,13 @@
     // word spacing
     bitgc.SetWordJustification(m_wordSpacing*numSpaces + style.padding(), numSpaces);
 
+#if PLATFORM(SYMBIAN)
+    TLanguage uilang = User::Language();
+    if(uilang == ELangKorean)
+    {
+        startPos.iY -= 1;
+    }
+#endif
     // see if we need a temporary buffer
     if( indexOfFirstNonRegularSpace > -1 || isSmallCaps() || style.rtl()){
         HBufC* text = 0;
@@ -129,7 +138,9 @@
             if (indexOfFirstNonRegularSpace > -1) {
                 for(; indexOfFirstNonRegularSpace<strLength; ++indexOfFirstNonRegularSpace ) {
                     if( TChar(newStr[indexOfFirstNonRegularSpace]).IsSpace()) {
-                        newStr[indexOfFirstNonRegularSpace] = ' ';
+                       if (newStr[indexOfFirstNonRegularSpace] != UnicodeZeroWidthSpace) {
+                           newStr[indexOfFirstNonRegularSpace] = ' ';
+                       }
                     }
                 }
             }