From e59c4560863f17eef95dec77ce8176a1b22b22fa Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 17 Apr 2010 16:07:58 -0700 Subject: [PATCH] Temp build-break workaround for systems with Pango older than 1.24. --- src/libnrtype/FontFactory.cpp | 7 +++++++ src/libnrtype/FontInstance.cpp | 7 +++++++ src/libnrtype/Layout-TNG-Output.cpp | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 83b9bf9d1..067254b9e 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -22,6 +22,13 @@ #include "libnrtype/font-instance.h" #include "util/unordered-containers.h" +#if !PANGO_VERSION_CHECK(1,24,0) +#define PANGO_WEIGHT_THIN static_cast(100) +#define PANGO_WEIGHT_BOOK static_cast(380) +#define PANGO_WEIGHT_MEDIUM static_cast(500) +#define PANGO_WEIGHT_ULTRAHEAVY static_cast(1000) +#endif + typedef INK_UNORDERED_MAP FaceMapType; // need to avoid using the size field diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index 1b02ace23..7b16ae9b2 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -28,6 +28,13 @@ #include "livarot/Path.h" #include "util/unordered-containers.h" +#if !PANGO_VERSION_CHECK(1,24,0) +#define PANGO_WEIGHT_THIN static_cast(100) +#define PANGO_WEIGHT_BOOK static_cast(380) +#define PANGO_WEIGHT_MEDIUM static_cast(500) +#define PANGO_WEIGHT_ULTRAHEAVY static_cast(1000) +#endif + struct font_style_hash : public std::unary_function { size_t operator()(font_style const &x) const; diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp index 0d2b7647d..f34b93d6e 100644 --- a/src/libnrtype/Layout-TNG-Output.cpp +++ b/src/libnrtype/Layout-TNG-Output.cpp @@ -24,6 +24,13 @@ #include "display/curve.h" #include <2geom/pathvector.h> +#if !PANGO_VERSION_CHECK(1,24,0) +#define PANGO_WEIGHT_THIN static_cast(100) +#define PANGO_WEIGHT_BOOK static_cast(380) +#define PANGO_WEIGHT_MEDIUM static_cast(500) +#define PANGO_WEIGHT_ULTRAHEAVY static_cast(1000) +#endif + namespace Inkscape { namespace Extension { namespace Internal { -- 2.30.2