Skip to content

Commit 428c2a2

Browse files
vieirojerboaa
authored andcommitted
8348596: Update FreeType to 2.13.3
Reviewed-by: andrew Backport-of: 682c9390339a79b89f82e580f90587deafbeef45
1 parent bf78d9b commit 428c2a2

File tree

280 files changed

+2149
-2800
lines changed

Some content is hidden

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

280 files changed

+2149
-2800
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## The FreeType Project: Freetype v2.13.2
1+
## The FreeType Project: Freetype v2.13.3
22

33

44
### FreeType Notice
@@ -21,23 +21,23 @@ which fits your needs best.
2121
### FreeType License
2222
```
2323
24-
Copyright (C) 1996-2023 by David Turner, Robert Wilhelm, and Werner Lemberg.
25-
Copyright (C) 2007-2023 by Dereg Clegg and Michael Toftdal.
26-
Copyright (C) 1996-2023 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
27-
Copyright (C) 2022-2023 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and
28-
Copyright (C) 2004-2023 by Masatake YAMATO and Redhat K.K.
29-
Copyright (C) 2007-2023 by Derek Clegg and Michael Toftdal.
30-
Copyright (C) 2003-2023 by Masatake YAMATO, Red Hat K.K.,
31-
Copyright (C) 1996-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches.
32-
Copyright (C) 2007-2023 by David Turner.
33-
Copyright (C) 2022-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti.
34-
Copyright (C) 2007-2023 by Rahul Bhalerao <[email protected]>, <[email protected]>.
35-
Copyright (C) 2008-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.
36-
Copyright (C) 2013-2023 by Google, Inc.
37-
Copyright (C) 2019-2023 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
38-
Copyright (C) 2009-2023 by Oran Agra and Mickey Gabel.
39-
Copyright (C) 2018-2023 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg.
40-
Copyright (C) 2004-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.
24+
Copyright (C) 1996-2024 by David Turner, Robert Wilhelm, and Werner Lemberg.
25+
Copyright (C) 2007-2024 by Dereg Clegg and Michael Toftdal.
26+
Copyright (C) 1996-2024 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
27+
Copyright (C) 2022-2024 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and
28+
Copyright (C) 2004-2024 by Masatake YAMATO and Redhat K.K.
29+
Copyright (C) 2007-2024 by Derek Clegg and Michael Toftdal.
30+
Copyright (C) 2003-2024 by Masatake YAMATO, Red Hat K.K.,
31+
Copyright (C) 1996-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches.
32+
Copyright (C) 2007-2024 by David Turner.
33+
Copyright (C) 2022-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti.
34+
Copyright (C) 2007-2024 by Rahul Bhalerao <[email protected]>, <[email protected]>.
35+
Copyright (C) 2008-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.
36+
Copyright (C) 2013-2024 by Google, Inc.
37+
Copyright (C) 2019-2024 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
38+
Copyright (C) 2009-2024 by Oran Agra and Mickey Gabel.
39+
Copyright (C) 2018-2024 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg.
40+
Copyright (C) 2004-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.
4141
4242
4343
The FreeType Project LICENSE
@@ -559,7 +559,7 @@ Public License instead of this License.
559559
```
560560
561561
---------------------------------
562-
The below license applies to the following files:
562+
The below applies to the following file(s):
563563
libfreetype/src/psaux/psarrst.c
564564
libfreetype/src/psaux/psarrst.h
565565
libfreetype/src/psaux/psblues.c
@@ -582,7 +582,7 @@ libfreetype/src/psaux/psstack.c
582582
libfreetype/src/psaux/psstack.h
583583
libfreetype/src/psaux/pstypes.h
584584
585-
Copyright 2006-2014 Adobe Systems Incorporated.
585+
Copyright (C) 2006-2014 Adobe Systems Incorporated.
586586
587587
This software, and all works of authorship, whether in source or
588588
object code form as indicated by the copyright notice(s) included
@@ -618,12 +618,12 @@ and you accept them fully.
618618
```
619619
620620
---------------------------------
621-
The below license applies to the following files:
621+
The below applies to the following file(s):
622622
libfreetype/include/freetype/internal/fthash.h
623623
libfreetype/src/base/fthash.c
624624
625-
Copyright 2000 Computing Research Labs, New Mexico State University
626-
Copyright 2001-2015
625+
Copyright (C) 2000 Computing Research Labs, New Mexico State University
626+
Copyright (C) 2001-2015
627627
628628
Francesco Zappa Nardelli
629629

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* ANSI-specific configuration file (specification only).
66
*
7-
* Copyright (C) 1996-2023 by
7+
* Copyright (C) 1996-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Build macros of the FreeType 2 library.
66
*
7-
* Copyright (C) 1996-2023 by
7+
* Copyright (C) 1996-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* User-selectable configuration macros (specification only).
66
*
7-
* Copyright (C) 1996-2023 by
7+
* Copyright (C) 1996-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,
@@ -757,6 +757,22 @@ FT_BEGIN_HEADER
757757
#endif
758758

759759

760+
/**************************************************************************
761+
*
762+
* Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning
763+
* implementation (for TrueType fonts only). With this defined, FreeType
764+
* is able to get kerning pair data from the GPOS 'kern' feature as well as
765+
* legacy 'kern' tables; without this defined, FreeType will only be able
766+
* to use legacy 'kern' tables.
767+
*
768+
* Note that FreeType does not support more advanced GPOS layout features;
769+
* even the 'kern' feature implemented here doesn't handle more
770+
* sophisticated kerning variants. Use a higher-level library like
771+
* HarfBuzz instead for that.
772+
*/
773+
/* #define TT_CONFIG_OPTION_GPOS_KERNING */
774+
775+
760776
/*************************************************************************/
761777
/*************************************************************************/
762778
/**** ****/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* ANSI-specific library and header configuration file (specification
66
* only).
77
*
8-
* Copyright (C) 2002-2023 by
8+
* Copyright (C) 2002-2024 by
99
* David Turner, Robert Wilhelm, and Werner Lemberg.
1010
*
1111
* This file is part of the FreeType project, and may only be used,

src/java.desktop/share/native/libfreetype/include/freetype/config/integer-types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* FreeType integer types definitions.
66
*
7-
* Copyright (C) 1996-2023 by
7+
* Copyright (C) 1996-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Mac/OS X support configuration header.
66
*
7-
* Copyright (C) 1996-2023 by
7+
* Copyright (C) 1996-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,

src/java.desktop/share/native/libfreetype/include/freetype/config/public-macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Define a set of compiler macros used in public FreeType headers.
66
*
7-
* Copyright (C) 2020-2023 by
7+
* Copyright (C) 2020-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,

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

Lines changed: 35 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* FreeType high-level API and common types (specification only).
66
*
7-
* Copyright (C) 1996-2023 by
7+
* Copyright (C) 1996-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,
@@ -1322,9 +1322,13 @@ FT_BEGIN_HEADER
13221322
* FT_FACE_FLAG_KERNING ::
13231323
* The face contains kerning information. If set, the kerning distance
13241324
* can be retrieved using the function @FT_Get_Kerning. Otherwise the
1325-
* function always returns the vector (0,0). Note that FreeType
1326-
* doesn't handle kerning data from the SFNT 'GPOS' table (as present
1327-
* in many OpenType fonts).
1325+
* function always returns the vector (0,0).
1326+
*
1327+
* Note that for TrueType fonts only, FreeType supports both the 'kern'
1328+
* table and the basic, pair-wise kerning feature from the 'GPOS' table
1329+
* (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though FreeType does
1330+
* not support the more advanced GPOS layout features; use a library
1331+
* like HarfBuzz for those instead.
13281332
*
13291333
* FT_FACE_FLAG_FAST_GLYPHS ::
13301334
* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.
@@ -3767,87 +3771,18 @@ FT_BEGIN_HEADER
37673771
* pixels and use the @FT_PIXEL_MODE_LCD_V mode.
37683772
*
37693773
* FT_RENDER_MODE_SDF ::
3770-
* This mode corresponds to 8-bit, single-channel signed distance field
3771-
* (SDF) bitmaps. Each pixel in the SDF grid is the value from the
3772-
* pixel's position to the nearest glyph's outline. The distances are
3773-
* calculated from the center of the pixel and are positive if they are
3774-
* filled by the outline (i.e., inside the outline) and negative
3775-
* otherwise. Check the note below on how to convert the output values
3776-
* to usable data.
3774+
* The positive (unsigned) 8-bit bitmap values can be converted to the
3775+
* single-channel signed distance field (SDF) by subtracting 128, with
3776+
* the positive and negative results corresponding to the inside and
3777+
* the outside of a glyph contour, respectively. The distance units are
3778+
* arbitrarily determined by an adjustable @spread property.
37773779
*
37783780
* @note:
3779-
* The selected render mode only affects vector glyphs of a font.
3781+
* The selected render mode only affects scalable vector glyphs of a font.
37803782
* Embedded bitmaps often have a different pixel mode like
37813783
* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them
37823784
* into 8-bit pixmaps.
37833785
*
3784-
* For @FT_RENDER_MODE_SDF the output bitmap buffer contains normalized
3785-
* distances that are packed into unsigned 8-bit values. To get pixel
3786-
* values in floating point representation use the following pseudo-C
3787-
* code for the conversion.
3788-
*
3789-
* ```
3790-
* // Load glyph and render using FT_RENDER_MODE_SDF,
3791-
* // then use the output buffer as follows.
3792-
*
3793-
* ...
3794-
* FT_Byte buffer = glyph->bitmap->buffer;
3795-
*
3796-
*
3797-
* for pixel in buffer
3798-
* {
3799-
* // `sd` is the signed distance and `spread` is the current spread;
3800-
* // the default spread is 2 and can be changed.
3801-
*
3802-
* float sd = (float)pixel - 128.0f;
3803-
*
3804-
*
3805-
* // Convert to pixel values.
3806-
* sd = ( sd / 128.0f ) * spread;
3807-
*
3808-
* // Store `sd` in a buffer or use as required.
3809-
* }
3810-
*
3811-
* ```
3812-
*
3813-
* FreeType has two rasterizers for generating SDF, namely:
3814-
*
3815-
* 1. `sdf` for generating SDF directly from glyph's outline, and
3816-
*
3817-
* 2. `bsdf` for generating SDF from rasterized bitmaps.
3818-
*
3819-
* Depending on the glyph type (i.e., outline or bitmap), one of the two
3820-
* rasterizers is chosen at runtime and used for generating SDFs. To
3821-
* force the use of `bsdf` you should render the glyph with any of the
3822-
* FreeType's other rendering modes (e.g., `FT_RENDER_MODE_NORMAL`) and
3823-
* then re-render with `FT_RENDER_MODE_SDF`.
3824-
*
3825-
* There are some issues with stability and possible failures of the SDF
3826-
* renderers (specifically `sdf`).
3827-
*
3828-
* 1. The `sdf` rasterizer is sensitive to really small features (e.g.,
3829-
* sharp turns that are less than 1~pixel) and imperfections in the
3830-
* glyph's outline, causing artifacts in the final output.
3831-
*
3832-
* 2. The `sdf` rasterizer has limited support for handling intersecting
3833-
* contours and *cannot* handle self-intersecting contours whatsoever.
3834-
* Self-intersection happens when a single connected contour
3835-
* intersects itself at some point; having these in your font
3836-
* definitely poses a problem to the rasterizer and cause artifacts,
3837-
* too.
3838-
*
3839-
* 3. Generating SDF for really small glyphs may result in undesirable
3840-
* output; the pixel grid (which stores distance information) becomes
3841-
* too coarse.
3842-
*
3843-
* 4. Since the output buffer is normalized, precision at smaller spreads
3844-
* is greater than precision at larger spread values because the
3845-
* output range of [0..255] gets mapped to a smaller SDF range. A
3846-
* spread of~2 should be sufficient in most cases.
3847-
*
3848-
* Points (1) and (2) can be avoided by using the `bsdf` rasterizer,
3849-
* which is more stable than the `sdf` rasterizer in general.
3850-
*
38513786
*/
38523787
typedef enum FT_Render_Mode_
38533788
{
@@ -4058,9 +3993,26 @@ FT_BEGIN_HEADER
40583993
* out of the scope of this API function -- they can be implemented
40593994
* through format-specific interfaces.
40603995
*
4061-
* Kerning for OpenType fonts implemented in a 'GPOS' table is not
4062-
* supported; use @FT_HAS_KERNING to find out whether a font has data
4063-
* that can be extracted with `FT_Get_Kerning`.
3996+
* Note that, for TrueType fonts only, this can extract data from both
3997+
* the 'kern' table and the basic, pair-wise kerning feature from the
3998+
* GPOS table (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though
3999+
* FreeType does not support the more advanced GPOS layout features; use
4000+
* a library like HarfBuzz for those instead. If a font has both a
4001+
* 'kern' table and kern features of a GPOS table, the 'kern' table will
4002+
* be used.
4003+
*
4004+
* Also note for right-to-left scripts, the functionality may differ for
4005+
* fonts with GPOS tables vs. 'kern' tables. For GPOS, right-to-left
4006+
* fonts typically use both a placement offset and an advance for pair
4007+
* positioning, which this API does not support, so it would output
4008+
* kerning values of zero; though if the right-to-left font used only
4009+
* advances in GPOS pair positioning, then this API could output kerning
4010+
* values for it, but it would use `left_glyph` to mean the first glyph
4011+
* for that case. Whereas 'kern' tables are always advance-only and
4012+
* always store the left glyph first.
4013+
*
4014+
* Use @FT_HAS_KERNING to find out whether a font has data that can be
4015+
* extracted with `FT_Get_Kerning`.
40644016
*/
40654017
FT_EXPORT( FT_Error )
40664018
FT_Get_Kerning( FT_Face face,
@@ -5222,7 +5174,7 @@ FT_BEGIN_HEADER
52225174
*/
52235175
#define FREETYPE_MAJOR 2
52245176
#define FREETYPE_MINOR 13
5225-
#define FREETYPE_PATCH 2
5177+
#define FREETYPE_PATCH 3
52265178

52275179

52285180
/**************************************************************************

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Quick computation of advance widths (specification only).
66
*
7-
* Copyright (C) 2008-2023 by
7+
* Copyright (C) 2008-2024 by
88
* David Turner, Robert Wilhelm, and Werner Lemberg.
99
*
1010
* This file is part of the FreeType project, and may only be used,

0 commit comments

Comments
 (0)