Fix paths and fonts.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 28 Oct 2008 11:09:55 +0000 (11:09 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 28 Oct 2008 11:09:55 +0000 (11:09 +0000)
inkscape/mingw32-inkscape-20081027-paths.patch [new file with mode: 0644]
inkscape/mingw32-inkscape-20081027-unhinted-fonts-for-wine.patch [new file with mode: 0644]
inkscape/mingw32-inkscape.spec

diff --git a/inkscape/mingw32-inkscape-20081027-paths.patch b/inkscape/mingw32-inkscape-20081027-paths.patch
new file mode 100644 (file)
index 0000000..61aaecb
--- /dev/null
@@ -0,0 +1,13 @@
+Index: src/path-prefix.h
+===================================================================
+--- src/path-prefix.h  (revision 20075)
++++ src/path-prefix.h  (working copy)
+@@ -42,7 +42,7 @@
+ #    define CREATE_PALETTESDIR    BR_DATADIR( "/create/swatches" )
+ #    define CREATE_PATTERNSDIR    BR_DATADIR( "/create/patterns/vector" )
+ #else
+-#  ifdef WIN32
++#  if 0
+ #    define INKSCAPE_APPICONDIR   WIN32_DATADIR("pixmaps")
+ #    define INKSCAPE_BINDDIR      WIN32_DATADIR("share\\bind")
+ #    define INKSCAPE_EXAMPLESDIR  WIN32_DATADIR("share\\examples")
diff --git a/inkscape/mingw32-inkscape-20081027-unhinted-fonts-for-wine.patch b/inkscape/mingw32-inkscape-20081027-unhinted-fonts-for-wine.patch
new file mode 100644 (file)
index 0000000..e2f6083
--- /dev/null
@@ -0,0 +1,22 @@
+Index: src/libnrtype/FontInstance.cpp
+===================================================================
+--- src/libnrtype/FontInstance.cpp     (revision 20075)
++++ src/libnrtype/FontInstance.cpp     (working copy)
+@@ -443,7 +443,7 @@
+         OUTLINETEXTMETRIC otm;
+         GetOutlineTextMetrics(daddy->hScreenDC, sizeof(otm), &otm);
+         GLYPHMETRICS metrics;
+-        DWORD bufferSize=GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, 0, NULL, &identity);
++        DWORD bufferSize=GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE, &metrics, 0, NULL, &identity);
+         double scale=1.0/daddy->fontSize;
+         n_g.h_advance=metrics.gmCellIncX*scale;
+         n_g.v_advance=otm.otmTextMetrics.tmHeight*scale;
+@@ -457,7 +457,7 @@
+             doAdd=true;
+         } else {
+             std::auto_ptr<char> buffer(new char[bufferSize]);
+-            if ( GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, bufferSize, buffer.get(), &identity) <= 0 ) {
++            if ( GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE, &metrics, bufferSize, buffer.get(), &identity) <= 0 ) {
+                 // shit happened
+             } else {
+                 // Platform SDK is rubbish, read KB87115 instead
index 7ffb247..a8a3508 100644 (file)
@@ -9,7 +9,7 @@
 
 Name:           mingw32-inkscape
 Version:        20081027
-Release:        3%{?dist}
+Release:        5%{?dist}
 Summary:        MinGW Windows port of Inkscape vector graphics editor
 
 License:        LGPLv2+
@@ -27,6 +27,13 @@ Source0:        inkscape-%{version}.tar.gz
 # Rolled-up source patch, submitted upstream on 2008-10-27.
 Patch0:         mingw32-inkscape-20081027.patch
 
+# Fix the paths.
+Patch1:         mingw32-inkscape-20081027-paths.patch
+
+# This patch is only needed to run under Wine, which doesn't
+# supported getting the outline of unhinted fonts.
+Patch2:         /mingw32-inkscape-20081027-unhinted-fonts-for-wine.patch
+
 BuildArch:      noarch
 
 BuildRequires:  mingw32-filesystem >= 30
@@ -69,6 +76,8 @@ community-oriented development.
 %prep
 %setup -q -n inkscape
 %patch0 -p0
+%patch1 -p0
+%patch2 -p0
 
 ./autogen.sh
 
@@ -103,5 +112,5 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Mon Oct 27 2008 Richard W.M. Jones <rjones@redhat.com> - 20081027-3
+* Mon Oct 27 2008 Richard W.M. Jones <rjones@redhat.com> - 20081027-5
 - Initial RPM release.