[libreoffice] Resolves: rhbz#974062 Impress font rendering weirdness

David Tardon dtardon at fedoraproject.org
Sun Jun 16 06:39:33 UTC 2013


commit 81742ab91b3592b8877b70d3754caa3c1b3d664f
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Jun 16 08:32:00 2013 +0200

    Resolves: rhbz#974062 Impress font rendering weirdness

 0001-fdo-65132-compute-font-height-correctly.patch |   29 +++++++++++++++
 ...rt-Fix-fdo-64972-strikethrough-displays-t.patch |   39 ++++++++++++++++++++
 libreoffice.spec                                   |    6 +++
 3 files changed, 74 insertions(+), 0 deletions(-)
---
diff --git a/0001-fdo-65132-compute-font-height-correctly.patch b/0001-fdo-65132-compute-font-height-correctly.patch
new file mode 100644
index 0000000..c44b4c8
--- /dev/null
+++ b/0001-fdo-65132-compute-font-height-correctly.patch
@@ -0,0 +1,29 @@
+From ed31769088acc76eeed0f83b53227a429a5bf3a8 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Wed, 12 Jun 2013 11:33:41 +0200
+Subject: [PATCH 1/2] fdo#65132 compute font height correctly
+
+Change-Id: I8da66b102a554c9d5d275ff46e40dd707199d4f4
+(cherry picked from commit 3a6513047409b8e8f6295152b33385ad8ef93681)
+
+Signed-off-by: David Tardon <dtardon at redhat.com>
+---
+ vcl/source/gdi/outdev3.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
+index d5d019a..cf37e01 100644
+--- a/vcl/source/gdi/outdev3.cxx
++++ b/vcl/source/gdi/outdev3.cxx
+@@ -7084,7 +7084,7 @@ FontMetric OutputDevice::GetFontMetric() const
+     // set aMetric with info from font
+     aMetric.SetName( maFont.GetName() );
+     aMetric.SetStyleName( pMetric->GetStyleName() );
+-    aMetric.SetSize( PixelToLogic( Size( pMetric->mnWidth, pMetric->mnAscent+pMetric->mnDescent-pMetric->mnIntLeading ) ) );
++    aMetric.SetSize( PixelToLogic( Size( pMetric->mnWidth, pMetric->mnAscent+pMetric->mnDescent ) ) );
+     aMetric.SetCharSet( pMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
+     aMetric.SetFamily( pMetric->GetFamilyType() );
+     aMetric.SetPitch( pMetric->GetPitch() );
+-- 
+1.8.2.1
+
diff --git a/0002-Revert-Revert-Fix-fdo-64972-strikethrough-displays-t.patch b/0002-Revert-Revert-Fix-fdo-64972-strikethrough-displays-t.patch
new file mode 100644
index 0000000..e0d9804
--- /dev/null
+++ b/0002-Revert-Revert-Fix-fdo-64972-strikethrough-displays-t.patch
@@ -0,0 +1,39 @@
+From 4e0a8fc68bda2a88de5468a61218996a099d3302 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Wed, 12 Jun 2013 12:32:21 +0200
+Subject: [PATCH 2/2] Revert "Revert "Fix fdo#64972 - strikethrough displays
+ too high""
+
+The underlying bug was fixed by the previous commit.
+
+This reverts commit 1d34b905fad48b7aee7ccf39e33d952846f00fea.
+
+Change-Id: I2333740ec623165b28253d20f0ba7fa2bcd19ac1
+---
+ vcl/generic/glyphs/gcach_ftyp.cxx | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
+index 162ba11..e34b38d 100644
+--- a/vcl/generic/glyphs/gcach_ftyp.cxx
++++ b/vcl/generic/glyphs/gcach_ftyp.cxx
+@@ -940,7 +940,6 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
+     rTo.mnDescent = 0;
+     rTo.mnExtLeading = 0;
+     rTo.mnSlant = 0;
+-    rTo.mnIntLeading = (rTo.mnAscent + rTo.mnDescent) - ((maFaceFT->units_per_EM + 32) >> 6);
+     rTo.mnWidth = mnWidth;
+ 
+     // Calculating ascender and descender:
+@@ -994,6 +993,8 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
+         }
+     }
+ 
++    rTo.mnIntLeading = (rTo.mnAscent + rTo.mnDescent) - ((maFaceFT->units_per_EM + 32) >> 6);
++
+     if( pOS2 && (pOS2->version != 0xFFFF) )
+     {
+         // map the panose info from the OS2 table to their VCL counterparts
+-- 
+1.8.2.1
+
diff --git a/libreoffice.spec b/libreoffice.spec
index c075ef9..53ea7b2 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -250,6 +250,8 @@ Patch17: 0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch
 Patch18: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch
 Patch19: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch
 Patch20: 0001-simplify-check-for-harfbuzz.patch
+Patch21: 0001-fdo-65132-compute-font-height-correctly.patch
+Patch22: 0002-Revert-Revert-Fix-fdo-64972-strikethrough-displays-t.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -989,6 +991,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch18 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch
 %patch19 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch
 %patch20 -p1 -b .simplify-check-for-harfbuzz.patch
+%patch21 -p1 -b .fdo-65132-compute-font-height-correctly.patch
+%patch22 -p1 -b .Revert-Revert-Fix-fdo-64972-strikethrough-displays-t.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2060,6 +2064,8 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %changelog
 * Sun Jun 16 2013 David Tardon <dtardon at redhat.com> - 1:4.1.0.0-9.beta2
 - Resolves: rhbz#971321 failing tests on ppc and s390
+- Resolves: rhbz#974062 incorrect rendering of text in outline blocks in
+  Impress
 
 * Fri Jun 07 2013 David Tardon <dtardon at redhat.com> - 1:4.1.0.0-8.beta2
 - Related: rhbz#971795 go back to BR: harfbuzz-devel


More information about the scm-commits mailing list