r52829 - in /desktop/unstable/pango1.0/debian: changelog patches/fix-sentence-break-function.patch patches/series
jbicha-guest at users.alioth.debian.org
jbicha-guest at users.alioth.debian.org
Wed Aug 16 13:51:00 UTC 2017
Author: jbicha-guest
Date: Wed Aug 16 13:51:00 2017
New Revision: 52829
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=52829
Log:
Fix regression caught by gtk3 build tests (LP: #1709225)
Added:
desktop/unstable/pango1.0/debian/patches/fix-sentence-break-function.patch
Modified:
desktop/unstable/pango1.0/debian/changelog
desktop/unstable/pango1.0/debian/patches/series
Modified: desktop/unstable/pango1.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pango1.0/debian/changelog?rev=52829&op=diff
==============================================================================
--- desktop/unstable/pango1.0/debian/changelog [utf-8] (original)
+++ desktop/unstable/pango1.0/debian/changelog [utf-8] Wed Aug 16 13:51:00 2017
@@ -2,6 +2,8 @@
* New upstream release.
* Build with meson.
+ * Add fix-sentence-break-function.patch:
+ - Fix regression caught by gtk3 build tests (LP: #1709225)
-- Jeremy Bicha <jbicha at ubuntu.com> Wed, 16 Aug 2017 09:46:11 -0400
Added: desktop/unstable/pango1.0/debian/patches/fix-sentence-break-function.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pango1.0/debian/patches/fix-sentence-break-function.patch?rev=52829&op=file
==============================================================================
--- desktop/unstable/pango1.0/debian/patches/fix-sentence-break-function.patch (added)
+++ desktop/unstable/pango1.0/debian/patches/fix-sentence-break-function.patch [utf-8] Wed Aug 16 13:51:00 2017
@@ -0,0 +1,72 @@
+From 6ff8f019170241188b4b76531c60f420bf81ffe2 Mon Sep 17 00:00:00 2001
+From: Peng Wu <alexepico at 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(-)
+
+diff --git a/pango/break.c b/pango/break.c
+index 1c36d494..90ee4d20 100644
+--- a/pango/break.c
++++ b/pango/break.c
+@@ -558,6 +558,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;
+@@ -1635,19 +1636,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;
++ /* 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;
+- }
++ /* 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;
Modified: desktop/unstable/pango1.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pango1.0/debian/patches/series?rev=52829&op=diff
==============================================================================
--- desktop/unstable/pango1.0/debian/patches/series [utf-8] (original)
+++ desktop/unstable/pango1.0/debian/patches/series [utf-8] Wed Aug 16 13:51:00 2017
@@ -0,0 +1 @@
+fix-sentence-break-function.patch
More information about the pkg-gnome-commits
mailing list