diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-04-17 23:07:58 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-04-17 23:07:58 +0000 |
| commit | 47a999e560e80d9c71041c538d9a12dd72058ac3 (patch) | |
| tree | 8d590b5079b85696ec99e068a19c892fc42580e8 /src/libnrtype | |
| parent | Whitespace and brace cleanup. Minor refactoring of font_style_equal. (diff) | |
| download | inkscape-47a999e560e80d9c71041c538d9a12dd72058ac3.tar.gz inkscape-47a999e560e80d9c71041c538d9a12dd72058ac3.zip | |
Temp build-break workaround for systems with Pango older than 1.24.
(bzr r9346)
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 7 | ||||
| -rw-r--r-- | src/libnrtype/FontInstance.cpp | 7 | ||||
| -rw-r--r-- | src/libnrtype/Layout-TNG-Output.cpp | 7 |
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 { |
