Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8348596: Update FreeType to 2.13.3 #3011

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions src/java.desktop/share/legal/freetype.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## The FreeType Project: Freetype v2.13.2
## The FreeType Project: Freetype v2.13.3


### FreeType Notice
Expand All @@ -21,23 +21,23 @@ which fits your needs best.
### FreeType License
```

Copyright (C) 1996-2023 by David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright (C) 2007-2023 by Dereg Clegg and Michael Toftdal.
Copyright (C) 1996-2023 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright (C) 2022-2023 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and
Copyright (C) 2004-2023 by Masatake YAMATO and Redhat K.K.
Copyright (C) 2007-2023 by Derek Clegg and Michael Toftdal.
Copyright (C) 2003-2023 by Masatake YAMATO, Red Hat K.K.,
Copyright (C) 1996-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches.
Copyright (C) 2007-2023 by David Turner.
Copyright (C) 2022-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti.
Copyright (C) 2007-2023 by Rahul Bhalerao <[email protected]>, <[email protected]>.
Copyright (C) 2008-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.
Copyright (C) 2013-2023 by Google, Inc.
Copyright (C) 2019-2023 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright (C) 2009-2023 by Oran Agra and Mickey Gabel.
Copyright (C) 2018-2023 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg.
Copyright (C) 2004-2023 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.
Copyright (C) 1996-2024 by David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright (C) 2007-2024 by Dereg Clegg and Michael Toftdal.
Copyright (C) 1996-2024 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright (C) 2022-2024 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and
Copyright (C) 2004-2024 by Masatake YAMATO and Redhat K.K.
Copyright (C) 2007-2024 by Derek Clegg and Michael Toftdal.
Copyright (C) 2003-2024 by Masatake YAMATO, Red Hat K.K.,
Copyright (C) 1996-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches.
Copyright (C) 2007-2024 by David Turner.
Copyright (C) 2022-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti.
Copyright (C) 2007-2024 by Rahul Bhalerao <[email protected]>, <[email protected]>.
Copyright (C) 2008-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.
Copyright (C) 2013-2024 by Google, Inc.
Copyright (C) 2019-2024 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright (C) 2009-2024 by Oran Agra and Mickey Gabel.
Copyright (C) 2018-2024 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg.
Copyright (C) 2004-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.


The FreeType Project LICENSE
Expand Down Expand Up @@ -559,7 +559,7 @@ Public License instead of this License.
```

---------------------------------
The below license applies to the following files:
The below applies to the following file(s):
libfreetype/src/psaux/psarrst.c
libfreetype/src/psaux/psarrst.h
libfreetype/src/psaux/psblues.c
Expand All @@ -582,7 +582,7 @@ libfreetype/src/psaux/psstack.c
libfreetype/src/psaux/psstack.h
libfreetype/src/psaux/pstypes.h

Copyright 2006-2014 Adobe Systems Incorporated.
Copyright (C) 2006-2014 Adobe Systems Incorporated.

This software, and all works of authorship, whether in source or
object code form as indicated by the copyright notice(s) included
Expand Down Expand Up @@ -618,12 +618,12 @@ and you accept them fully.
```

---------------------------------
The below license applies to the following files:
The below applies to the following file(s):
libfreetype/include/freetype/internal/fthash.h
libfreetype/src/base/fthash.c

Copyright 2000 Computing Research Labs, New Mexico State University
Copyright 2001-2015
Copyright (C) 2000 Computing Research Labs, New Mexico State University
Copyright (C) 2001-2015

Francesco Zappa Nardelli

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* ANSI-specific configuration file (specification only).
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down Expand Up @@ -757,6 +757,22 @@ FT_BEGIN_HEADER
#endif


/**************************************************************************
*
* Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning
* implementation (for TrueType fonts only). With this defined, FreeType
* is able to get kerning pair data from the GPOS 'kern' feature as well as
* legacy 'kern' tables; without this defined, FreeType will only be able
* to use legacy 'kern' tables.
*
* Note that FreeType does not support more advanced GPOS layout features;
* even the 'kern' feature implemented here doesn't handle more
* sophisticated kerning variants. Use a higher-level library like
* HarfBuzz instead for that.
*/
/* #define TT_CONFIG_OPTION_GPOS_KERNING */


/*************************************************************************/
/*************************************************************************/
/**** ****/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
* Copyright (C) 2002-2023 by
* Copyright (C) 2002-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType integer types definitions.
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Mac/OS X support configuration header.
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Define a set of compiler macros used in public FreeType headers.
*
* Copyright (C) 2020-2023 by
* Copyright (C) 2020-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
118 changes: 35 additions & 83 deletions src/java.desktop/share/native/libfreetype/include/freetype/freetype.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType high-level API and common types (specification only).
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down Expand Up @@ -1322,9 +1322,13 @@ FT_BEGIN_HEADER
* FT_FACE_FLAG_KERNING ::
* The face contains kerning information. If set, the kerning distance
* can be retrieved using the function @FT_Get_Kerning. Otherwise the
* function always returns the vector (0,0). Note that FreeType
* doesn't handle kerning data from the SFNT 'GPOS' table (as present
* in many OpenType fonts).
* function always returns the vector (0,0).
*
* Note that for TrueType fonts only, FreeType supports both the 'kern'
* table and the basic, pair-wise kerning feature from the 'GPOS' table
* (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though FreeType does
* not support the more advanced GPOS layout features; use a library
* like HarfBuzz for those instead.
*
* FT_FACE_FLAG_FAST_GLYPHS ::
* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.
Expand Down Expand Up @@ -3767,87 +3771,18 @@ FT_BEGIN_HEADER
* pixels and use the @FT_PIXEL_MODE_LCD_V mode.
*
* FT_RENDER_MODE_SDF ::
* This mode corresponds to 8-bit, single-channel signed distance field
* (SDF) bitmaps. Each pixel in the SDF grid is the value from the
* pixel's position to the nearest glyph's outline. The distances are
* calculated from the center of the pixel and are positive if they are
* filled by the outline (i.e., inside the outline) and negative
* otherwise. Check the note below on how to convert the output values
* to usable data.
* The positive (unsigned) 8-bit bitmap values can be converted to the
* single-channel signed distance field (SDF) by subtracting 128, with
* the positive and negative results corresponding to the inside and
* the outside of a glyph contour, respectively. The distance units are
* arbitrarily determined by an adjustable @spread property.
*
* @note:
* The selected render mode only affects vector glyphs of a font.
* The selected render mode only affects scalable vector glyphs of a font.
* Embedded bitmaps often have a different pixel mode like
* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them
* into 8-bit pixmaps.
*
* For @FT_RENDER_MODE_SDF the output bitmap buffer contains normalized
* distances that are packed into unsigned 8-bit values. To get pixel
* values in floating point representation use the following pseudo-C
* code for the conversion.
*
* ```
* // Load glyph and render using FT_RENDER_MODE_SDF,
* // then use the output buffer as follows.
*
* ...
* FT_Byte buffer = glyph->bitmap->buffer;
*
*
* for pixel in buffer
* {
* // `sd` is the signed distance and `spread` is the current spread;
* // the default spread is 2 and can be changed.
*
* float sd = (float)pixel - 128.0f;
*
*
* // Convert to pixel values.
* sd = ( sd / 128.0f ) * spread;
*
* // Store `sd` in a buffer or use as required.
* }
*
* ```
*
* FreeType has two rasterizers for generating SDF, namely:
*
* 1. `sdf` for generating SDF directly from glyph's outline, and
*
* 2. `bsdf` for generating SDF from rasterized bitmaps.
*
* Depending on the glyph type (i.e., outline or bitmap), one of the two
* rasterizers is chosen at runtime and used for generating SDFs. To
* force the use of `bsdf` you should render the glyph with any of the
* FreeType's other rendering modes (e.g., `FT_RENDER_MODE_NORMAL`) and
* then re-render with `FT_RENDER_MODE_SDF`.
*
* There are some issues with stability and possible failures of the SDF
* renderers (specifically `sdf`).
*
* 1. The `sdf` rasterizer is sensitive to really small features (e.g.,
* sharp turns that are less than 1~pixel) and imperfections in the
* glyph's outline, causing artifacts in the final output.
*
* 2. The `sdf` rasterizer has limited support for handling intersecting
* contours and *cannot* handle self-intersecting contours whatsoever.
* Self-intersection happens when a single connected contour
* intersects itself at some point; having these in your font
* definitely poses a problem to the rasterizer and cause artifacts,
* too.
*
* 3. Generating SDF for really small glyphs may result in undesirable
* output; the pixel grid (which stores distance information) becomes
* too coarse.
*
* 4. Since the output buffer is normalized, precision at smaller spreads
* is greater than precision at larger spread values because the
* output range of [0..255] gets mapped to a smaller SDF range. A
* spread of~2 should be sufficient in most cases.
*
* Points (1) and (2) can be avoided by using the `bsdf` rasterizer,
* which is more stable than the `sdf` rasterizer in general.
*
*/
typedef enum FT_Render_Mode_
{
Expand Down Expand Up @@ -4058,9 +3993,26 @@ FT_BEGIN_HEADER
* out of the scope of this API function -- they can be implemented
* through format-specific interfaces.
*
* Kerning for OpenType fonts implemented in a 'GPOS' table is not
* supported; use @FT_HAS_KERNING to find out whether a font has data
* that can be extracted with `FT_Get_Kerning`.
* Note that, for TrueType fonts only, this can extract data from both
* the 'kern' table and the basic, pair-wise kerning feature from the
* GPOS table (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though
* FreeType does not support the more advanced GPOS layout features; use
* a library like HarfBuzz for those instead. If a font has both a
* 'kern' table and kern features of a GPOS table, the 'kern' table will
* be used.
*
* Also note for right-to-left scripts, the functionality may differ for
* fonts with GPOS tables vs. 'kern' tables. For GPOS, right-to-left
* fonts typically use both a placement offset and an advance for pair
* positioning, which this API does not support, so it would output
* kerning values of zero; though if the right-to-left font used only
* advances in GPOS pair positioning, then this API could output kerning
* values for it, but it would use `left_glyph` to mean the first glyph
* for that case. Whereas 'kern' tables are always advance-only and
* always store the left glyph first.
*
* Use @FT_HAS_KERNING to find out whether a font has data that can be
* extracted with `FT_Get_Kerning`.
*/
FT_EXPORT( FT_Error )
FT_Get_Kerning( FT_Face face,
Expand Down Expand Up @@ -5222,7 +5174,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 13
#define FREETYPE_PATCH 2
#define FREETYPE_PATCH 3


/**************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Quick computation of advance widths (specification only).
*
* Copyright (C) 2008-2023 by
* Copyright (C) 2008-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType exact bbox computation (specification).
*
* Copyright (C) 1996-2023 by
* Copyright (C) 1996-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType API for accessing BDF-specific strings (specification).
*
* Copyright (C) 2002-2023 by
* Copyright (C) 2002-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType utility functions for bitmaps (specification).
*
* Copyright (C) 2004-2023 by
* Copyright (C) 2004-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType API for accessing CID font information (specification).
*
* Copyright (C) 2007-2023 by
* Copyright (C) 2007-2024 by
* Dereg Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType's glyph color management (specification).
*
* Copyright (C) 2018-2023 by
* Copyright (C) 2018-2024 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Loading