summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libnrtype/FontFactory.cpp7
-rw-r--r--src/libnrtype/FontInstance.cpp7
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp7
3 files changed, 21 insertions, 0 deletions
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<PangoWeight>(100)
+#define PANGO_WEIGHT_BOOK static_cast<PangoWeight>(380)
+#define PANGO_WEIGHT_MEDIUM static_cast<PangoWeight>(500)
+#define PANGO_WEIGHT_ULTRAHEAVY static_cast<PangoWeight>(1000)
+#endif
+
typedef INK_UNORDERED_MAP<PangoFontDescription*, font_instance*, font_descr_hash, font_descr_equal> 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<PangoWeight>(100)
+#define PANGO_WEIGHT_BOOK static_cast<PangoWeight>(380)
+#define PANGO_WEIGHT_MEDIUM static_cast<PangoWeight>(500)
+#define PANGO_WEIGHT_ULTRAHEAVY static_cast<PangoWeight>(1000)
+#endif
+
struct font_style_hash : public std::unary_function<font_style, size_t> {
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<PangoWeight>(100)
+#define PANGO_WEIGHT_BOOK static_cast<PangoWeight>(380)
+#define PANGO_WEIGHT_MEDIUM static_cast<PangoWeight>(500)
+#define PANGO_WEIGHT_ULTRAHEAVY static_cast<PangoWeight>(1000)
+#endif
+
namespace Inkscape {
namespace Extension {
namespace Internal {