Skip to content

Commit e41de3f

Browse files
author
Antonio Vieiro
committed
8348597: Update HarfBuzz to 10.4.0
8319197: Exclude hb-subset and hb-style from compilation Reviewed-by: sgehwolf, andrew Backport-of: f4e99de33e35826ec1fb368d6ad96005d7bd5cc4
1 parent 37123ee commit e41de3f

File tree

193 files changed

+15572
-8546
lines changed

Some content is hidden

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

193 files changed

+15572
-8546
lines changed

make/lib/Awt2dLibraries.gmk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,15 +556,18 @@ else
556556
HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS
557557
endif
558558
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
559-
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc
559+
# hb-subset and hb-style APIs are not needed, excluded to cut on compilation time.
560+
LIBFONTMANAGER_EXCLUDE_FILES += hb-ft.cc hb-subset-cff-common.cc \
561+
hb-subset-cff1.cc hb-subset-cff2.cc hb-subset-input.cc hb-subset-plan.cc \
562+
hb-subset.cc hb-subset-instancer-solver.cc gsubgpos-context.cc hb-style.cc
560563

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

566569
HARFBUZZ_DISABLED_WARNINGS_gcc := type-limits missing-field-initializers strict-aliasing \
567-
array-bounds
570+
array-bounds dangling-pointer
568571
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
569572
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
570573
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Harfbuzz v8.2.2
1+
## Harfbuzz v10.4.0
22

33
### Harfbuzz License
44

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

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

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

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

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

78-
© 2023 Unicode®, Inc.
78+
© 2024 Unicode®, Inc.
79+
7980
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.
8081
in the U.S. and other countries.
81-
For terms of use, see https://www.unicode.org/terms_of_use.html
82+
For terms of use and license, see https://www.unicode.org/terms_of_use.html
8283

8384
</pre>
8485

src/java.desktop/share/native/libharfbuzz/OT/Color/CBDT/CBDT.hh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ struct IndexSubtable
204204
{
205205
TRACE_SANITIZE (this);
206206
if (!u.header.sanitize (c)) return_trace (false);
207+
hb_barrier ();
207208
switch (u.header.indexFormat)
208209
{
209210
case 1: return_trace (u.format1.sanitize (c, glyph_count));
@@ -378,6 +379,7 @@ struct IndexSubtableRecord
378379
{
379380
TRACE_SANITIZE (this);
380381
return_trace (c->check_struct (this) &&
382+
hb_barrier () &&
381383
firstGlyphIndex <= lastGlyphIndex &&
382384
offsetToSubtable.sanitize (c, base, lastGlyphIndex - firstGlyphIndex + 1));
383385
}
@@ -635,6 +637,7 @@ struct BitmapSizeTable
635637
{
636638
TRACE_SANITIZE (this);
637639
return_trace (c->check_struct (this) &&
640+
hb_barrier () &&
638641
indexSubtableArrayOffset.sanitize (c, base, numberOfIndexSubtables) &&
639642
horizontal.sanitize (c) &&
640643
vertical.sanitize (c));
@@ -738,7 +741,9 @@ struct CBLC
738741
{
739742
TRACE_SANITIZE (this);
740743
return_trace (c->check_struct (this) &&
744+
hb_barrier () &&
741745
likely (version.major == 2 || version.major == 3) &&
746+
hb_barrier () &&
742747
sizeTables.sanitize (c, this));
743748
}
744749

@@ -936,10 +941,12 @@ struct CBDT
936941
}
937942
}
938943

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

941946
bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const
942947
{
948+
if (!has_data ()) return false;
949+
943950
hb_glyph_extents_t extents;
944951
hb_glyph_extents_t pixel_extents;
945952
hb_blob_t *blob = reference_png (font, glyph);
@@ -975,6 +982,7 @@ struct CBDT
975982
{
976983
TRACE_SANITIZE (this);
977984
return_trace (c->check_struct (this) &&
985+
hb_barrier () &&
978986
likely (version.major == 2 || version.major == 3));
979987
}
980988

0 commit comments

Comments
 (0)