Skip to content

8348597: Update HarfBuzz to 10.4.0 #3026

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

Open
wants to merge 5 commits 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
12 changes: 9 additions & 3 deletions make/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -556,19 +556,25 @@ else
HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS
endif
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc
# hb-subset and hb-style APIs are not needed, excluded to cut on compilation time.
LIBFONTMANAGER_EXCLUDE_FILES += hb-ft.cc hb-subset-cff-common.cc \
hb-subset-cff1.cc hb-subset-cff2.cc hb-subset-input.cc hb-subset-plan.cc \
hb-subset.cc hb-subset-instancer-solver.cc gsubgpos-context.cc hb-style.cc

# list of disabled warnings and the compilers for which it was specifically added.
# array-bounds -> GCC 12 on Alpine Linux
# parentheses -> GCC 6
# range-loop-analysis -> clang on Xcode12

HARFBUZZ_DISABLED_WARNINGS_gcc := type-limits missing-field-initializers strict-aliasing \
array-bounds
array-bounds dangling-pointer
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
# calloc-transposed-args required for GCC 14 builds. (fixed upstream in Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
maybe-uninitialized class-memaccess unused-result extra noexcept-type expansion-to-defined
maybe-uninitialized class-memaccess unused-result extra noexcept-type expansion-to-defined \
dangling-reference maybe-uninitialized calloc-transposed-args attributes
HARFBUZZ_DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
tautological-constant-out-of-range-compare int-to-pointer-cast \
undef missing-field-initializers deprecated-declarations c++11-narrowing range-loop-analysis
Expand Down
15 changes: 8 additions & 7 deletions src/java.desktop/share/legal/harfbuzz.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Harfbuzz v8.2.2
## Harfbuzz v10.4.0

### Harfbuzz License

Expand All @@ -8,14 +8,14 @@ HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
For parts of HarfBuzz that are licensed under different licenses see individual
files names COPYING in subdirectories where applicable.

Copyright © 2010-2023 Google, Inc.
Copyright © 2010-2024 Google, Inc.
Copyright © 2018-2020 Ebrahim Byagowi
Copyright © 2004-2013 Red Hat, Inc.
Copyright © 2019 Facebook, Inc.
Copyright (C) 2012 Zilong Tan ([email protected])
Copyright © 2007 Chris Wilson
Copyright © 2018-2019 Adobe Inc.
Copyright © 2006-2023 Behdad Esfahbod
Copyright © 2006-2025 Behdad Esfahbod
Copyright © 1998-2004 David Turner and Werner Lemberg
Copyright © 2009 Keith Stribley
Copyright © 2018 Khaled Hosny
Expand Down Expand Up @@ -54,7 +54,7 @@ exception is licensed with a slightly different MIT variant:
The contents of this directory are licensed under the following terms:

---------------------------------
The below license applies to the following files:
The below applies to the following file(s):
libharfbuzz/hb-ucd.cc

Copyright (C) 2012 Grigori Goronzy <[email protected]>
Expand All @@ -72,13 +72,14 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---------------------------------
The below license applies to the following files:
The below applies to the following file(s):
libharfbuzz/hb-unicode-emoji-table.hh

© 2023 Unicode®, Inc.
© 2024 Unicode®, Inc.

Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.
in the U.S. and other countries.
For terms of use, see https://www.unicode.org/terms_of_use.html
For terms of use and license, see https://www.unicode.org/terms_of_use.html

</pre>

Expand Down
10 changes: 9 additions & 1 deletion src/java.desktop/share/native/libharfbuzz/OT/Color/CBDT/CBDT.hh
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ struct IndexSubtable
{
TRACE_SANITIZE (this);
if (!u.header.sanitize (c)) return_trace (false);
hb_barrier ();
switch (u.header.indexFormat)
{
case 1: return_trace (u.format1.sanitize (c, glyph_count));
Expand Down Expand Up @@ -378,6 +379,7 @@ struct IndexSubtableRecord
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
hb_barrier () &&
firstGlyphIndex <= lastGlyphIndex &&
offsetToSubtable.sanitize (c, base, lastGlyphIndex - firstGlyphIndex + 1));
}
Expand Down Expand Up @@ -635,6 +637,7 @@ struct BitmapSizeTable
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
hb_barrier () &&
indexSubtableArrayOffset.sanitize (c, base, numberOfIndexSubtables) &&
horizontal.sanitize (c) &&
vertical.sanitize (c));
Expand Down Expand Up @@ -738,7 +741,9 @@ struct CBLC
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
hb_barrier () &&
likely (version.major == 2 || version.major == 3) &&
hb_barrier () &&
sizeTables.sanitize (c, this));
}

Expand Down Expand Up @@ -936,10 +941,12 @@ struct CBDT
}
}

bool has_data () const { return cbdt.get_length (); }
bool has_data () const { return cbdt->version.major; }

bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const
{
if (!has_data ()) return false;

hb_glyph_extents_t extents;
hb_glyph_extents_t pixel_extents;
hb_blob_t *blob = reference_png (font, glyph);
Expand Down Expand Up @@ -975,6 +982,7 @@ struct CBDT
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
hb_barrier () &&
likely (version.major == 2 || version.major == 3));
}

Expand Down
Loading