From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Tue, 28 Oct 2008 11:09:55 +0000 (+0000) Subject: Fix paths and fonts. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=ff27b60fd4e35ca737a0da606560456ca6442cae;hp=102dd06b4f0b79c0817d9260ef345f80f0d6619b;p=fedora-mingw.git Fix paths and fonts. --- diff --git a/inkscape/mingw32-inkscape-20081027-paths.patch b/inkscape/mingw32-inkscape-20081027-paths.patch new file mode 100644 index 0000000..61aaecb --- /dev/null +++ b/inkscape/mingw32-inkscape-20081027-paths.patch @@ -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 index 0000000..e2f6083 --- /dev/null +++ b/inkscape/mingw32-inkscape-20081027-unhinted-fonts-for-wine.patch @@ -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 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 diff --git a/inkscape/mingw32-inkscape.spec b/inkscape/mingw32-inkscape.spec index 7ffb247..a8a3508 100644 --- a/inkscape/mingw32-inkscape.spec +++ b/inkscape/mingw32-inkscape.spec @@ -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 - 20081027-3 +* Mon Oct 27 2008 Richard W.M. Jones - 20081027-5 - Initial RPM release.