texlive[44648] Build/source/libs: cairo 1.14.10

commits+kakuto at tug.org commits+kakuto at tug.org
Tue Jun 20 03:32:25 CEST 2017


Revision: 44648
          http://tug.org/svn/texlive?view=revision&revision=44648
Author:   kakuto
Date:     2017-06-20 03:32:24 +0200 (Tue, 20 Jun 2017)
Log Message:
-----------
cairo 1.14.10

Modified Paths:
--------------
    trunk/Build/source/libs/README
    trunk/Build/source/libs/cairo/ChangeLog
    trunk/Build/source/libs/cairo/README
    trunk/Build/source/libs/cairo/TLpatches/ChangeLog
    trunk/Build/source/libs/cairo/TLpatches/TL-Changes
    trunk/Build/source/libs/cairo/cairo-src/NEWS
    trunk/Build/source/libs/cairo/cairo-src/RELEASING
    trunk/Build/source/libs/cairo/cairo-src/cairo-version.h
    trunk/Build/source/libs/cairo/cairo-src/config.h.in
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-cff-subset.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-ft-font.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-image-info.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-operators.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-surface.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-ps-surface.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets-private.h
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-surface.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-truetype-subset.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-xcb-surface.c
    trunk/Build/source/libs/cairo/cairo-src/src/cairo-xlib-surface.c
    trunk/Build/source/libs/cairo/configure
    trunk/Build/source/libs/cairo/version.ac

Added Paths:
-----------
    trunk/Build/source/libs/cairo/cairo-src/build/aclocal.gtk-doc.m4

Removed Paths:
-------------
    trunk/Build/source/libs/cairo/cairo-src/build/gtk-doc.m4

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/README	2017-06-20 01:32:24 UTC (rev 44648)
@@ -9,7 +9,7 @@
 
 See also comments in ../texk/README.
 
-cairo 1.14.8 - checked 09dec16
+cairo 1.14.10 - checked 20jun17
   http://cairographics.org/releases/
 
 freetype2 2.7.1 - checked 30dec16

Modified: trunk/Build/source/libs/cairo/ChangeLog
===================================================================
--- trunk/Build/source/libs/cairo/ChangeLog	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/ChangeLog	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,3 +1,8 @@
+2017-06-20  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import cairo-1.14.10.
+	* version.ac: Adapted.
+
 2016-12-09  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import cairo-1.14.8.

Modified: trunk/Build/source/libs/cairo/README
===================================================================
--- trunk/Build/source/libs/cairo/README	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/README	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,4 +1,4 @@
-	Building cairo-1.14.8 as part of the TL tree
+	Building cairo-1.14.10 as part of the TL tree
 	============================================
 
 This directory libs/cairo/ uses a proxy Makefile.am to build the cairo

Modified: trunk/Build/source/libs/cairo/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/cairo/TLpatches/ChangeLog	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/TLpatches/ChangeLog	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,3 +1,7 @@
+2017-06-20  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import cairo-1.14.10.
+
 2016-12-09  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import cairo-1.14.8.

Modified: trunk/Build/source/libs/cairo/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/cairo/TLpatches/TL-Changes	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/TLpatches/TL-Changes	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,5 +1,5 @@
-Changes applied to the cairo-1.14.8/ tree as obtained from:
-	http://cairographics.org/releases/cairo-1.14.8.tar.xz
+Changes applied to the cairo-1.14.10/ tree as obtained from:
+	http://cairographics.org/releases/cairo-1.14.10.tar.xz
 
 Removed:
 	Makefile.in

Modified: trunk/Build/source/libs/cairo/cairo-src/NEWS
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/NEWS	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/NEWS	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,3 +1,60 @@
+Release 1.14.10   (2017-06-13  Bryce Harrington <bryce at osg.samsung.com>)
+========================================================================
+Bugfix release rolling up backported fixes for the past half year.
+
+For a complete log of changes since 1.14.8, please see:
+
+    http://cairographics.org/releases/ChangeLog.cairo-1.14.10
+
+
+Features
+--------
+None
+
+API Changes
+-----------
+None
+
+Dependency Changes
+------------------
+None
+
+Performance Optimizations
+-------------------------
+None
+
+Bug Fixes
+---------
+* Clarify documentation	regarding device scale inheritance and the units
+  used in cairo_surface_create_similar_image.
+  Bug #99094.
+
+* Fix error reporting in the xcb backend if fallback fails.  Instead of
+  returning NULL when the X11 server can't do some operation, return a
+  surface in an error state.
+
+* Call XSync in the xlib backend before setting the error handler to
+  ignore errors for certain requests, to make sure all pending errors
+  are handled first.
+
+* For opentype fonts, always use gid to lookup glyph.
+
+* If glyph 0 used for rendering, remap to different index.
+
+* Set font size to em size when retrieving unhinted metrics.
+
+* Flush ASCII85Decode file after use with Postscript files.
+
+* pdf: Don't fail subsetting if unable to convert utf8 to utf16.
+
+* For truetype, reverse cmap search should end when 0xffff- 0xffff range
+  reached.
+
+* Fix bug in line wrapping with the PDF operators.
+
+* Fix an off by one check in cairo-image-info.c.
+
+
 Release 1.14.8    (2016-12-07  Bryce Harrington <bryce at osg.samsung.com>)
 ========================================================================
 Bugfix release rolling up backported fixes for the past year.

Modified: trunk/Build/source/libs/cairo/cairo-src/RELEASING
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/RELEASING	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/RELEASING	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,11 +1,12 @@
 Here are the steps to follow to create a new cairo release:
 
-1) Ensure that there are no local, uncommitted/unpushed
-   modifications. You're probably in a good state if both "git diff
-   HEAD" and "git log master..origin/master" give no output.  Also make
-   sure you have libglib2.0-doc installed (else you'll get excessive
-   gtk-doc cross reference warnings in the next step).
+1) Ensure that there are no local, uncommitted/unpushed mods.
 
+	You're probably in a good state if both "git diff
+	HEAD" and "git log master..origin/master" give no output.  Also make
+	sure you have libglib2.0-doc installed (else you'll get
+	excessive gtk-doc cross reference warnings in the next step).
+
 2) Verify that the code passes "make distcheck"
 
 	First, make sure you have 'nm' and 'readelf' commands in PATH.
@@ -37,20 +38,53 @@
 	suite passing, here's the magic env vars to set when doing
 	'make distcheck' and 'make release-publish' that will let you
 	get away with it.  At any cost, never ever release without
-	(implied) distchecking.  Every time we got around it, it turned
+	(implied) distchecking.	 Every time we got around it, it turned
 	out to be a disaster.  Anyway, here's the pass code:
 
 		DISPLAY= CAIRO_TEST_TARGET=" "
 
-3) Fill out an entry in the NEWS file
+3) Decide what the new version number for the release will be.
 
+	There are three types of releases:  Minor, Micro, and
+	Snapshot.  Micro releases should be only bugfixes and no API
+	additions.  If there are API additions consider making a Minor
+	release.  Snapshot releases can be done of the current
+	development tree between Minor releases, as desired.
+
+	Cairo uses even numbers for official releases, and odd numbers
+	for development snapshots.  Thus, for a Minor release it would
+	be:
+
+		LAST_RELEASE="X.Y.Z"     # e.g. 1.12.0
+		THIS_RELEASE="X.Y+2.0"	 # e.g. 1.14.0
+
+	While for a Micro release the version numbers should be:
+
+		LAST_RELEASE="X.Y.Z"     # e.g. 1.14.0
+		THIS_RELEASE="X.Y.Z+2"   # e.g. 1.14.2
+
+	Snapshots are similar but have odd minor versions.  Also, the
+	first snapshot release in a new series will be .2 rather than
+	.0, e.g.:
+
+		LAST_RELEASE="X.Y.Z"     # e.g. 1.14.0
+		THIS_RELEASE="X.Y+1.0"   # e.g. 1.15.2
+
+	and subsequent snapshots in that series are just normal micro
+	releases:
+
+		LAST_RELEASE="X.Y.Z"     # e.g. 1.15.2
+		THIS_RELEASE="X.Y.Z+2"   # e.g. 1.15.4
+
+
+
+4) Fill out an entry in the NEWS file
+
 	Sift through the logs since the last release. This is most
 	easily done with a command such as:
 
-		git log --stat X.Y.Z..
+		git log --stat ${LAST_RELEASE}..
 
-	where X.Y.Z is the previous release version.
-
 	Summarize major changes briefly in a style similar to other
 	entries in NEWS. Take special care to note any additions in
 	the API. These should be easy to find by noting modifications
@@ -58,9 +92,15 @@
 	the following command will show each patch that has changed a
 	public header file since the given version:
 
-		find src/ -name '*.h' ! -name '*-private.h' ! -name 'cairoint.h' ! -name 'cairo-*features*.h' | \
-		xargs git diff X.Y.Z.. --
+		find src/ -name '*.h' ! -name '*-private.h' \
+		  ! -name 'cairoint.h' ! -name 'cairo-*features*.h' | \
+		xargs git diff ${LAST_RELEASE}.. --
 
+	Include a link to the incremental ChangeLog for this release,
+	which we'll be uploading in a later step:
+
+		http://cairographics.org/releases/ChangeLog.cairo-${THIS_RELEASE}
+
 4) Increment cairo_version_{minor|micro} in cairo-version.h:
 
 	If there are backward-incompatible changes in the API, stop
@@ -95,11 +135,11 @@
 	* Sign the sha1sum using your GPG setup (asks for your GPG password)
 	* scp the three files to appear on http://cairographics.org/releases
 	* Generate a versioned manual and upload it to appear as both:
-	  http://cairographics.org/manual-X.Y.Z
+	  http://cairographics.org/manual-${THIS_RELEASE}
 	  http://cairographics.org/manual
 	* Place local copies of the three files in the releases directory
 	* Create a LATEST-package-version file (after deleting any old one)
-	* Tag the entire source tree with a tag of the form X.Y.Z, and sign
+	* Tag the entire source tree with a ${THIS_RELEASE} tag, and sign
 	  the tag with your GPG key (asks for your GPG password, and you
 	  may need to set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to match
 	  your public-key's setting or this fails.)
@@ -107,32 +147,47 @@
 	  If for some reason you lost this message, "make release-publish-message"
 	  prints it for you.
 
-7) Increment cairo_version_micro to the next larger (odd) number in
-   cairo-version.h, commit, and push.
+	Upload the incremental ChangeLog generated by the above:
 
-8) Push the newly created tag out to the central tree with a command
-   something like:
+		scp ChangeLog.cache-${LAST_RELEASE}.. \
+		    cairographics.org:/srv/cairo.freedesktop.org/www/releases/ChangeLog.cairo-${THIS_RELEASE}
 
-	git push origin master X.Y.Z
+	To undo a release-publish, before you've sent any emails or
+	pushed changes to master, delete the locally created tag (git
+	tag -d ${THIS_RELEASE}); then log into the webserver, repoint
+	the manual and LATEST-cairo-${THIS_RELEASE} symlinks to the
+	previous versions, remove manual-${THIS_RELEASE} and
+	release/cairo-${THIS_RELEASE}.
 
-9) Edit the cairo bugzilla product and add the new version numbers. Note
-   that you need to add two versions.  One for the release/snapshot (with
-   an even micro version), another with the post-release version (with an
-   odd micro version).
+7) Update trunk (or the stable branch) version number.
 
-10) Send a message to cairo-announce at cairographics.org and CC
-    cairo at cairographics.org, gnome-announce-list at gnome.org and
-    ftp-release at lists.freedesktop.org (pr at lwn.net as well for major
-    releases) to announce the new release using the text provided from
-    "make release-publish", adding the excerpt from NEWS, your
-    signature, followed by the standard "What is cairo" and "Where to
-    get more information about cairo" blurbs from README, and finally
-    the shortlog of all changes since last release, generated by:
+	For Micro releases (X.Y.Z), increment cairo_version_micro to the
+	next larger (odd) number in cairo-version.h, commit, and push.
 
-	git shortlog X.Y.Z...
+	For Minor releases (X.Y.0), increment cairo_version_minor to the
+	next larger (odd) number, and set cairo_version_micro to 1.  Then
+	commit and push.
 
-    where X.Y.Z is the last released version.
+8) Push the new tag out to the central tree with a command like:
 
-11) Edit the cairo wiki to add the announcement to the NEWS page and
-    the front page. (just the parts before your signature).
+	git push origin master ${THIS_RELEASE}
 
+9) Edit the cairo bugzilla product and add the new version numbers.
+
+	Note that you need to add two versions.  One for the
+	release/snapshot (with an even micro version), another with the
+	post-release version (with an odd micro version).
+
+10) Send out an announcement message.
+
+	Send a message to cairo-announce at cairographics.org and CC
+	cairo at cairographics.org, gnome-announce-list at gnome.org and
+	ftp-release at lists.freedesktop.org (pr at lwn.net as well for major
+	releases) to announce the new release using the text provided from
+	"make release-publish", adding the excerpt from NEWS and
+	the shortlog of all changes since last release, generated by:
+
+		git shortlog ${LAST_RELEASE}...
+
+11) Add the announcement to the NEWS page and the front page.
+

Added: trunk/Build/source/libs/cairo/cairo-src/build/aclocal.gtk-doc.m4
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/build/aclocal.gtk-doc.m4	                        (rev 0)
+++ trunk/Build/source/libs/cairo/cairo-src/build/aclocal.gtk-doc.m4	2017-06-20 01:32:24 UTC (rev 44648)
@@ -0,0 +1,39 @@
+dnl -*- mode: autoconf -*-
+
+# serial 1
+
+dnl Usage:
+dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
+AC_DEFUN([GTK_DOC_CHECK],
+[
+  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+  dnl for overriding the documentation installation directory
+  AC_ARG_WITH([html-dir],
+    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+    [with_html_dir='${datadir}/gtk-doc/html'])
+  HTML_DIR="$with_html_dir"
+  AC_SUBST([HTML_DIR])
+
+  dnl enable/disable documentation building
+  AC_ARG_ENABLE([gtk-doc],
+    AS_HELP_STRING([--enable-gtk-doc],
+                   [use gtk-doc to build documentation [[default=no]]]),,
+    [enable_gtk_doc=no])
+
+  if test x$enable_gtk_doc = xyes; then
+    ifelse([$1],[],
+      [PKG_CHECK_EXISTS([gtk-doc],,
+                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
+      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
+                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
+  fi
+
+  AC_MSG_CHECKING([whether to build gtk-doc documentation])
+  AC_MSG_RESULT($enable_gtk_doc)
+
+  AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
+
+  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
+  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
+])

Deleted: trunk/Build/source/libs/cairo/cairo-src/build/gtk-doc.m4
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/build/gtk-doc.m4	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/build/gtk-doc.m4	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,88 +0,0 @@
-dnl -*- mode: autoconf -*-
-
-# serial 2
-
-dnl Usage:
-dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-AC_DEFUN([GTK_DOC_CHECK],
-[
-  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-
-  ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
-  AC_MSG_CHECKING([for gtk-doc])
-  PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
-  AC_MSG_RESULT($have_gtk_doc)
-
-  if test "$have_gtk_doc" = "no"; then
-      AC_MSG_WARN([
-  You will not be able to create source packages with 'make dist'
-  because $gtk_doc_requires is not found.])
-  fi
-
-  dnl check for tools we added during development
-  dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
-  dnl may not be writable by the user. Currently, automake requires that the
-  dnl test name must end in '.test'.
-  dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
-  AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
-  AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
-  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
-  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
-
-  dnl for overriding the documentation installation directory
-  AC_ARG_WITH([html-dir],
-    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
-    [with_html_dir='${datadir}/gtk-doc/html'])
-  HTML_DIR="$with_html_dir"
-  AC_SUBST([HTML_DIR])
-
-  dnl enable/disable documentation building
-  AC_ARG_ENABLE([gtk-doc],
-    AS_HELP_STRING([--enable-gtk-doc],
-                   [use gtk-doc to build documentation [[default=no]]]),,
-    [enable_gtk_doc=no])
-
-  AC_MSG_CHECKING([whether to build gtk-doc documentation])
-  AC_MSG_RESULT($enable_gtk_doc)
-
-  if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
-    AC_MSG_ERROR([
-  You must have $gtk_doc_requires installed to build documentation for
-  $PACKAGE_NAME. Please install gtk-doc or disable building the
-  documentation by adding '--disable-gtk-doc' to '[$]0'.])
-  fi
-
-  dnl don't check for glib if we build glib
-  if test "x$PACKAGE_NAME" != "xglib"; then
-    dnl don't fail if someone does not have glib
-    PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
-  fi
-
-  dnl enable/disable output formats
-  AC_ARG_ENABLE([gtk-doc-html],
-    AS_HELP_STRING([--enable-gtk-doc-html],
-                   [build documentation in html format [[default=yes]]]),,
-    [enable_gtk_doc_html=yes])
-    AC_ARG_ENABLE([gtk-doc-pdf],
-      AS_HELP_STRING([--enable-gtk-doc-pdf],
-                     [build documentation in pdf format [[default=no]]]),,
-      [enable_gtk_doc_pdf=no])
-
-  if test -z "$GTKDOC_MKPDF"; then
-    enable_gtk_doc_pdf=no
-  fi
-
-  if test -z "$AM_DEFAULT_VERBOSITY"; then
-    AM_DEFAULT_VERBOSITY=1
-  fi
-  AC_SUBST([AM_DEFAULT_VERBOSITY])
-
-  AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
-  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
-  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
-  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
-  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
-  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
-])

Modified: trunk/Build/source/libs/cairo/cairo-src/cairo-version.h
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/cairo-version.h	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/cairo-version.h	2017-06-20 01:32:24 UTC (rev 44648)
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 14
-#define CAIRO_VERSION_MICRO 8
+#define CAIRO_VERSION_MICRO 10
 
 #endif

Modified: trunk/Build/source/libs/cairo/cairo-src/config.h.in
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/config.h.in	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/config.h.in	2017-06-20 01:32:24 UTC (rev 44648)
@@ -291,8 +291,7 @@
 /* Define to 1 if shared memory segments are released deferred. */
 #undef IPC_RMID_DEFERRED_RELEASE
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
 /* Define to the address where bug reports for this package should be sent. */

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-cff-subset.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-cff-subset.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-cff-subset.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1780,7 +1780,7 @@
 
     font->subset_subroutines = TRUE;
     for (i = 0; i < font->scaled_font_subset->num_glyphs; i++) {
-	if (font->is_cid) {
+	if (font->is_cid && !font->is_opentype) {
 	    cid = font->scaled_font_subset->glyphs[i];
 	    status = cairo_cff_font_get_gid_for_cid (font, cid, &glyph);
 	    if (unlikely (status))
@@ -1847,11 +1847,15 @@
 
     font->num_subset_fontdicts = 0;
     for (i = 0; i < font->scaled_font_subset->num_glyphs; i++) {
-	cid = font->scaled_font_subset->glyphs[i];
-	status = cairo_cff_font_get_gid_for_cid (font, cid, &gid);
-	if (unlikely (status)) {
-	    free (reverse_map);
-	    return status;
+	if (font->is_opentype) {
+	    gid = font->scaled_font_subset->glyphs[i];
+	} else {
+	    cid = font->scaled_font_subset->glyphs[i];
+	    status = cairo_cff_font_get_gid_for_cid (font, cid, &gid);
+	    if (unlikely (status)) {
+		free (reverse_map);
+		return status;
+	    }
 	}
 
         fd = font->fdselect[gid];

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-ft-font.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-ft-font.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-ft-font.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -2206,6 +2206,55 @@
 }
 
 static cairo_int_status_t
+_cairo_ft_scaled_glyph_load_glyph (cairo_ft_scaled_font_t *scaled_font,
+				   cairo_scaled_glyph_t   *scaled_glyph,
+				   FT_Face                 face,
+				   int                     load_flags,
+				   cairo_bool_t            use_em_size,
+				   cairo_bool_t            vertical_layout)
+{
+    FT_Error error;
+    cairo_status_t status;
+
+    if (use_em_size) {
+	cairo_matrix_t em_size;
+	cairo_matrix_init_scale (&em_size, face->units_per_EM, face->units_per_EM);
+	status = _cairo_ft_unscaled_font_set_scale (scaled_font->unscaled, &em_size);
+    } else {
+	status = _cairo_ft_unscaled_font_set_scale (scaled_font->unscaled,
+						    &scaled_font->base.scale);
+    }
+    if (unlikely (status))
+	return status;
+
+    error = FT_Load_Glyph (face,
+			   _cairo_scaled_glyph_index(scaled_glyph),
+			   load_flags);
+    /* XXX ignoring all other errors for now.  They are not fatal, typically
+     * just a glyph-not-found. */
+    if (error == FT_Err_Out_Of_Memory)
+	return  _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
+    /*
+     * synthesize glyphs if requested
+     */
+#if HAVE_FT_GLYPHSLOT_EMBOLDEN
+    if (scaled_font->ft_options.synth_flags & CAIRO_FT_SYNTHESIZE_BOLD)
+	FT_GlyphSlot_Embolden (face->glyph);
+#endif
+
+#if HAVE_FT_GLYPHSLOT_OBLIQUE
+    if (scaled_font->ft_options.synth_flags & CAIRO_FT_SYNTHESIZE_OBLIQUE)
+	FT_GlyphSlot_Oblique (face->glyph);
+#endif
+
+    if (vertical_layout)
+	_cairo_ft_scaled_glyph_vertical_layout_bearing_fix (scaled_font, face->glyph);
+
+    return CAIRO_STATUS_SUCCESS;
+}
+
+static cairo_int_status_t
 _cairo_ft_scaled_glyph_init (void			*abstract_font,
 			     cairo_scaled_glyph_t	*scaled_glyph,
 			     cairo_scaled_glyph_info_t	 info)
@@ -2215,22 +2264,17 @@
     cairo_ft_unscaled_font_t *unscaled = scaled_font->unscaled;
     FT_GlyphSlot glyph;
     FT_Face face;
-    FT_Error error;
     int load_flags = scaled_font->ft_options.load_flags;
     FT_Glyph_Metrics *metrics;
     double x_factor, y_factor;
     cairo_bool_t vertical_layout = FALSE;
-    cairo_status_t status;
+    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_bool_t scaled_glyph_loaded = FALSE;
 
     face = _cairo_ft_unscaled_font_lock_face (unscaled);
     if (!face)
 	return _cairo_error (CAIRO_STATUS_NO_MEMORY);
 
-    status = _cairo_ft_unscaled_font_set_scale (scaled_font->unscaled,
-				                &scaled_font->base.scale);
-    if (unlikely (status))
-	goto FAIL;
-
     /* Ignore global advance unconditionally */
     load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
 
@@ -2261,37 +2305,23 @@
     /* load_flags |= FT_LOAD_COLOR; */
 #endif
 
-    error = FT_Load_Glyph (face,
-			   _cairo_scaled_glyph_index(scaled_glyph),
-			   load_flags);
-    /* XXX ignoring all other errors for now.  They are not fatal, typically
-     * just a glyph-not-found. */
-    if (error == FT_Err_Out_Of_Memory) {
-	status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
-	goto FAIL;
-    }
 
-    glyph = face->glyph;
+    if (info & CAIRO_SCALED_GLYPH_INFO_METRICS) {
 
-    /*
-     * synthesize glyphs if requested
-     */
-#if HAVE_FT_GLYPHSLOT_EMBOLDEN
-    if (scaled_font->ft_options.synth_flags & CAIRO_FT_SYNTHESIZE_BOLD)
-	FT_GlyphSlot_Embolden (glyph);
-#endif
+	cairo_bool_t hint_metrics = scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF;
 
-#if HAVE_FT_GLYPHSLOT_OBLIQUE
-    if (scaled_font->ft_options.synth_flags & CAIRO_FT_SYNTHESIZE_OBLIQUE)
-	FT_GlyphSlot_Oblique (glyph);
-#endif
+	status = _cairo_ft_scaled_glyph_load_glyph (scaled_font,
+						    scaled_glyph,
+						    face,
+						    load_flags,
+						    !hint_metrics,
+						    vertical_layout);
+	if (unlikely (status))
+	    goto FAIL;
 
-    if (vertical_layout)
-	_cairo_ft_scaled_glyph_vertical_layout_bearing_fix (scaled_font, glyph);
+	glyph = face->glyph;
+	scaled_glyph_loaded = hint_metrics;
 
-    if (info & CAIRO_SCALED_GLYPH_INFO_METRICS) {
-
-	cairo_bool_t hint_metrics = scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF;
 	/*
 	 * Compute font-space metrics
 	 */
@@ -2389,6 +2419,20 @@
     if ((info & CAIRO_SCALED_GLYPH_INFO_SURFACE) != 0) {
 	cairo_image_surface_t	*surface;
 
+	if (!scaled_glyph_loaded) {
+	    status = _cairo_ft_scaled_glyph_load_glyph (scaled_font,
+							scaled_glyph,
+							face,
+							load_flags,
+							FALSE,
+							vertical_layout);
+	    if (unlikely (status))
+		goto FAIL;
+
+	    glyph = face->glyph;
+	    scaled_glyph_loaded = TRUE;
+	}
+
 	if (glyph->format == FT_GLYPH_FORMAT_OUTLINE) {
 	    status = _render_glyph_outline (face, &scaled_font->ft_options.base,
 					    &surface);
@@ -2420,27 +2464,23 @@
 	 * so reload it. This will probably never occur though
 	 */
 	if ((info & CAIRO_SCALED_GLYPH_INFO_SURFACE) != 0) {
-	    error = FT_Load_Glyph (face,
-				   _cairo_scaled_glyph_index(scaled_glyph),
-				   load_flags | FT_LOAD_NO_BITMAP);
-	    /* XXX ignoring all other errors for now.  They are not fatal, typically
-	     * just a glyph-not-found. */
-	    if (error == FT_Err_Out_Of_Memory) {
-		status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
+	    scaled_glyph_loaded = FALSE;
+	    load_flags |= FT_LOAD_NO_BITMAP;
+	}
+
+	if (!scaled_glyph_loaded) {
+	    status = _cairo_ft_scaled_glyph_load_glyph (scaled_font,
+							scaled_glyph,
+							face,
+							load_flags,
+							FALSE,
+							vertical_layout);
+	    if (unlikely (status))
 		goto FAIL;
-	    }
-#if HAVE_FT_GLYPHSLOT_EMBOLDEN
-	    if (scaled_font->ft_options.synth_flags & CAIRO_FT_SYNTHESIZE_BOLD)
-		FT_GlyphSlot_Embolden (glyph);
-#endif
-#if HAVE_FT_GLYPHSLOT_OBLIQUE
-	    if (scaled_font->ft_options.synth_flags & CAIRO_FT_SYNTHESIZE_OBLIQUE)
-		FT_GlyphSlot_Oblique (glyph);
-#endif
-	    if (vertical_layout)
-		_cairo_ft_scaled_glyph_vertical_layout_bearing_fix (scaled_font, glyph);
 
+	    glyph = face->glyph;
 	}
+
 	if (glyph->format == FT_GLYPH_FORMAT_OUTLINE)
 	    status = _decompose_glyph_outline (face, &scaled_font->ft_options.base,
 					       &path);

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-image-info.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-image-info.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-image-info.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -137,7 +137,7 @@
 		break;
 	    }
 
-	    if (p + 2 > data + length)
+	    if (p + 3 > data + length)
 		return CAIRO_INT_STATUS_UNSUPPORTED;
 
 	    p = _jpeg_skip_segment (p);

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-operators.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-operators.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-operators.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -319,7 +319,8 @@
 	    if (*data == '\n' || stream->column >= stream->max_column) {
 		_cairo_output_stream_printf (stream->output, "\n");
 		stream->column = 0;
-	    } else if (*data == '<') {
+	    }
+	    if (*data == '<') {
 		stream->state = WRAP_STATE_HEXSTRING;
 	    } else if (*data == '(') {
 		stream->state = WRAP_STATE_STRING;

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-surface.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-surface.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-pdf-surface.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -4757,8 +4757,12 @@
 
     if (utf8 && *utf8) {
 	status = _cairo_utf8_to_utf16 (utf8, -1, &utf16, &utf16_len);
-	if (unlikely (status))
+	if (unlikely (status == CAIRO_INT_STATUS_INVALID_STRING)) {
+	    utf16 = NULL;
+	    utf16_len = 0;
+	} else if (unlikely (status)) {
 	    return status;
+	}
     }
 
     _cairo_output_stream_printf (surface->output, "<");
@@ -5034,13 +5038,14 @@
 	char *pdf_str;
 
 	status = _utf8_to_pdf_string (subset->family_name_utf8, &pdf_str);
-	if (unlikely (status))
+	if (likely (status == CAIRO_INT_STATUS_SUCCESS)) {
+	    _cairo_output_stream_printf (surface->output,
+					 "   /FontFamily %s\n",
+					 pdf_str);
+	    free (pdf_str);
+	} else if (status != CAIRO_INT_STATUS_INVALID_STRING) {
 	    return status;
-
-	_cairo_output_stream_printf (surface->output,
-				     "   /FontFamily %s\n",
-				     pdf_str);
-	free (pdf_str);
+	}
     }
 
     _cairo_output_stream_printf (surface->output,
@@ -5479,13 +5484,14 @@
 	char *pdf_str;
 
 	status = _utf8_to_pdf_string (subset.family_name_utf8, &pdf_str);
-	if (unlikely (status))
+	if (likely (status == CAIRO_INT_STATUS_SUCCESS)) {
+	    _cairo_output_stream_printf (surface->output,
+					 "   /FontFamily %s\n",
+					 pdf_str);
+	    free (pdf_str);
+	} else if (status != CAIRO_INT_STATUS_INVALID_STRING) {
 	    return status;
-
-	_cairo_output_stream_printf (surface->output,
-				     "   /FontFamily %s\n",
-				     pdf_str);
-	free (pdf_str);
+	}
     }
 
     _cairo_output_stream_printf (surface->output,

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-ps-surface.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-ps-surface.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-ps-surface.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -335,7 +335,10 @@
 				 "      cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def\n"
 				 "/g { setgray } bind def\n"
 				 "/rg { setrgbcolor } bind def\n"
-				 "/d1 { setcachedevice } bind def\n");
+				 "/d1 { setcachedevice } bind def\n"
+				 "/cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def\n"
+				 "/cairo_image { image cairo_flush_ascii85_file } def\n"
+				 "/cairo_imagemask { imagemask cairo_flush_ascii85_file } def\n");
 
     if (!surface->eps) {
 	_cairo_output_stream_printf (surface->final_stream,
@@ -2679,6 +2682,9 @@
 				     "] def\n");
 	_cairo_output_stream_printf (surface->stream,
 				     "/CairoImageDataIndex 0 def\n");
+    } else {
+	_cairo_output_stream_printf (surface->stream,
+				     "/cairo_ascii85_file currentfile /ASCII85Decode filter def\n");
     }
 
     if (use_mask) {
@@ -2713,7 +2719,7 @@
 					 compress_filter);
 	} else {
 	    _cairo_output_stream_printf (surface->stream,
-					 "    /DataSource currentfile /ASCII85Decode filter /%s filter def\n",
+					 "    /DataSource cairo_ascii85_file /%s filter def\n",
 					 compress_filter);
 	}
 
@@ -2767,7 +2773,7 @@
 					 compress_filter);
 	} else {
 	    _cairo_output_stream_printf (surface->stream,
-					 "  /DataSource currentfile /ASCII85Decode filter /%s filter def\n",
+					 "  /DataSource cairo_ascii85_file /%s filter def\n",
 					 compress_filter);
 	}
 
@@ -2774,8 +2780,9 @@
 	_cairo_output_stream_printf (surface->stream,
 				     "  /ImageMatrix [ 1 0 0 -1 0 %d ] def\n"
 				     "end\n"
-				     "%s\n",
+				     "%s%s\n",
 				     ps_image->height,
+				     surface->use_string_datasource ? "" : "cairo_",
 				     stencil_mask ? "imagemask" : "image");
     }
 
@@ -2865,6 +2872,9 @@
 				     "] def\n");
 	_cairo_output_stream_printf (surface->stream,
 				     "/CairoImageDataIndex 0 def\n");
+    } else {
+	_cairo_output_stream_printf (surface->stream,
+				     "/cairo_ascii85_file currentfile /ASCII85Decode filter def\n");
     }
 
     _cairo_output_stream_printf (surface->stream,
@@ -2891,14 +2901,15 @@
 				     "  } /ASCII85Decode filter /DCTDecode filter def\n");
     } else {
 	_cairo_output_stream_printf (surface->stream,
-				     "  /DataSource currentfile /ASCII85Decode filter /DCTDecode filter def\n");
+				     "  /DataSource cairo_ascii85_file /DCTDecode filter def\n");
     }
 
     _cairo_output_stream_printf (surface->stream,
 				 "  /ImageMatrix [ 1 0 0 -1 0 %d ] def\n"
 				 "end\n"
-				 "image\n",
-				 info.height);
+				 "%simage\n",
+				 info.height,
+				 surface->use_string_datasource ? "" : "cairo_");
 
     if (!surface->use_string_datasource) {
 	/* Emit the image data as a base85-encoded string which will

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets-private.h
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets-private.h	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets-private.h	2017-06-20 01:32:24 UTC (rev 44648)
@@ -730,6 +730,11 @@
 cairo_private cairo_int_status_t
 _cairo_escape_ps_name (char **ps_name);
 
+#if DEBUG_SUBSETS
+cairo_private void
+dump_scaled_font_subsets (cairo_scaled_font_subsets_t *font_subsets);
+#endif
+
 #endif /* CAIRO_HAS_FONT_SUBSET */
 
 #endif /* CAIRO_SCALED_FONT_SUBSETS_PRIVATE_H */

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-scaled-font-subsets.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -71,6 +71,7 @@
     cairo_bool_t is_composite;
     cairo_bool_t is_user;
     cairo_bool_t use_latin_subset;
+    cairo_bool_t reserve_notdef;
     cairo_scaled_font_subsets_t *parent;
     cairo_scaled_font_t *scaled_font;
     unsigned int font_id;
@@ -283,6 +284,7 @@
     sub_font->is_scaled = is_scaled;
     sub_font->is_composite = is_composite;
     sub_font->is_user = _cairo_font_face_is_user (scaled_font->font_face);
+    sub_font->reserve_notdef = !sub_font->is_user;
     _cairo_sub_font_init_key (sub_font, scaled_font);
 
     sub_font->parent = parent;
@@ -533,23 +535,8 @@
     else
 	num_glyphs_in_subset_ptr = &sub_font->num_glyphs_in_current_subset;
 
-    /* Reserve first glyph in subset for the .notdef glyph except for
-     * Type 3 fonts */
-    if (*num_glyphs_in_subset_ptr == 0 &&
-	scaled_font_glyph_index != 0 &&
-	! _cairo_font_face_is_user (sub_font->scaled_font->font_face))
-    {
-	status = _cairo_sub_font_add_glyph (sub_font,
-					    0,
-					    is_latin,
-					    0,
-					    0,
-					    NULL,
-					    -1,
-					    &sub_font_glyph);
-	if (unlikely (status))
-	    return status;
-    }
+    if ((*num_glyphs_in_subset_ptr == 0) && sub_font->reserve_notdef)
+	(*num_glyphs_in_subset_ptr)++;
 
     sub_font_glyph = _cairo_sub_font_glyph_create (scaled_font_glyph_index,
 						   is_latin ? 0 : sub_font->current_subset,
@@ -713,13 +700,26 @@
 	collection->max_glyph = 0;
 	memset (collection->latin_to_subset_glyph_index, 0, 256*sizeof(unsigned long));
 
+	if (sub_font->reserve_notdef) {
+	    // add .notdef
+	    collection->glyphs[0] = 0;
+	    collection->utf8[0] = 0;
+	    collection->to_latin_char[0] = 0;
+	    collection->latin_to_subset_glyph_index[0] = 0;
+	    collection->num_glyphs++;
+	}
+
 	_cairo_hash_table_foreach (sub_font->sub_font_glyphs,
 				   _cairo_sub_font_glyph_collect, collection);
 	if (collection->status)
 	    break;
+
 	if (collection->num_glyphs == 0)
 	    continue;
 
+	if (sub_font->reserve_notdef && collection->num_glyphs == 1)
+	    continue;
+
         /* Ensure the resulting array has no uninitialized holes */
 	assert (collection->num_glyphs == collection->max_glyph + 1);
 
@@ -1121,7 +1121,88 @@
 	return FALSE;
 }
 
+#if DEBUG_SUBSETS
+
 static void
+dump_glyph (void *entry, void *closure)
+{
+    cairo_sub_font_glyph_t *glyph = entry;
+    char buf[10];
+    int i;
+
+    printf("    font_glyph_index: %ld\n", glyph->base.hash);
+    printf("      subset_id: %d\n", glyph->subset_id);
+    printf("      subset_glyph_index: %d\n", glyph->subset_glyph_index);
+    printf("      x_advance: %f\n", glyph->x_advance);
+    printf("      y_advance: %f\n", glyph->y_advance);
+    printf("      is_latin: %d\n", glyph->is_latin);
+    printf("      latin_character: '%c' (0x%02x)\n", glyph->latin_character, glyph->latin_character);
+    printf("      is_latin: %d\n", glyph->is_latin);
+    printf("      is_mapped: %d\n", glyph->is_mapped);
+    printf("      unicode: U+%04x\n", glyph->unicode);
+    memset(buf, 0, sizeof(buf));
+    memcpy(buf, glyph->utf8, glyph->utf8_len);
+    printf("      utf8: '%s'\n", buf);
+    printf("      utf8 (hex):");
+    for (i = 0; i < glyph->utf8_len; i++)
+	printf(" 0x%02x", glyph->utf8[0]);
+    printf("\n\n");
+}
+
+static void
+dump_subfont (cairo_sub_font_t *sub_font)
+{
+    while (sub_font) {
+	printf("    font_id: %d\n", sub_font->font_id);
+	printf("    current_subset: %d\n", sub_font->current_subset);
+	printf("    is_scaled: %d\n", sub_font->is_scaled);
+	printf("    is_composite: %d\n", sub_font->is_composite);
+	printf("    is_user: %d\n", sub_font->is_user);
+	printf("    use_latin_subset: %d\n", sub_font->use_latin_subset);
+	printf("    reserve_notdef: %d\n", sub_font->reserve_notdef);
+	printf("    num_glyphs_in_current_subset: %d\n", sub_font->num_glyphs_in_current_subset);
+	printf("    num_glyphs_in_latin_subset: %d\n", sub_font->num_glyphs_in_latin_subset);
+	printf("    max_glyphs_per_subset: %d\n\n", sub_font->max_glyphs_per_subset);
+
+	_cairo_hash_table_foreach (sub_font->sub_font_glyphs, dump_glyph, NULL);
+
+	printf("\n");
+	sub_font = sub_font->next;
+    }
+}
+
+void
+dump_scaled_font_subsets (cairo_scaled_font_subsets_t *font_subsets)
+{
+    printf("font subsets\n");
+    switch (font_subsets->type)
+    {
+	case CAIRO_SUBSETS_SCALED:
+	    printf("  type: CAIRO_SUBSETS_SCALED\n");
+	    break;
+	case CAIRO_SUBSETS_SIMPLE:
+	    printf("  type: CAIRO_SUBSETS_SIMPLE\n");
+	    break;
+	case CAIRO_SUBSETS_COMPOSITE:
+	    printf("  type: CAIRO_SUBSETS_COMPOSITE\n");
+	    break;
+    }
+    printf("  use_latin_subset: %d\n", font_subsets->use_latin_subset);
+    printf("  max_glyphs_per_unscaled_subset_used: %d\n", font_subsets->max_glyphs_per_unscaled_subset_used);
+    printf("  max_glyphs_per_scaled_subset_used: %d\n", font_subsets->max_glyphs_per_scaled_subset_used);
+    printf("  num_sub_fonts: %d\n\n", font_subsets->num_sub_fonts);
+
+    printf("  scaled subsets:\n");
+    dump_subfont (font_subsets->scaled_sub_fonts_list);
+
+    printf("\n  unscaled subsets:\n");
+    dump_subfont (font_subsets->unscaled_sub_fonts_list);
+}
+
+#endif
+
+
+static void
 _cairo_string_init_key (cairo_string_entry_t *key, char *s)
 {
     unsigned long sum = 0;
@@ -1200,8 +1281,12 @@
 	utf16_len = 0;
 	if (utf8 && *utf8) {
 	    status = _cairo_utf8_to_utf16 (utf8, -1, &utf16, &utf16_len);
-	    if (unlikely (status))
+	    if (status == CAIRO_STATUS_INVALID_STRING) {
+		utf16 = NULL;
+		utf16_len = 0;
+	    } else if (unlikely (status)) {
 		goto CLEANUP_HASH;
+	    }
 	}
 
 	if (utf16_len == 1) {

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-surface.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-surface.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-surface.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -463,10 +463,11 @@
  *
  * Create a new surface that is as compatible as possible with an
  * existing surface. For example the new surface will have the same
- * fallback resolution and font options as @other. Generally, the new
- * surface will also use the same backend as @other, unless that is
- * not possible for some reason. The type of the returned surface may
- * be examined with cairo_surface_get_type().
+ * device scale, fallback resolution and font options as
+ * @other. Generally, the new surface will also use the same backend
+ * as @other, unless that is not possible for some reason. The type of
+ * the returned surface may be examined with
+ * cairo_surface_get_type().
  *
  * Initially the surface contents are all 0 (transparent if contents
  * have transparency, black otherwise.)
@@ -548,12 +549,14 @@
  * cairo_surface_create_similar_image:
  * @other: an existing surface used to select the preference of the new surface
  * @format: the format for the new surface
- * @width: width of the new surface, (in device-space units)
- * @height: height of the new surface (in device-space units)
+ * @width: width of the new surface, (in pixels)
+ * @height: height of the new surface (in pixels)
  *
  * Create a new image surface that is as compatible as possible for uploading
  * to and the use in conjunction with an existing surface. However, this surface
- * can still be used like any normal image surface.
+ * can still be used like any normal image surface. Unlike
+ * cairo_surface_create_similar() the new image surface won't inherit
+ * the device scale from @other.
  *
  * Initially the surface contents are all 0 (transparent if contents
  * have transparency, black otherwise.)

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-truetype-subset.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-truetype-subset.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-truetype-subset.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1310,11 +1310,14 @@
 
     /* search for glyph in segments with rangeOffset=0 */
     for (i = 0; i < num_segments; i++) {
+	uint16_t start = be16_to_cpu (start_code[i]);
+	uint16_t end = be16_to_cpu (end_code[i]);
+
+	if (start == 0xffff && end == 0xffff)
+	    break;
+
 	c = index - be16_to_cpu (delta[i]);
-	if (range_offset[i] == 0 &&
-	    c >= be16_to_cpu (start_code[i]) &&
-	    c <= be16_to_cpu (end_code[i]))
-	{
+	if (range_offset[i] == 0 && c >= start && c <= end) {
 	    *ucs4 = c;
 	    goto found;
 	}
@@ -1322,9 +1325,15 @@
 
     /* search for glyph in segments with rangeOffset=1 */
     for (i = 0; i < num_segments; i++) {
+	uint16_t start = be16_to_cpu (start_code[i]);
+	uint16_t end = be16_to_cpu (end_code[i]);
+
+	if (start == 0xffff && end == 0xffff)
+	    break;
+
 	if (range_offset[i] != 0) {
 	    uint16_t *glyph_ids = &range_offset[i] + be16_to_cpu (range_offset[i])/2;
-	    int range_size = be16_to_cpu (end_code[i]) - be16_to_cpu (start_code[i]) + 1;
+	    int range_size = end - start + 1;
 	    uint16_t g_id_be = cpu_to_be16 (index);
 	    int j;
 
@@ -1334,7 +1343,7 @@
 
 		for (j = 0; j < range_size; j++) {
 		    if (glyph_ids[j] == g_id_be) {
-			*ucs4 = be16_to_cpu (start_code[i]) + j;
+			*ucs4 = start + j;
 			goto found;
 		    }
 		}

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-xcb-surface.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-xcb-surface.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-xcb-surface.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -833,12 +833,13 @@
     image = (cairo_image_surface_t *)
 	    _get_image (surface, TRUE, 0, 0, surface->width, surface->height);
 
+    if (image->base.status != CAIRO_STATUS_SUCCESS)
+	return &image->base;
+
     /* If there was a deferred clear, _get_image applied it */
-    if (image->base.status == CAIRO_STATUS_SUCCESS) {
-	surface->deferred_clear = FALSE;
+    surface->deferred_clear = FALSE;
 
-	surface->fallback = image;
-    }
+    surface->fallback = image;
 
     return &surface->fallback->base;
 }

Modified: trunk/Build/source/libs/cairo/cairo-src/src/cairo-xlib-surface.c
===================================================================
--- trunk/Build/source/libs/cairo/cairo-src/src/cairo-xlib-surface.c	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/cairo-src/src/cairo-xlib-surface.c	2017-06-20 01:32:24 UTC (rev 44648)
@@ -793,6 +793,7 @@
 
 	    _cairo_xlib_shm_surface_get_ximage (&image->base, &shm_image);
 
+	    XSync (display->display, False);
 	    old_handler = XSetErrorHandler (_noop_error_handler);
 	    success = XShmGetImage (display->display,
 				    surface->drawable,
@@ -814,6 +815,7 @@
     if (surface->use_pixmap == 0) {
 	cairo_xlib_error_func_t old_handler;
 
+	XSync (display->display, False);
 	old_handler = XSetErrorHandler (_noop_error_handler);
 
 	ximage = XGetImage (display->display,

Modified: trunk/Build/source/libs/cairo/configure
===================================================================
--- trunk/Build/source/libs/cairo/configure	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/configure	2017-06-20 01:32:24 UTC (rev 44648)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for cairo (TeX Live) 1.14.8.
+# Generated by GNU Autoconf 2.69 for cairo (TeX Live) 1.14.10.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='cairo (TeX Live)'
 PACKAGE_TARNAME='cairo--tex-live-'
-PACKAGE_VERSION='1.14.8'
-PACKAGE_STRING='cairo (TeX Live) 1.14.8'
+PACKAGE_VERSION='1.14.10'
+PACKAGE_STRING='cairo (TeX Live) 1.14.10'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1349,7 +1349,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cairo (TeX Live) 1.14.8 to adapt to many kinds of systems.
+\`configure' configures cairo (TeX Live) 1.14.10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1420,7 +1420,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cairo (TeX Live) 1.14.8:";;
+     short | recursive ) echo "Configuration of cairo (TeX Live) 1.14.10:";;
    esac
   cat <<\_ACEOF
 
@@ -1523,7 +1523,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cairo (TeX Live) configure 1.14.8
+cairo (TeX Live) configure 1.14.10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2129,7 +2129,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cairo (TeX Live) $as_me 1.14.8, which was
+It was created by cairo (TeX Live) $as_me 1.14.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4383,7 +4383,7 @@
 
 # Define the identity of the package.
  PACKAGE='cairo--tex-live-'
- VERSION='1.14.8'
+ VERSION='1.14.10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7273,7 +7273,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cairo (TeX Live) $as_me 1.14.8, which was
+This file was extended by cairo (TeX Live) $as_me 1.14.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7339,7 +7339,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cairo (TeX Live) config.status 1.14.8
+cairo (TeX Live) config.status 1.14.10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/libs/cairo/version.ac
===================================================================
--- trunk/Build/source/libs/cairo/version.ac	2017-06-20 00:49:02 UTC (rev 44647)
+++ trunk/Build/source/libs/cairo/version.ac	2017-06-20 01:32:24 UTC (rev 44648)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current cairo version
-m4_define([cairo_version], [1.14.8])
+m4_define([cairo_version], [1.14.10])



More information about the tex-live-commits mailing list