Author: fejj
Date: 2007-10-09 14:00:21 -0400 (Tue, 09 Oct 2007)
New Revision: 87206

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/font.cpp
Log:
2007-10-09  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * font.cpp (Layout): Only break words on ASCII lwsp, we should not
        break on nbsp's for example.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-10-09 17:45:08 UTC (rev 87205)
+++ trunk/moon/src/ChangeLog    2007-10-09 18:00:21 UTC (rev 87206)
@@ -1,3 +1,8 @@
+2007-10-09  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * font.cpp (Layout): Only break words on ASCII lwsp, we should not
+       break on nbsp's for example.
+
 2007-10-09  Jackson Harper  <[EMAIL PROTECTED]>
 
        * control.cpp: Since controls are UIElements we need to make sure

Modified: trunk/moon/src/font.cpp
===================================================================
--- trunk/moon/src/font.cpp     2007-10-09 17:45:08 UTC (rev 87205)
+++ trunk/moon/src/font.cpp     2007-10-09 18:00:21 UTC (rev 87206)
@@ -1295,6 +1295,9 @@
        *width = this->bbox_width;
 }
 
+// ASCII lwsp characters
+#define isSpace(c) (((c) >= 0x09 && (c) <= 0x0D) || (c) == 0x20)
+
 struct Space {
        double width;
        int index;
@@ -1386,7 +1389,7 @@
                        advance = glyph->metrics.horiAdvance;
                        advance += run->font->Kerning (prev, glyph->index);
                        
-                       if ((is_space = g_unichar_isspace (run->text[i]))) {
+                       if ((is_space = isSpace (run->text[i]))) {
                                spc.width = lw + advance;
                                spc.index = i;
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to