summaryrefslogtreecommitdiff
path: root/freetype/src/base/ftutil.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-11-26 14:39:02 +0000
committerChris Liddell <chris.liddell@artifex.com>2019-11-26 17:51:31 +0000
commit79ac3f84060fbd5447219264ab0bcf89c7caa2cf (patch)
treeeb80c656c8302f91fc140e4a23db608ef207ba0d /freetype/src/base/ftutil.c
parent36cbd382b160ee4951d1911f85a4fa0723dd8db3 (diff)
downloadghostpdl-79ac3f84060fbd5447219264ab0bcf89c7caa2cf.tar.gz
Update Freetype to 2.4.10
Plus makefile updates to support it Bug 701288: Handle SEAC ligature glyph metrics correctly. As originally intended, a Type 1 SEAC charstring would be used for an accented glyph (like an a-caron, or u-umlaut) where the advance with of the SEAC glyph is the same as that of the 'base' glyph ('a' or 'u'). It this case, it is not uncommon for the SEAC to skip using an (H)SBW op code and rely on the one from the base glyph. But out of spec fonts also use SEAC glyphs ligature glyphs (like 'oe' or 'fi'), and in those cases the overall advance width is greater than that of the 'base' glyph. In this case, we have to allow for the SEAC glyph having included an (H)SBW and if it has, retain those values, rather than those from the base glyph. Rename file and make file change to match Avoids file name clash with freetype 2.4.10 Work around a change in the zlib API for 1.2.11 where it's used in the Freetype/zlib interface debugging code.
Diffstat (limited to 'freetype/src/base/ftutil.c')
-rw-r--r--freetype/src/base/ftutil.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/freetype/src/base/ftutil.c b/freetype/src/base/ftutil.c
index 4de5f2c14..92bd857e9 100644
--- a/freetype/src/base/ftutil.c
+++ b/freetype/src/base/ftutil.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* ftutil.c */
-/* */
-/* FreeType utility file for memory and list management (body). */
-/* */
-/* Copyright 2002-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * ftutil.c
+ *
+ * FreeType utility file for memory and list management (body).
+ *
+ * Copyright (C) 2002-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
#include <ft2build.h>
@@ -23,14 +23,14 @@
#include FT_LIST_H
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
-#define FT_COMPONENT trace_memory
+#define FT_COMPONENT memory
/*************************************************************************/
@@ -54,7 +54,7 @@
FT_Error error;
FT_Pointer block = ft_mem_qalloc( memory, size, &error );
- if ( !error && size > 0 )
+ if ( !error && block && size > 0 )
FT_MEM_ZERO( block, size );
*p_error = error;
@@ -101,7 +101,7 @@
block = ft_mem_qrealloc( memory, item_size,
cur_count, new_count, block, &error );
- if ( !error && new_count > cur_count )
+ if ( !error && block && new_count > cur_count )
FT_MEM_ZERO( (char*)block + cur_count * item_size,
( new_count - cur_count ) * item_size );
@@ -185,7 +185,7 @@
FT_Pointer p = ft_mem_qalloc( memory, (FT_Long)size, &error );
- if ( !error && address )
+ if ( !error && address && size > 0 )
ft_memcpy( p, address, size );
*p_error = error;
@@ -236,7 +236,7 @@
/*************************************************************************/
#undef FT_COMPONENT
-#define FT_COMPONENT trace_list
+#define FT_COMPONENT list
/* documentation is in ftlist.h */