shithub: freetype+ttf2subf

Download patch

ref: 312043f41bbb5e9fd4127339c76551406592b8a8
parent: e7aad0254c9e869a593cc8fe95d932e7de700ffb
author: Werner Lemberg <[email protected]>
date: Wed Nov 12 01:29:41 EST 2008

* src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
This fixes Savannah bug #24819.

Document `format' field of TT_CMapInfo.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-12  Tor Andersson  <[email protected]>
+
+	* src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
+	This fixes Savannah bug #24819.
+
 2008-11-08  Werner Lemberg  <[email protected]>
 
 	* src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards
--- a/include/freetype/internal/services/svttcmap.h
+++ b/include/freetype/internal/services/svttcmap.h
@@ -7,7 +7,7 @@
 /*  Copyright 2003 by                                                      */
 /*  Masatake YAMATO, Redhat K.K.                                           */
 /*                                                                         */
-/*  Copyright 2003 by                                                      */
+/*  Copyright 2003, 2008 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -48,6 +48,13 @@
   /*    language ::                                                        */
   /*      The language ID used in Mac fonts.  Definitions of values are in */
   /*      freetype/ttnameid.h.                                             */
+  /*                                                                       */
+  /*    format ::                                                          */
+  /*      The cmap format.  OpenType 1.5 defines the formats 0 (byte       */
+  /*      encoding table), 2~(high-byte mapping through table), 4~(segment */
+  /*      mapping to delta values), 6~(trimmed table mapping), 8~(mixed    */
+  /*      16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented   */
+  /*      coverage), and 14 (Unicode Variation Sequences).                 */
   /*                                                                       */
   typedef struct  TT_CMapInfo_
   {
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -426,6 +426,7 @@
 
 
     cmap_info->language = 0;
+    cmap_info->format   = 0;
 
     if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
          cmap->clazz != &cff_cmap_unicode_class_rec  )