summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-09-29 07:48:36 +0000
committertavmjong-free <tavmjong@free.fr>2014-09-29 07:48:36 +0000
commitd046b5de4695a3c1ab5498a6198fe358ba069c5b (patch)
treed2fd659c9ee2350db4b43ba2d4ff20307ea88aca
parentA little fix in fillet-chamfer to hide knot helper path at hide the knots (diff)
downloadinkscape-d046b5de4695a3c1ab5498a6198fe358ba069c5b.tar.gz
inkscape-d046b5de4695a3c1ab5498a6198fe358ba069c5b.zip
Conditionally add 'semilight' due to changes in Pango 1.36.6.
(bzr r13341.1.231)
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/libnrtype/FontInstance.cpp4
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp3
-rw-r--r--src/libnrtype/font-lister.cpp5
4 files changed, 16 insertions, 0 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index c5e68e264..bc0f65346 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -933,6 +933,10 @@ font_instance *font_factory::Face(char const *family, NRTypePosDef apos)
pango_font_description_set_weight(temp_descr, PANGO_WEIGHT_ULTRALIGHT);
} else if ( apos.weight <= NR_POS_WEIGHT_LIGHT ) {
pango_font_description_set_weight(temp_descr, PANGO_WEIGHT_LIGHT);
+#if PANGO_VERSION_CHECK(1,36,6)
+ } else if ( apos.weight <= NR_POS_WEIGHT_SEMILIGHT ) {
+ pango_font_description_set_weight(temp_descr, PANGO_WEIGHT_SEMILIGHT);
+#endif
} else if ( apos.weight <= NR_POS_WEIGHT_BOOK ) {
pango_font_description_set_weight(temp_descr, PANGO_WEIGHT_BOOK);
} else if ( apos.weight <= NR_POS_WEIGHT_NORMAL ) {
diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp
index 20eca6740..ce4c99ef7 100644
--- a/src/libnrtype/FontInstance.cpp
+++ b/src/libnrtype/FontInstance.cpp
@@ -311,6 +311,10 @@ unsigned int font_instance::Attribute(const gchar *key, gchar *str, unsigned int
res=(char*)"200";
} else if ( v <= PANGO_WEIGHT_LIGHT ) {
res=(char*)"300";
+#if PANGO_VERSION_CHECK(1,36,6)
+ } else if ( v <= PANGO_WEIGHT_SEMILIGHT ) {
+ res=(char*)"350";
+#endif
} else if ( v <= PANGO_WEIGHT_BOOK ) {
res=(char*)"380";
} else if ( v <= PANGO_WEIGHT_NORMAL ) {
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index 77534e706..61a141cc3 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -511,6 +511,9 @@ static char const *weight_to_text(PangoWeight w)
case PANGO_WEIGHT_THIN : return "thin";
case PANGO_WEIGHT_ULTRALIGHT: return "ultralight";
case PANGO_WEIGHT_LIGHT : return "light";
+#if PANGO_VERSION_CHECK(1,36,6)
+ case PANGO_WEIGHT_SEMILIGHT : return "semilight";
+#endif
case PANGO_WEIGHT_BOOK : return "book";
case PANGO_WEIGHT_NORMAL : return "normalweight";
case PANGO_WEIGHT_MEDIUM : return "medium";
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 6f25ab5f9..c6d7327f6 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -648,6 +648,11 @@ void FontLister::fill_css(SPCSSAttr *css, Glib::ustring fontspec)
case PANGO_WEIGHT_LIGHT:
sp_repr_css_set_property(css, "font-weight", "300");
break;
+#if PANGO_VERSION_CHECK(1,36,6)
+ case PANGO_WEIGHT_SEMILIGHT:
+ sp_repr_css_set_property(css, "font-weight", "350");
+ break;
+#endif
case PANGO_WEIGHT_BOOK:
sp_repr_css_set_property(css, "font-weight", "380");
break;