diff --git a/.travis.yml b/.travis.yml
index 4d9f44eb5..51d64362e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: c
-dist: trusty
+group: travis_latest
sudo: false
os:
@@ -9,6 +9,7 @@ os:
addons:
apt:
packages:
+ - libpango1.0-dev
- libgif-dev
- xvfb
- autoconf
@@ -20,7 +21,7 @@ addons:
- git
install:
-- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install glib cairo libexif; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install glib cairo pango libexif; fi
script:
- set -e
diff --git a/README.md b/README.md
index f276e9aa1..611851a3c 100644
--- a/README.md
+++ b/README.md
@@ -66,9 +66,9 @@ Run the following command from the root of the repository:
make install
-### Optional build options [UNSUPPORTED]
+### Optional build options
--with-pango
This builds libgdiplus using Pango to render (measure and draw)
- all of it's text. This requires Pango version 1.10 (or later).
+ all of it's text. This requires Pango version 1.38 (or later).
diff --git a/configure.ac b/configure.ac
index 9e0381b4f..fdc125f43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,8 +28,8 @@ GDIPLUS_CFLAGS="`$PKG_CONFIG --cflags glib-2.0 `"
CAIRO_REQUIRED_VERSION="1.6.4"
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
-# Optional use (experimental and unsupported) of Pango's text rendering on top of Cairo
-AC_ARG_WITH(pango, [ --with-pango],[text_v=pango],[text_v=cairo])
+# Optional use of Pango's text rendering on top of Cairo
+AC_ARG_WITH(pango, [ --with-pango use Pango to measure and draw text],[text_v=pango],[text_v=default])
GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -std=gnu99"
@@ -44,12 +44,18 @@ CAIRO_CFLAGS="`pkg-config --cflags cairo `"
cairo_info="`pkg-config --modversion cairo ` (system)"
GDIPLUS_PKG_REQ="cairo"
+PANGO_REQUIRED_VERSION="1.38"
+if test $text_v = "pango"; then
+ PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
+fi
+if test $text_v = "default"; then
+ PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION,
+ [text_v=pango], [text_v=cairo])
+fi
if test $text_v = "pango"; then
- PANGO_REQUIRED_VERSION="1.10"
- PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
PANGO_LIBS="`pkg-config --libs pangocairo `"
PANGO_CFLAGS="`pkg-config --cflags pangocairo `"
- AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text (INCOMPLETE and UNSUPPORTED)])
+ AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text])
GDIPLUS_PKG_REQ="$GDIPLUS_PKG_REQ pangocairo-1.0"
fi
diff --git a/src/libgdiplus.vcxproj b/src/libgdiplus.vcxproj
index 147917538..d8a2b5854 100644
--- a/src/libgdiplus.vcxproj
+++ b/src/libgdiplus.vcxproj
@@ -87,7 +87,7 @@
- HAVE_LIBGIF;HAVE_LIBJPEG;HAVE_LIBTIFF;HAVE_LIBPNG;HAVE_FCFINI;_WINDLL;WIN32;%(PreprocessorDefinitions)
+ HAVE_LIBGIF;HAVE_LIBJPEG;HAVE_LIBTIFF;HAVE_LIBPNG;HAVE_FCFINI;USE_PANGO_RENDERING;_WINDLL;WIN32;%(PreprocessorDefinitions)
Cdecl
$(ProjectDir)..\;%(AdditionalIncludeDirectories)