Skip to content

Commit fcc00fc

Browse files
author
Ravi Reddy
committed
8379158: Update FreeType to 2.14.2
Backport-of: 95e3fd4
1 parent 89fda5f commit fcc00fc

41 files changed

Lines changed: 400 additions & 810 deletions

Some content is hidden

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

src/java.desktop/share/legal/freetype.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## The FreeType Project: Freetype v2.14.1
1+
## The FreeType Project: Freetype v2.14.2
22

33

44
### FreeType Notice

src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,13 @@ FT_BEGIN_HEADER
759759
/**************************************************************************
760760
*
761761
* Define `TT_CONFIG_OPTION_BDF` if you want to include support for an
762-
* embedded 'BDF~' table within SFNT-based bitmap formats.
762+
* embedded 'BDF~' table within an SFNT-based `.otb` font file. This table
763+
* is an extension used by X11 to preserve BDF properties after conversion
764+
* to SFNT containers. See
765+
*
766+
* https://fontforge.org/docs/techref/non-standard.html#non-standard-bdf
767+
*
768+
* for more details.
763769
*/
764770
/* #define TT_CONFIG_OPTION_BDF */
765771

src/java.desktop/share/native/libfreetype/include/freetype/config/mac-support.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* This is the only necessary change, so it is defined here instead
2525
* providing a new configuration file.
2626
*/
27+
#ifdef FT_MACINTOSH
2728
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
2829
/* No Carbon frameworks for 64bit 10.4.x. */
2930
/* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
@@ -36,6 +37,7 @@
3637
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
3738
#undef FT_MACINTOSH
3839
#endif
40+
#endif /* __APPLE__ ... */
3941

4042
#elif defined( __SC__ ) || defined( __MRC__ )
4143
/* Classic MacOS compilers */

src/java.desktop/share/native/libfreetype/include/freetype/freetype.h

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4318,14 +4318,13 @@ FT_BEGIN_HEADER
43184318
* property `no-stem-darkening` provided by the 'autofit', 'cff',
43194319
* 'type1', and 't1cid' modules; see @no-stem-darkening).
43204320
*
4321-
* * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding
4322-
* to function @FT_Library_SetLcdFilterWeights).
4323-
*
43244321
* * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID
43254322
* 'random' operator, corresponding to the `random-seed` property
43264323
* provided by the 'cff', 'type1', and 't1cid' modules; see
43274324
* @random-seed).
43284325
*
4326+
* * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (no longer supported).
4327+
*
43294328
* Pass `NULL` as `data` in @FT_Parameter for a given tag to reset the
43304329
* option and use the library or module default again.
43314330
*
@@ -4352,25 +4351,17 @@ FT_BEGIN_HEADER
43524351
* FT_Bool darken_stems = 1;
43534352
*
43544353
* FT_Parameter property2;
4355-
* FT_LcdFiveTapFilter custom_weight =
4356-
* { 0x11, 0x44, 0x56, 0x44, 0x11 };
4357-
*
4358-
* FT_Parameter property3;
43594354
* FT_Int32 random_seed = 314159265;
43604355
*
4361-
* FT_Parameter properties[3] = { property1,
4362-
* property2,
4363-
* property3 };
4356+
* FT_Parameter properties[2] = { property1,
4357+
* property2 };
43644358
*
43654359
*
43664360
* property1.tag = FT_PARAM_TAG_STEM_DARKENING;
43674361
* property1.data = &darken_stems;
43684362
*
4369-
* property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
4370-
* property2.data = custom_weight;
4371-
*
4372-
* property3.tag = FT_PARAM_TAG_RANDOM_SEED;
4373-
* property3.data = &random_seed;
4363+
* property2.tag = FT_PARAM_TAG_RANDOM_SEED;
4364+
* property2.data = &random_seed;
43744365
*
43754366
* FT_Face_Properties( face, 3, properties );
43764367
* ```
@@ -4381,7 +4372,7 @@ FT_BEGIN_HEADER
43814372
* FT_Parameter property;
43824373
*
43834374
*
4384-
* property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
4375+
* property.tag = FT_PARAM_TAG_STEM_DARKENING;
43854376
* property.data = NULL;
43864377
*
43874378
* FT_Face_Properties( face, 1, &property );
@@ -5178,7 +5169,7 @@ FT_BEGIN_HEADER
51785169
*/
51795170
#define FREETYPE_MAJOR 2
51805171
#define FREETYPE_MINOR 14
5181-
#define FREETYPE_PATCH 1
5172+
#define FREETYPE_PATCH 2
51825173

51835174

51845175
/**************************************************************************

src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ FT_BEGIN_HEADER
4444
*
4545
* @description:
4646
* This section contains the declaration of functions specific to BDF and
47-
* PCF fonts.
47+
* PCF fonts. They also work for SFNT bitmap fonts that contain a 'BDF~'
48+
* table like X11's `.otb` fonts.
4849
*
4950
*/
5051

@@ -151,7 +152,9 @@ FT_BEGIN_HEADER
151152
* FreeType error code. 0~means success.
152153
*
153154
* @note:
154-
* This function only works with BDF faces, returning an error otherwise.
155+
* This function only works with BDF faces and SFNT fonts that have a
156+
* 'BDF~' table, returning an error otherwise. For the latter, a bitmap
157+
* strike size must be selected first.
155158
*/
156159
FT_EXPORT( FT_Error )
157160
FT_Get_BDF_Charset_ID( FT_Face face,
@@ -165,7 +168,7 @@ FT_BEGIN_HEADER
165168
* FT_Get_BDF_Property
166169
*
167170
* @description:
168-
* Retrieve a BDF property from a BDF or PCF font file.
171+
* Retrieve a BDF property from a BDF or PCF font.
169172
*
170173
* @input:
171174
* face ::
@@ -196,6 +199,9 @@ FT_BEGIN_HEADER
196199
*
197200
* In case of error, `aproperty->type` is always set to
198201
* @BDF_PROPERTY_TYPE_NONE.
202+
*
203+
* This also works with SFNT fonts that have a 'BDF~' table, after a
204+
* bitmap strike size has been selected.
199205
*/
200206
FT_EXPORT( FT_Error )
201207
FT_Get_BDF_Property( FT_Face face,

src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ FT_BEGIN_HEADER
875875
*/
876876
typedef struct FT_Span_
877877
{
878-
short x;
878+
unsigned short x;
879879
unsigned short len;
880880
unsigned char coverage;
881881

src/java.desktop/share/native/libfreetype/include/freetype/ftlcdfil.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,10 @@ FT_BEGIN_HEADER
145145
*
146146
* FT_LCD_FILTER_LEGACY ::
147147
* FT_LCD_FILTER_LEGACY1 ::
148-
* This filter corresponds to the original libXft color filter. It
149-
* provides high contrast output but can exhibit really bad color
150-
* fringes if glyphs are not extremely well hinted to the pixel grid.
151-
* This filter is only provided for comparison purposes, and might be
152-
* disabled or stay unsupported in the future. The second value is
153-
* provided for compatibility with FontConfig, which historically used
154-
* different enumeration, sometimes incorrectly forwarded to FreeType.
148+
* The legacy libXft color filter is no longer supported and ignored.
155149
*
156150
* @since:
157-
* 2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2)
151+
* 2.3.0
158152
*/
159153
typedef enum FT_LcdFilter_
160154
{

src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,8 @@ FT_BEGIN_HEADER
133133
* FT_PARAM_TAG_LCD_FILTER_WEIGHTS
134134
*
135135
* @description:
136-
* An @FT_Parameter tag to be used with @FT_Face_Properties. The
137-
* corresponding argument specifies the five LCD filter weights for a
138-
* given face (if using @FT_LOAD_TARGET_LCD, for example), overriding the
139-
* global default values or the values set up with
140-
* @FT_Library_SetLcdFilterWeights.
136+
* Overriding global LCD filter weights with custom values for a given
137+
* face is no longer supported and ignored.
141138
*
142139
* @since:
143140
* 2.8

src/java.desktop/share/native/libfreetype/include/freetype/internal/cfftypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ FT_BEGIN_HEADER
191191
FT_UInt weight;
192192
FT_Bool is_fixed_pitch;
193193
FT_Fixed italic_angle;
194-
FT_Fixed underline_position;
195-
FT_Fixed underline_thickness;
194+
FT_Short underline_position;
195+
FT_UShort underline_thickness;
196196
FT_Int paint_type;
197197
FT_Int charstring_type;
198198
FT_Matrix font_matrix;

src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,6 @@ FT_BEGIN_HEADER
365365
* Value~0 means to use the font's value. Value~-1 means to use the
366366
* CFF driver's default.
367367
*
368-
* lcd_weights ::
369-
* lcd_filter_func ::
370-
* These fields specify the LCD filtering weights and callback function
371-
* for ClearType-style subpixel rendering.
372-
*
373368
* refcount ::
374369
* A counter initialized to~1 at the time an @FT_Face structure is
375370
* created. @FT_Reference_Face increments this counter, and
@@ -391,11 +386,6 @@ FT_BEGIN_HEADER
391386
FT_Char no_stem_darkening;
392387
FT_Int32 random_seed;
393388

394-
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
395-
FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
396-
FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
397-
#endif
398-
399389
FT_Int refcount;
400390

401391
} FT_Face_InternalRec;
@@ -724,9 +714,9 @@ FT_BEGIN_HEADER
724714
const FT_Vector* origin );
725715

726716
/* Allocate a new bitmap buffer in a glyph slot. */
717+
/* Dimensions must be preset in advance. */
727718
FT_BASE( FT_Error )
728-
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
729-
FT_ULong size );
719+
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot );
730720

731721

732722
/* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */
@@ -889,10 +879,6 @@ FT_BEGIN_HEADER
889879
* lcd_weights ::
890880
* The LCD filter weights for ClearType-style subpixel rendering.
891881
*
892-
* lcd_filter_func ::
893-
* The LCD filtering callback function for for ClearType-style subpixel
894-
* rendering.
895-
*
896882
* lcd_geometry ::
897883
* This array specifies LCD subpixel geometry and controls Harmony LCD
898884
* rendering technique, alternative to ClearType.
@@ -926,7 +912,6 @@ FT_BEGIN_HEADER
926912

927913
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
928914
FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
929-
FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
930915
#else
931916
FT_Vector lcd_geometry[3]; /* RGB subpixel positions */
932917
#endif
@@ -995,17 +980,6 @@ FT_BEGIN_HEADER
995980
#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
996981

997982

998-
/* Define default raster's interface. The default raster is located in */
999-
/* `src/base/ftraster.c'. */
1000-
/* */
1001-
/* Client applications can register new rasters through the */
1002-
/* FT_Set_Raster() API. */
1003-
1004-
#ifndef FT_NO_DEFAULT_RASTER
1005-
FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;
1006-
#endif
1007-
1008-
1009983
/**************************************************************************
1010984
*
1011985
* @macro:

0 commit comments

Comments
 (0)