forked from minhngoc25a/freetype2
Formatting, copyright years.
This commit is contained in:
parent
cda6f49332
commit
15b60bb513
48
ChangeLog
48
ChangeLog
|
@ -1,36 +1,50 @@
|
|||
2009-03-03 David Turner <david@freetype.org>
|
||||
|
||||
Update documentation and bump version number to 2.3.9
|
||||
Update documentation and bump version number to 2.3.9.
|
||||
|
||||
* include/freetype/freetype.h: bump patch version to 9
|
||||
* docs/CHANGES: document the ABI break in 2.3.8
|
||||
* docs/VERSION.DLL: update version numbers table for 2.3.9
|
||||
* builds/unix/configure.ac: update AC_INIT and version_info
|
||||
* include/freetype/freetype.h: Bump patch version to 9.
|
||||
* docs/CHANGES: Document the ABI break in 2.3.8.
|
||||
* docs/VERSION.DLL: Update version numbers table for 2.3.9.
|
||||
* builds/unix/configure.ac: Update AC_INIT and version_info
|
||||
numbers.
|
||||
|
||||
2009-03-03 David Turner <david@freetype.org>
|
||||
|
||||
Remove ABI-breaking field in public PS_InfoFontRec definition.
|
||||
|
||||
Instead, we define a new internal PS_FontExtraRec structure to
|
||||
hold the additionnal field, then place it in various internal
|
||||
positions of the corresponding FT_Face derived objects.
|
||||
|
||||
* include/freetype/t1tables.h (PS_FontInfoRec): Remove the
|
||||
`fs_type' field from the public structure.
|
||||
* include/freetype/internal/psaux.h (T1_FieldLocation): New
|
||||
enumeration `T1_FIELD_LOCATION_FONT_EXTRA'.
|
||||
* include/freetype/internal/t1types.h (PS_FontExtraRec): New
|
||||
structure.
|
||||
(T1_FontRec, CID_FaceRec): Add it.
|
||||
|
||||
* include/freetype/internal/psaux.h (T1_FieldLocation),
|
||||
include/freetype/internal/t1types.h (T1_FontRec, CID_FaceRec),
|
||||
src/type1/t1load.c, src/type1/t1tokens.h,
|
||||
src/cid/cidload.c, src/cid/cidtoken.h,
|
||||
src/type42/t42parse.c: modify the various font parsers to store
|
||||
the `fs_type' field in a different places, instead of the public
|
||||
PS_FontInfoRec.
|
||||
* src/cid/cidload.c (cid_load_keyword): Handle
|
||||
T1_FIELD_LOCATION_FONT_EXTRA.
|
||||
* src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c:
|
||||
Adjust FT_STRUCTURE and T1CODE properly to handle `FSType'.
|
||||
* src/type1/t1load.c (t1_load_keyword): Handle
|
||||
T1_FIELD_LOCATION_FONT_EXTRA.
|
||||
|
||||
* include/freetype/internal/services/svpsinfo.h (PsInfo service),
|
||||
src/base/ftfstype.c (FT_Get_FSType_Flags), src/cff/cffdrivr.c,
|
||||
src/cid/cidriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
|
||||
Modify the PsInfo service to add a GetExtra function, use it in
|
||||
FT_Get_FSType_Flags() and modify the drivers accordingly.
|
||||
* include/freetype/internal/services/svpsinfo.h (PsInfo service):
|
||||
Add `PS_GetFontExtraFunc' function typedef.
|
||||
|
||||
* src/base/ftfstype.c: Include FT_INTERNAL_SERVICE_H and
|
||||
FT_SERVICE_POSTSCRIPT_INFO_H.
|
||||
(FT_Get_FSType_Flags): Use POSTSCRIPT_INFO service.
|
||||
|
||||
* src/cff/cffdrivr.c (cff_service_ps_info): Updated.
|
||||
* src/cid/cidriver.c (cid_ps_get_font_extra): New function.
|
||||
(cid_service_ps_info): Updated.
|
||||
* src/type1/t1driver.c (t1_ps_get_font_extra): New function.
|
||||
(t1_service_ps_info): Updated.
|
||||
* src/type42/t42drivr.c (t42_ps_get_font_extra): New function.
|
||||
(t42_service_ps_info): Updated.
|
||||
|
||||
2009-03-02 Alexey Kryukov <anagnost@yandex.ru>
|
||||
|
||||
|
|
30
docs/CHANGES
30
docs/CHANGES
|
@ -2,26 +2,26 @@ CHANGES BETWEEN 2.3.9 and 2.3.8
|
|||
|
||||
I. IMPORTANT BUG FIXES
|
||||
|
||||
- Very unfortunately, FreeType 2.3.8 contained a change that
|
||||
broke its official ABI. The end result is that programs compiled
|
||||
- Very unfortunately, FreeType 2.3.8 contained a change that broke
|
||||
its official ABI. The end result is that programs compiled
|
||||
against previous versions of the library, but dynamically linked
|
||||
to 2.3.8 can experience memory corruption if they call the
|
||||
FT_Get_PS_Font_Info() function.
|
||||
to 2.3.8 can experience memory corruption if they call the
|
||||
`FT_Get_PS_Font_Info' function.
|
||||
|
||||
We recommend all users to upgrade to 2.3.9 as soon as possible,
|
||||
or to downgrade to a previous release of the library if this is
|
||||
We recommend all users to upgrade to 2.3.9 as soon as possible,
|
||||
or to downgrade to a previous release of the library if this is
|
||||
not an option.
|
||||
|
||||
The origin of the bug is that a new field was added to the
|
||||
publicly defined PS_FontInfoRec structure. Unfortunately objects
|
||||
of this type can be stack or heap allocated by callers of
|
||||
FT_Get_PS_Font_Info(), resulting in a memory buffer over-write
|
||||
with its implementation in 2.3.8.
|
||||
The origin of the bug is that a new field was added to the
|
||||
publicly defined `PS_FontInfoRec' structure. Unfortunately,
|
||||
objects of this type can be stack or heap allocated by callers
|
||||
of `FT_Get_PS_Font_Info', resulting in a memory buffer
|
||||
overwrite with its implementation in 2.3.8.
|
||||
|
||||
If you want to know if your code is vulnerable to this issue,
|
||||
simply search for the substrings "PS_FontInfo" and
|
||||
"PS_Font_Info" in your source code. If none is found, your code
|
||||
is safe and will not be affected.
|
||||
If you want to know whether your code is vulnerable to this
|
||||
issue, simply search for the substrings `PS_FontInfo' and
|
||||
`PS_Font_Info' in your source code. If none is found, your code
|
||||
is safe and is not affected.
|
||||
|
||||
The FreeType team apologizes for the problem.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* The FreeType PostScript info service (specification). */
|
||||
/* */
|
||||
/* Copyright 2003, 2004 by */
|
||||
/* Copyright 2003, 2004, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* Basic Type1/Type2 type definitions and interface (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -92,18 +92,19 @@ FT_BEGIN_HEADER
|
|||
*
|
||||
* Note these can't be blended with multiple-masters.
|
||||
*/
|
||||
typedef struct PS_FontExtraRec_
|
||||
typedef struct PS_FontExtraRec_
|
||||
{
|
||||
FT_UShort fs_type;
|
||||
FT_UShort fs_type;
|
||||
|
||||
} PS_FontExtraRec;
|
||||
|
||||
|
||||
typedef struct T1_FontRec_
|
||||
{
|
||||
PS_FontInfoRec font_info; /* font info dictionary */
|
||||
PS_FontInfoRec font_info; /* font info dictionary */
|
||||
PS_FontExtraRec font_extra; /* font info extra fields */
|
||||
PS_PrivateRec private_dict; /* private dictionary */
|
||||
FT_String* font_name; /* top-level dictionary */
|
||||
PS_PrivateRec private_dict; /* private dictionary */
|
||||
FT_String* font_name; /* top-level dictionary */
|
||||
|
||||
T1_EncodingType encoding_type;
|
||||
T1_EncodingRec encoding;
|
||||
|
|
|
@ -42,11 +42,10 @@
|
|||
{
|
||||
PS_FontExtraRec extra;
|
||||
|
||||
|
||||
if ( !service->ps_get_font_extra( face, &extra ) &&
|
||||
extra.fs_type != 0 )
|
||||
{
|
||||
extra.fs_type != 0 )
|
||||
return extra.fs_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* CID-keyed Type1 font loader (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* CID driver interface (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -74,7 +74,8 @@
|
|||
PS_FontInfoRec* afont_info )
|
||||
{
|
||||
*afont_info = ((CID_Face)face)->cid.font_info;
|
||||
return 0;
|
||||
|
||||
return CID_Err_Ok;
|
||||
}
|
||||
|
||||
static FT_Error
|
||||
|
@ -82,7 +83,8 @@
|
|||
PS_FontExtraRec* afont_extra )
|
||||
{
|
||||
*afont_extra = ((CID_Face)face)->font_extra;
|
||||
return 0;
|
||||
|
||||
return CID_Err_Ok;
|
||||
}
|
||||
|
||||
static const FT_Service_PsInfoRec cid_service_ps_info =
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* CID token definitions (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Type 1 driver interface (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -84,6 +84,7 @@
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static const FT_Service_GlyphDictRec t1_service_glyph_dict =
|
||||
{
|
||||
(FT_GlyphDict_GetNameFunc) t1_get_glyph_name,
|
||||
|
@ -91,10 +92,10 @@
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
* POSTSCRIPT NAME SERVICE
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* POSTSCRIPT NAME SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static const char*
|
||||
t1_get_ps_name( T1_Face face )
|
||||
|
@ -102,16 +103,17 @@
|
|||
return (const char*) face->type1.font_name;
|
||||
}
|
||||
|
||||
|
||||
static const FT_Service_PsFontNameRec t1_service_ps_name =
|
||||
{
|
||||
(FT_PsName_GetFunc)t1_get_ps_name
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* MULTIPLE MASTERS SERVICE
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* MULTIPLE MASTERS SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
|
||||
static const FT_Service_MultiMastersRec t1_service_multi_masters =
|
||||
|
@ -125,31 +127,36 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static FT_Error
|
||||
t1_ps_get_font_info( FT_Face face,
|
||||
PS_FontInfoRec* afont_info )
|
||||
{
|
||||
*afont_info = ((T1_Face)face)->type1.font_info;
|
||||
return 0;
|
||||
|
||||
return T1_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
static FT_Error
|
||||
t1_ps_get_font_extra( FT_Face face,
|
||||
PS_FontExtraRec* afont_extra )
|
||||
{
|
||||
*afont_extra = ((T1_Face)face)->type1.font_extra;
|
||||
return 0;
|
||||
|
||||
return T1_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
static FT_Int
|
||||
t1_ps_has_glyph_names( FT_Face face )
|
||||
{
|
||||
FT_UNUSED( face );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -159,7 +166,8 @@
|
|||
PS_PrivateRec* afont_private )
|
||||
{
|
||||
*afont_private = ((T1_Face)face)->type1.private_dict;
|
||||
return 0;
|
||||
|
||||
return T1_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,6 +179,7 @@
|
|||
(PS_GetFontPrivateFunc)t1_ps_get_font_private,
|
||||
};
|
||||
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_AFM
|
||||
static const FT_Service_KerningRec t1_service_kerning =
|
||||
{
|
||||
|
@ -178,10 +187,11 @@
|
|||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SERVICE LIST
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* SERVICE LIST
|
||||
*
|
||||
*/
|
||||
|
||||
static const FT_ServiceDescRec t1_services[] =
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Type 1 font loader (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Type 1 tokenizer (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* High-level Type 42 driver interface (body). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2007 by Roberto Alameda. */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2007, 2009 by Roberto Alameda. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
|
@ -49,11 +49,11 @@
|
|||
#define FT_COMPONENT trace_t42
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* GLYPH DICT SERVICE
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* GLYPH DICT SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static FT_Error
|
||||
t42_get_glyph_name( T42_Face face,
|
||||
|
@ -94,11 +94,11 @@
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* POSTSCRIPT NAME SERVICE
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* POSTSCRIPT NAME SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static const char*
|
||||
t42_get_ps_font_name( T42_Face face )
|
||||
|
@ -113,32 +113,37 @@
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static FT_Error
|
||||
t42_ps_get_font_info( FT_Face face,
|
||||
PS_FontInfoRec* afont_info )
|
||||
{
|
||||
*afont_info = ((T42_Face)face)->type1.font_info;
|
||||
|
||||
return T42_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
static FT_Error
|
||||
t42_ps_get_font_extra( FT_Face face,
|
||||
PS_FontExtraRec* afont_extra )
|
||||
{
|
||||
*afont_extra = ((T42_Face)face)->type1.font_extra;
|
||||
|
||||
return T42_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
static FT_Int
|
||||
t42_ps_has_glyph_names( FT_Face face )
|
||||
{
|
||||
FT_UNUSED( face );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -148,6 +153,7 @@
|
|||
PS_PrivateRec* afont_private )
|
||||
{
|
||||
*afont_private = ((T42_Face)face)->type1.private_dict;
|
||||
|
||||
return T42_Err_Ok;
|
||||
}
|
||||
|
||||
|
@ -161,11 +167,11 @@
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* SERVICE LIST
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* SERVICE LIST
|
||||
*
|
||||
*/
|
||||
|
||||
static const FT_ServiceDescRec t42_services[] =
|
||||
{
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
/* */
|
||||
/* Type 42 font parser (body). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Roberto Alameda. */
|
||||
/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
|
||||
/* Roberto Alameda. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
|
|
Loading…
Reference in New Issue