Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 124828 | Differences between
and this patch

Collapse All | Expand All

(-)a/ChangeLog (-1 / +12 lines)
Lines 1-4 Link Here
1
2006-03-21 David Turner  <david@freetype.org>
1
2006-03-21  Werner Lemberg  <wl@gnu.org>
2
3
	* src/cff/cfftypes.h (CFF_CharsetRec): Add `max_cid' member.
4
5
	* src/cff/cffload.c (cff_charset_load): Set `charset->max_cid'.
6
7
	* src/cff/cffgload.c (cff_slot_load): Change type of third parameter
8
	to `FT_UInt'.
9
	Check range of `glyph_index'.
10
	* src/cff/cffgload.h: Updated.
11
12
2006-03-21  David Turner  <david@freetype.org>
2
13
3
	* src/autofit/aflatin.c (af_latin_metrics_scale): Fix small bug
14
	* src/autofit/aflatin.c (af_latin_metrics_scale): Fix small bug
4
	that crashes the auto-hinter (introduced by previous patch).
15
	that crashes the auto-hinter (introduced by previous patch).
(-)a/src/cff/cffgload.c (-3 / +8 lines)
Lines 2272-2278 Link Here
2272
  FT_LOCAL_DEF( FT_Error )
2272
  FT_LOCAL_DEF( FT_Error )
2273
  cff_slot_load( CFF_GlyphSlot  glyph,
2273
  cff_slot_load( CFF_GlyphSlot  glyph,
2274
                 CFF_Size       size,
2274
                 CFF_Size       size,
2275
                 FT_Int         glyph_index,
2275
                 FT_UInt        glyph_index,
2276
                 FT_Int32       load_flags )
2276
                 FT_Int32       load_flags )
2277
  {
2277
  {
2278
    FT_Error      error;
2278
    FT_Error      error;
Lines 2318-2324 Link Here
2318
2318
2319
        error = sfnt->load_sbit_image( face,
2319
        error = sfnt->load_sbit_image( face,
2320
                                       size->strike_index,
2320
                                       size->strike_index,
2321
                                       (FT_UInt)glyph_index,
2321
                                       glyph_index,
2322
                                       (FT_Int)load_flags,
2322
                                       (FT_Int)load_flags,
2323
                                       stream,
2323
                                       stream,
2324
                                       &glyph->root.bitmap,
2324
                                       &glyph->root.bitmap,
Lines 2381-2387 Link Here
2381
      /* subsetted font, glyph_indices and CIDs are identical, though */
2381
      /* subsetted font, glyph_indices and CIDs are identical, though */
2382
      if ( cff->top_font.font_dict.cid_registry != 0xFFFFU &&
2382
      if ( cff->top_font.font_dict.cid_registry != 0xFFFFU &&
2383
           cff->charset.cids )
2383
           cff->charset.cids )
2384
        glyph_index = cff->charset.cids[glyph_index];
2384
      {
2385
        if ( glyph_index < cff->charset.max_cid )
2386
          glyph_index = cff->charset.cids[glyph_index];
2387
        else
2388
          glyph_index = 0;
2389
      }
2385
2390
2386
      cff_decoder_init( &decoder, face, size, glyph, hinting,
2391
      cff_decoder_init( &decoder, face, size, glyph, hinting,
2387
                        FT_LOAD_TARGET_MODE( load_flags ) );
2392
                        FT_LOAD_TARGET_MODE( load_flags ) );
(-)a/src/cff/cffgload.h (-2 / +2 lines)
Lines 4-10 Link Here
4
/*                                                                         */
4
/*                                                                         */
5
/*    OpenType Glyph Loader (specification).                               */
5
/*    OpenType Glyph Loader (specification).                               */
6
/*                                                                         */
6
/*                                                                         */
7
/*  Copyright 1996-2001, 2002, 2003, 2004 by                               */
7
/*  Copyright 1996-2001, 2002, 2003, 2004, 2006 by                         */
8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9
/*                                                                         */
9
/*                                                                         */
10
/*  This file is part of the FreeType project, and may only be used,       */
10
/*  This file is part of the FreeType project, and may only be used,       */
Lines 196-202 FT_BEGIN_HEADER Link Here
196
  FT_LOCAL( FT_Error )
196
  FT_LOCAL( FT_Error )
197
  cff_slot_load( CFF_GlyphSlot  glyph,
197
  cff_slot_load( CFF_GlyphSlot  glyph,
198
                 CFF_Size       size,
198
                 CFF_Size       size,
199
                 FT_Int         glyph_index,
199
                 FT_UInt        glyph_index,
200
                 FT_Int32       load_flags );
200
                 FT_Int32       load_flags );
201
201
202
202
(-)a/src/cff/cffload.c (+2 lines)
Lines 1688-1693 Link Here
1688
1688
1689
      for ( i = 0; i < num_glyphs; i++ )
1689
      for ( i = 0; i < num_glyphs; i++ )
1690
        charset->cids[charset->sids[i]] = (FT_UShort)i;
1690
        charset->cids[charset->sids[i]] = (FT_UShort)i;
1691
1692
      charset->max_cid = max_cid;
1691
    }
1693
    }
1692
1694
1693
  Exit:
1695
  Exit:
(-)a/src/cff/cfftypes.h (-1 / +2 lines)
Lines 5-11 Link Here
5
/*    Basic OpenType/CFF type definitions and interface (specification     */
5
/*    Basic OpenType/CFF type definitions and interface (specification     */
6
/*    only).                                                               */
6
/*    only).                                                               */
7
/*                                                                         */
7
/*                                                                         */
8
/*  Copyright 1996-2001, 2002, 2003 by                                     */
8
/*  Copyright 1996-2001, 2002, 2003, 2006 by                               */
9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
10
/*                                                                         */
10
/*                                                                         */
11
/*  This file is part of the FreeType project, and may only be used,       */
11
/*  This file is part of the FreeType project, and may only be used,       */
Lines 84-89 FT_BEGIN_HEADER Link Here
84
    FT_UShort*  sids;
84
    FT_UShort*  sids;
85
    FT_UShort*  cids;       /* the inverse mapping of `sids'; only needed */
85
    FT_UShort*  cids;       /* the inverse mapping of `sids'; only needed */
86
                            /* for CID-keyed fonts                        */
86
                            /* for CID-keyed fonts                        */
87
    FT_UInt     max_cid;
87
  } CFF_CharsetRec, *CFF_Charset;
88
  } CFF_CharsetRec, *CFF_Charset;
88
89
89
90

Return to bug 124828