Hello community,

here is the log from the commit of package pango for openSUSE:Factory checked 
in at 2017-09-04 12:24:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pango (Old)
 and      /work/SRC/openSUSE:Factory/.pango.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pango"

Mon Sep  4 12:24:36 2017 rev:110 rq:519949 version:1.40.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/pango/pango.changes      2017-08-24 
18:25:06.740034204 +0200
+++ /work/SRC/openSUSE:Factory/.pango.new/pango.changes 2017-09-04 
12:24:37.570182514 +0200
@@ -1,0 +2,6 @@
+Thu Aug 31 12:33:32 UTC 2017 - pmonrealgonza...@suse.com
+
+- Add pango-fix-default-break-function.patch: Fix
+  pango_default_break function for sentence start/end (bgo#785978).
+
+-------------------------------------------------------------------

New:
----
  pango-fix-default-break-function.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pango.spec ++++++
--- /var/tmp/diff_new_pack.Rz58pV/_old  2017-09-04 12:24:38.690025075 +0200
+++ /var/tmp/diff_new_pack.Rz58pV/_new  2017-09-04 12:24:38.726020015 +0200
@@ -18,7 +18,6 @@
 
 # When updating the binary version, do not forget to also update baselibs.conf
 %define pango_binary_version 1.8.0
-
 Name:           pango
 Version:        1.40.11
 Release:        0
@@ -29,6 +28,8 @@
 Source:         
https://download.gnome.org/sources/pango/1.40/%{name}-%{version}.tar.xz
 Source2:        macros.pango
 Source99:       baselibs.conf
+# PATCH-FIX-UPSTREAM pango-fix-default-break-function.patch bgo#785978 
pmonrealgonza...@suse.com -- Fix pango_default_break function for sentence 
start/end
+Patch0:         pango-fix-default-break-function.patch
 BuildRequires:  gcc-c++
 BuildRequires:  gtk-doc
 BuildRequires:  help2man
@@ -101,12 +102,12 @@
 Group:          Development/Libraries/GNOME
 Requires:       libpango-1_0-0 = %{version}
 Requires:       typelib-1_0-Pango-1_0 = %{version}
+Provides:       pango-doc = %{version}
+Obsoletes:      pango-doc < %{version}
 # bug437293
 %ifarch ppc64
 Obsoletes:      pango-devel-64bit
 %endif
-Provides:       pango-doc = %{version}
-Obsoletes:      pango-doc < %{version}
 
 %description devel
 Pango is a library for layout and rendering of text, with an emphasis
@@ -120,6 +121,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %meson \
@@ -152,7 +154,7 @@
 
 %files tools
 %{_bindir}/pango-view
-%doc %{_mandir}/man1/pango-view.1%{ext_man}
+%{_mandir}/man1/pango-view.1%{ext_man}
 
 %files devel
 %doc README AUTHORS

++++++ pango-fix-default-break-function.patch ++++++
>From 6ff8f019170241188b4b76531c60f420bf81ffe2 Mon Sep 17 00:00:00 2001
From: Peng Wu <alexep...@gmail.com>
Date: Wed, 16 Aug 2017 15:02:36 +0800
Subject: [PATCH] Fix pango_default_break function for sentence start/end

Skip the space characters in sentence start/end.

https://bugzilla.gnome.org/show_bug.cgi?id=785978
---
 pango/break.c | 39 +++++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)

Index: pango-1.40.11/pango/break.c
===================================================================
--- pango-1.40.11.orig/pango/break.c
+++ pango-1.40.11/pango/break.c
@@ -559,6 +559,7 @@ pango_default_break (const gchar   *text
   gunichar base_character = 0;
 
   gint last_sentence_start = -1;
+  gint last_non_space = -1;
 
   gboolean almost_done = FALSE;
   gboolean done = FALSE;
@@ -1660,19 +1661,37 @@ pango_default_break (const gchar   *text
        }
 
       /* ---- Sentence breaks ---- */
+      {
 
-      /* default to not a sentence start/end */
-      attrs[i].is_sentence_start = FALSE;
-      attrs[i].is_sentence_end = FALSE;
-
-      if (last_sentence_start == -1 && !is_sentence_boundary) {
-       last_sentence_start = i - 1;
-       attrs[i - 1].is_sentence_start = TRUE;
-      }
+             /* default to not a sentence start/end */
+             attrs[i].is_sentence_start = FALSE;
+             attrs[i].is_sentence_end = FALSE;
+
+             /* maybe start sentence */
+             if (last_sentence_start == -1 && !is_sentence_boundary)
+               last_sentence_start = i - 1;
+
+             /* remember last non space character position */
+             if (i > 0 && !attrs[i - 1].is_white)
+               last_non_space = i;
+
+             /* meets sentence end, mark both sentence start and end */
+             if (last_sentence_start != -1 && is_sentence_boundary) {
+               if (last_non_space != -1) {
+                 attrs[last_sentence_start].is_sentence_start = TRUE;
+                 attrs[last_non_space].is_sentence_end = TRUE;
+               }
+
+               last_sentence_start = -1;
+               last_non_space = -1;
+             }
+
+             /* meets space character, move sentence start */
+             if (last_sentence_start != -1 &&
+                 last_sentence_start == i - 1 &&
+                 attrs[i - 1].is_white)
+                 last_sentence_start++;
 
-      if (last_sentence_start != -1 && is_sentence_boundary) {
-       last_sentence_start = -1;
-       attrs[i].is_sentence_end = TRUE;
       }
 
       prev_wc = wc;

Reply via email to