[Libreoffice-commits] core.git: download.lst external/graphite vcl/source

Martin Hosken martin_hosken at sil.org
Wed Sep 23 19:09:12 PDT 2015


 download.lst                              |    2 +-
 external/graphite/graphite2.win64.patch.1 |    4 +++-
 vcl/source/glyphs/graphite_layout.cxx     |    7 ++++++-
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 69e670bee91c1c24cef184da4135d0dece33ecf6
Author: Martin Hosken <martin_hosken at sil.org>
Date:   Tue Sep 22 11:23:03 2015 +0700

    Fix graphite sole diacritic rendering
    
    Change-Id: If44ab2ff8c860fbed2af3b4702fa031675e425f4
    Reviewed-on: https://gerrit.libreoffice.org/18757
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Martin Hosken <martin_hosken at sil.org>

diff --git a/download.lst b/download.lst
index fae46de..4e329cf 100644
--- a/download.lst
+++ b/download.lst
@@ -61,7 +61,7 @@ export FREEHAND_TARBALL := libfreehand-0.1.1.tar.bz2
 export FREETYPE_TARBALL := dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.bz2
 export GLEW_TARBALL := 3941e9cab2f4f9d8faee3e8d57ae7664-glew-1.12.0.zip
 export GLM_TARBALL := bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
-export GRAPHITE_TARBALL := 5a99dbd27c6a1a707d28bd38ea808562-graphite2-1.3.2.tgz
+export GRAPHITE_TARBALL := 7cda6fc6bc197b216777b15ce52c38a8-graphite2-1.3.3.tgz
 export HARFBUZZ_MD5SUM := 0e27e531f4c4acff601ebff0957755c2
 export HARFBUZZ_TARBALL := harfbuzz-0.9.40.tar.bz2
 export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
diff --git a/external/graphite/graphite2.win64.patch.1 b/external/graphite/graphite2.win64.patch.1
index 0286126..e7c36c6 100644
--- a/external/graphite/graphite2.win64.patch.1
+++ b/external/graphite/graphite2.win64.patch.1
@@ -1,11 +1,13 @@
 diff -ur graphite.org/src/inc/Main.h graphite/src/inc/Main.h
 --- graphite.org/src/inc/Main.h	2015-09-07 20:09:25.572279671 +0700
 --- graphite/src/inc/Main.h	2015-09-07 20:09:25.572279671 +0700
-@@ -25,6 +25,7 @@
+@@ -25,6 +25,9 @@
  of the License or (at your option) any later version.
  */
  #pragma once
++#ifdef _WIN32
 +#pragma warning(disable: 4510 4610)
++#endif
  
  #include <cstdlib>
  #include "graphite2/Types.h"
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index bf38a49..305a5d4 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -152,7 +152,12 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc
         nextBaseSlot = get_next_base(bRtl ? gr_slot_prev_in_segment(baseSlot) : gr_slot_next_in_segment(baseSlot), bRtl);
         nextBoundary = nextBaseSlot ? gr_slot_origin_X(nextBaseSlot) : gr_seg_advance_X(pSegment);
         if (firstChar < mnMinCharPos || firstChar >= mnEndCharPos)
+        {
+            // handle clipping of diacritic from base
+            nextBaseSlot = bRtl ? gr_slot_prev_in_segment(baseSlot) : gr_slot_next_in_segment(baseSlot);
+            nextBoundary = nextBaseSlot ? gr_slot_origin_X(nextBaseSlot) : gr_seg_advance_X(pSegment);
             continue;
+        }
         // handle reordered clusters. Presumes reordered glyphs have monotonic opposite char index until the cluster base.
         bool isReordered = (nextBaseSlot && ((bRtl != (gr_cinfo_base(gr_seg_cinfo(pSegment, gr_slot_before(nextBaseSlot))) < firstChar - mnSegCharOffset))
                                              || gr_cinfo_base(gr_seg_cinfo(pSegment, gr_slot_before(nextBaseSlot))) == firstChar - mnSegCharOffset));
@@ -523,7 +528,7 @@ DeviceCoordinate GraphiteLayout::FillDXArray( DeviceCoordinate* pDXArray ) const
 void  GraphiteLayout::AdjustLayout(ImplLayoutArgs& rArgs)
 {
     SalLayout::AdjustLayout(rArgs);
-    if(rArgs.mpDXArray)
+    if(rArgs.mpDXArray && mvGlyphs.size())
     {
         std::vector<int> vDeltaWidths(mvGlyphs.size(), 0);
         ApplyDXArray(rArgs, vDeltaWidths);


More information about the Libreoffice-commits mailing list