Skip to content

Commit 341e9e4

Browse files
committed
[FREETYPE]
Sync to version 2.4.4 svn path=/trunk/; revision=51542
1 parent 19c2502 commit 341e9e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+19542
-8698
lines changed

reactos/lib/3rdparty/freetype/ChangeLog

Lines changed: 1025 additions & 7413 deletions
Large diffs are not rendered by default.

reactos/lib/3rdparty/freetype/ChangeLog.23

Lines changed: 15896 additions & 0 deletions
Large diffs are not rendered by default.

reactos/lib/3rdparty/freetype/Jamfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FreeType 2 top Jamfile.
22
#
3-
# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
3+
# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by
44
# David Turner, Robert Wilhelm, and Werner Lemberg.
55
#
66
# This file is part of the FreeType project, and may only be used, modified,
@@ -194,7 +194,7 @@ rule RefDoc
194194

195195
actions RefDoc
196196
{
197-
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.3.12 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
197+
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.4.4 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
198198
}
199199

200200
RefDoc refdoc ;

reactos/lib/3rdparty/freetype/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
is called `libttf'. They are *not* compatible!
1010

1111

12-
FreeType 2.3.12
13-
===============
12+
FreeType 2.4.4
13+
==============
1414

1515
Please read the docs/CHANGES file, it contains IMPORTANT
1616
INFORMATION.
@@ -26,9 +26,9 @@
2626

2727
and download one of the following files.
2828

29-
freetype-doc-2.3.12.tar.bz2
30-
freetype-doc-2.3.12.tar.gz
31-
ftdoc2312.zip
29+
freetype-doc-2.4.4.tar.bz2
30+
freetype-doc-2.4.4.tar.gz
31+
ftdoc244.zip
3232

3333

3434
Bugs

reactos/lib/3rdparty/freetype/README.git

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ should work on all platforms which have GNU make (or makepp).
3333

3434
----------------------------------------------------------------------
3535

36-
Copyright 2005, 2006, 2007, 2008, 2009 by
36+
Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
3737
David Turner, Robert Wilhelm, and Werner Lemberg.
3838

3939
This file is part of the FreeType project, and may only be used,
@@ -43,4 +43,4 @@ this file you indicate that you have read the license and understand
4343
and accept it fully.
4444

4545

46-
--- end of README.CVS ---
46+
--- end of README.git ---

reactos/lib/3rdparty/freetype/configure

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#
3-
# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by
3+
# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by
44
# David Turner, Robert Wilhelm, and Werner Lemberg.
55
#
66
# This file is part of the FreeType project, and may only be used, modified,
@@ -78,10 +78,15 @@ if test $# -gt 0; then
7878
done
7979
fi
8080

81-
# build a dummy Makefile if we are not building in the source tree
81+
# build a dummy Makefile if we are not building in the source tree;
82+
# we use inodes to avoid issues with symbolic links
83+
inode_src=`ls -id $abs_ft2_dir | awk '{print $1}'`
84+
inode_dst=`ls -id $abs_curr_dir | awk '{print $1}'`
8285

83-
if test "$abs_curr_dir" != "$abs_ft2_dir"; then
84-
mkdir reference
86+
if test $inode_src -ne $inode_dst; then
87+
if test ! -d reference; then
88+
mkdir reference
89+
fi
8590
if test ! -r $abs_curr_dir/modules.cfg; then
8691
echo "Copying \`modules.cfg'"
8792
cp $abs_ft2_dir/modules.cfg $abs_curr_dir
@@ -91,7 +96,7 @@ if test "$abs_curr_dir" != "$abs_ft2_dir"; then
9196
echo "OBJ_DIR := $abs_curr_dir" >> Makefile
9297
echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile
9398
echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile
94-
echo "LIBTOOL := \$(OBJ_DIR)/libtool" >> Makefile
99+
echo "FT_LIBTOOL_DIR := \$(OBJ_DIR)" >> Makefile
95100
echo "ifndef FT2DEMOS" >> Makefile
96101
echo " include \$(TOP_DIR)/Makefile" >> Makefile
97102
echo "else" >> Makefile

reactos/lib/3rdparty/freetype/devel/ftoption.h

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,7 @@ FT_BEGIN_HEADER
488488
/*************************************************************************/
489489
/* */
490490
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
491-
/* a bytecode interpreter in the TrueType driver. Note that there are */
492-
/* important patent issues related to the use of the interpreter. */
491+
/* a bytecode interpreter in the TrueType driver. */
493492
/* */
494493
/* By undefining this, you will only compile the code necessary to load */
495494
/* TrueType glyphs without hinting. */
@@ -504,10 +503,13 @@ FT_BEGIN_HEADER
504503
/* */
505504
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
506505
/* of the TrueType bytecode interpreter is used that doesn't implement */
507-
/* any of the patented opcodes and algorithms. Note that the */
508-
/* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
509-
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
510-
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
506+
/* any of the patented opcodes and algorithms. The patents related to */
507+
/* TrueType hinting have expired worldwide since May 2010; this option */
508+
/* is now deprecated. */
509+
/* */
510+
/* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
511+
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
512+
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
511513
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
512514
/* */
513515
/* This macro is only useful for a small number of font files (mostly */
@@ -687,7 +689,28 @@ FT_BEGIN_HEADER
687689
* is recommended to disable the macro since it reduces the library's code
688690
* size and activates a few memory-saving optimizations as well.
689691
*/
690-
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
692+
/* #define FT_CONFIG_OPTION_OLD_INTERNALS xxx */
693+
694+
695+
/*
696+
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
697+
* we restrict the number of charmaps in a font. The current API of
698+
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
699+
* takes charcode only. To determine the passed value is for cmap_index
700+
* or charcode, the possible cmap_index is restricted not to exceed
701+
* the minimum possible charcode by a rogue client. It is also very
702+
* unlikely that a rogue client is interested in Unicode values 0 to 15.
703+
*
704+
* NOTE: The original threshold was 4 deduced from popular number of
705+
* cmap subtables in UCS-4 TrueType fonts, but now it is not
706+
* irregular for OpenType fonts to have more than 4 subtables,
707+
* because variation selector subtables are available for Apple
708+
* and Microsoft platforms.
709+
*/
710+
711+
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
712+
#define FT_MAX_CHARMAP_CACHEABLE 15
713+
#endif
691714

692715

693716
/*

reactos/lib/3rdparty/freetype/freetype.rbuild

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
<include base="freetype">include</include>
55
<define name="__NTDRIVER__" />
66
<define name="FT2_BUILD_LIBRARY" />
7-
<if property="NSWPAT" value="0">
8-
<define name="TT_CONFIG_OPTION_UNPATENTED_HINTING" />
9-
</if>
10-
<if property="NSWPAT" value="1">
11-
<define name="TT_CONFIG_OPTION_BYTECODE_INTERPRETER" />
12-
</if>
137
<directory name="src">
148
<directory name="base">
159
<file>ftbase.c</file>

reactos/lib/3rdparty/freetype/include/freetype/config/ftconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ FT_BEGIN_HEADER
363363

364364
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
365365

366-
#if defined( i386 )
366+
#if defined( __i386__ )
367367
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
368368

369369
/* documentation is in freetype.h */

reactos/lib/3rdparty/freetype/include/freetype/config/ftoption.h

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ FT_BEGIN_HEADER
317317
/* supply font data incrementally as the document is parsed, such */
318318
/* as the Ghostscript interpreter for the PostScript language. */
319319
/* */
320-
/* #define FT_CONFIG_OPTION_INCREMENTAL */
320+
#define FT_CONFIG_OPTION_INCREMENTAL
321321

322322

323323
/*************************************************************************/
@@ -488,26 +488,28 @@ FT_BEGIN_HEADER
488488
/*************************************************************************/
489489
/* */
490490
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
491-
/* a bytecode interpreter in the TrueType driver. Note that there are */
492-
/* important patent issues related to the use of the interpreter. */
491+
/* a bytecode interpreter in the TrueType driver. */
493492
/* */
494493
/* By undefining this, you will only compile the code necessary to load */
495494
/* TrueType glyphs without hinting. */
496495
/* */
497496
/* Do not #undef this macro here, since the build system might */
498497
/* define it for certain configurations only. */
499498
/* */
500-
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
499+
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
501500

502501

503502
/*************************************************************************/
504503
/* */
505504
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
506505
/* of the TrueType bytecode interpreter is used that doesn't implement */
507-
/* any of the patented opcodes and algorithms. Note that the */
508-
/* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
509-
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
510-
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
506+
/* any of the patented opcodes and algorithms. The patents related to */
507+
/* TrueType hinting have expired worldwide since May 2010; this option */
508+
/* is now deprecated. */
509+
/* */
510+
/* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
511+
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
512+
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
511513
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
512514
/* */
513515
/* This macro is only useful for a small number of font files (mostly */
@@ -544,7 +546,7 @@ FT_BEGIN_HEADER
544546
/* ... */
545547
/* } */
546548
/* */
547-
//#define TT_CONFIG_OPTION_UNPATENTED_HINTING
549+
/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
548550

549551

550552
/*************************************************************************/
@@ -690,6 +692,27 @@ FT_BEGIN_HEADER
690692
#define FT_CONFIG_OPTION_OLD_INTERNALS
691693

692694

695+
/*
696+
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
697+
* we restrict the number of charmaps in a font. The current API of
698+
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
699+
* takes charcode only. To determine the passed value is for cmap_index
700+
* or charcode, the possible cmap_index is restricted not to exceed
701+
* the minimum possible charcode by a rogue client. It is also very
702+
* unlikely that a rogue client is interested in Unicode values 0 to 15.
703+
*
704+
* NOTE: The original threshold was 4 deduced from popular number of
705+
* cmap subtables in UCS-4 TrueType fonts, but now it is not
706+
* irregular for OpenType fonts to have more than 4 subtables,
707+
* because variation selector subtables are available for Apple
708+
* and Microsoft platforms.
709+
*/
710+
711+
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
712+
#define FT_MAX_CHARMAP_CACHEABLE 15
713+
#endif
714+
715+
693716
/*
694717
* This macro is defined if either unpatented or native TrueType
695718
* hinting is requested by the definitions above.

reactos/lib/3rdparty/freetype/include/freetype/freetype.h

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,9 @@ FT_BEGIN_HEADER
19521952
/* Each new face object created with this function also owns a */
19531953
/* default @FT_Size object, accessible as `face->size'. */
19541954
/* */
1955+
/* See the discussion of reference counters in the description of */
1956+
/* @FT_Reference_Face. */
1957+
/* */
19551958
FT_EXPORT( FT_Error )
19561959
FT_Open_Face( FT_Library library,
19571960
const FT_Open_Args* args,
@@ -2016,6 +2019,33 @@ FT_BEGIN_HEADER
20162019
FT_Open_Args* parameters );
20172020

20182021

2022+
/*************************************************************************/
2023+
/* */
2024+
/* <Function> */
2025+
/* FT_Reference_Face */
2026+
/* */
2027+
/* <Description> */
2028+
/* A counter gets initialized to~1 at the time an @FT_Face structure */
2029+
/* is created. This function increments the counter. @FT_Done_Face */
2030+
/* then only destroys a face if the counter is~1, otherwise it simply */
2031+
/* decrements the counter. */
2032+
/* */
2033+
/* This function helps in managing life-cycles of structures which */
2034+
/* reference @FT_Face objects. */
2035+
/* */
2036+
/* <Input> */
2037+
/* face :: A handle to a target face object. */
2038+
/* */
2039+
/* <Return> */
2040+
/* FreeType error code. 0~means success. */
2041+
/* */
2042+
/* <Since> */
2043+
/* 2.4.2 */
2044+
/* */
2045+
FT_EXPORT( FT_Error )
2046+
FT_Reference_Face( FT_Face face );
2047+
2048+
20192049
/*************************************************************************/
20202050
/* */
20212051
/* <Function> */
@@ -2031,6 +2061,10 @@ FT_BEGIN_HEADER
20312061
/* <Return> */
20322062
/* FreeType error code. 0~means success. */
20332063
/* */
2064+
/* <Note> */
2065+
/* See the discussion of reference counters in the description of */
2066+
/* @FT_Reference_Face. */
2067+
/* */
20342068
FT_EXPORT( FT_Error )
20352069
FT_Done_Face( FT_Face face );
20362070

@@ -2997,7 +3031,7 @@ FT_BEGIN_HEADER
29973031
*
29983032
* @return:
29993033
* The index into the array of character maps within the face to which
3000-
* `charmap' belongs.
3034+
* `charmap' belongs. If an error occurs, -1 is returned.
30013035
*
30023036
*/
30033037
FT_EXPORT( FT_Int )
@@ -3773,8 +3807,8 @@ FT_BEGIN_HEADER
37733807
*
37743808
*/
37753809
#define FREETYPE_MAJOR 2
3776-
#define FREETYPE_MINOR 3
3777-
#define FREETYPE_PATCH 12
3810+
#define FREETYPE_MINOR 4
3811+
#define FREETYPE_PATCH 4
37783812

37793813

37803814
/*************************************************************************/
@@ -3834,6 +3868,9 @@ FT_BEGIN_HEADER
38343868
/* 1~if this is a TrueType font that uses one of the patented */
38353869
/* opcodes, 0~otherwise. */
38363870
/* */
3871+
/* <Note> */
3872+
/* Since May 2010, TrueType hinting is no longer patented. */
3873+
/* */
38373874
/* <Since> */
38383875
/* 2.3.5 */
38393876
/* */
@@ -3861,6 +3898,9 @@ FT_BEGIN_HEADER
38613898
/* an SFNT font, or if the unpatented hinter is not compiled in this */
38623899
/* instance of the library. */
38633900
/* */
3901+
/* <Note> */
3902+
/* Since May 2010, TrueType hinting is no longer patented. */
3903+
/* */
38643904
/* <Since> */
38653905
/* 2.3.5 */
38663906
/* */

0 commit comments

Comments
 (0)