summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-09-29 07:24:40 +0000
committertavmjong-free <tavmjong@free.fr>2014-09-29 07:24:40 +0000
commit538b22b4d5738d8232ad2ef685fb60a22a80118a (patch)
tree110afbd2748420504873227f7d84e67f14e68335 /src
parenttransform text in text-on-path the same regardless of whether optimized or pr... (diff)
downloadinkscape-538b22b4d5738d8232ad2ef685fb60a22a80118a.tar.gz
inkscape-538b22b4d5738d8232ad2ef685fb60a22a80118a.zip
Conditionally add 'semilight' due to changes in Pango 1.36.6. Curse Behdad.
(bzr r13567)
Diffstat (limited to 'src')
-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 6859a4a5c..2b7e1fa0c 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -857,6 +857,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 43c3045b1..716f3c80a 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -623,6 +623,11 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::new_font_family (Glib::ustri
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;