[pango/soft-hyphen-cleanup: 3/4] Revert "break: Mark breaks induced by soft hyphens"



commit 0e3da88d1606300a04dfde625cd28af4c958b14c
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jul 9 09:44:23 2019 -0400

    Revert "break: Mark breaks induced by soft hyphens"
    
    This reverts commit 50b1e8532c5211cebd3cea935f9ac91a087d5c35.

 pango/break.c       | 9 +--------
 pango/pango-break.h | 5 +----
 2 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index 13ccbdaf..11f4079e 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -984,7 +984,6 @@ pango_default_break (const gchar   *text,
       attrs[i].is_char_break = FALSE;
       attrs[i].is_line_break = FALSE;
       attrs[i].is_mandatory_break = FALSE;
-      attrs[i].is_soft_hyphen = FALSE;
 
       /* Rule LB1:
         assign a line breaking class to each code point of the input. */
@@ -1365,15 +1364,9 @@ pango_default_break (const gchar   *text,
 
            case BREAK_ALLOWED:
              attrs[i].is_line_break = TRUE;
-              /* fall through */
+             break;
 
            case BREAK_ALREADY_HANDLED:
-              if (attrs[i].is_line_break)
-                {
-                  /* After Soft Hyphen */
-                  if (prev_wc == 0x00AD)
-                    attrs[i].is_soft_hyphen = TRUE;
-                }
              break;
 
            default:
diff --git a/pango/pango-break.h b/pango/pango-break.h
index 66d81631..92af390b 100644
--- a/pango/pango-break.h
+++ b/pango/pango-break.h
@@ -79,9 +79,6 @@ G_BEGIN_DECLS
  * This flag implements Unicode's
  * <ulink url="http://www.unicode.org/reports/tr29/";>Word
  * Boundaries</ulink> semantics. (Since: 1.22)
- * @is_soft_hyphen: is a line break due to a Soft Hyphen (0x00AD).
- *     This indicates a position where a hyphen should be inserted
- *     if the break is taken.
  *
  * The #PangoLogAttr structure stores information
  * about the attributes of a single character.
@@ -89,6 +86,7 @@ G_BEGIN_DECLS
 struct _PangoLogAttr
 {
   guint is_line_break : 1;      /* Can break line in front of character */
+
   guint is_mandatory_break : 1; /* Must break line in front of character */
 
   guint is_char_break : 1;      /* Can break here when doing char wrap */
@@ -132,7 +130,6 @@ struct _PangoLogAttr
 
   /* Word boundary as defined by UAX#29 */
   guint is_word_boundary : 1;  /* is NOT in the middle of a word */
-  guint is_soft_hyphen : 1;    /* line break due to a soft hyphen */
 };
 
 /* Determine information about cluster/word/line breaks in a string


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]