Code

Correct #endif placement. Should fix win32 build.
[inkscape.git] / src / libnrtype / Layout-TNG-Output.cpp
index d25eb039d34b4872a73370c606563ecd8bcad222..f34b93d6efaad7da92f85e0ae65c96d3d2fdcd8f 100644 (file)
 #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 {
@@ -117,10 +124,10 @@ void Layout::getBoundingBox(NRRect *bounding_box, Geom::Matrix const &transform,
         Geom::Matrix total_transform = glyph_matrix;
         total_transform *= transform;
         if(_glyphs[glyph_index].span(this).font) {
-           Geom::OptRect glyph_rect = _glyphs[glyph_index].span(this).font->BBox(_glyphs[glyph_index].glyph);
+            Geom::OptRect glyph_rect = _glyphs[glyph_index].span(this).font->BBox(_glyphs[glyph_index].glyph);
             if (glyph_rect) {
-               Geom::Point bmi = glyph_rect->min(), bma = glyph_rect->max();
-               Geom::Point tlp(bmi[0],bmi[1]), trp(bma[0],bmi[1]), blp(bmi[0],bma[1]), brp(bma[0],bma[1]);
+                Geom::Point bmi = glyph_rect->min(), bma = glyph_rect->max();
+                Geom::Point tlp(bmi[0],bmi[1]), trp(bma[0],bmi[1]), blp(bmi[0],bma[1]), brp(bma[0],bma[1]);
                 tlp *= total_transform;
                 trp *= total_transform;
                 blp *= total_transform;
@@ -133,7 +140,7 @@ void Layout::getBoundingBox(NRRect *bounding_box, Geom::Matrix const &transform,
                 if ( (glyph_rect->min())[1] < bounding_box->y0 ) bounding_box->y0=(glyph_rect->min())[1];
                 if ( (glyph_rect->max())[1] > bounding_box->y1 ) bounding_box->y1=(glyph_rect->max())[1];
             }
-       }
+        }
     }
 }