Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit c6fc478

Browse files
author
Dmitry Cherepanov
committed
8247872: Upgrade HarfBuzz to the latest 2.7.2
Reviewed-by: yan Backport-of: ed7526a66c67e15cb09da733d3dde50ddabc24ba
1 parent bde87a3 commit c6fc478

File tree

204 files changed

+31884
-19413
lines changed

Some content is hidden

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

204 files changed

+31884
-19413
lines changed

make/modules/java.desktop/lib/Awt2dLibraries.gmk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
440440
BUILD_LIBFONTMANAGER_FONTLIB += $(HARFBUZZ_LIBS)
441441
else
442442
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz
443-
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN -DHAVE_ROUND
443+
# Modern HarfBuzz requires c++11.
444+
HARFBUZZ_CXXFLAGS := -std=c++11
444445

445446
ifeq ($(call isTargetOs, windows), false)
446447
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
@@ -465,7 +466,7 @@ else
465466
maybe-uninitialized class-memaccess
466467
HARFBUZZ_DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
467468
tautological-constant-out-of-range-compare int-to-pointer-cast \
468-
undef missing-field-initializers
469+
undef missing-field-initializers range-loop-analysis
469470
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244 4090 4146 4334 4819 4101 4068 4805 4138
470471

471472
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
@@ -520,7 +521,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
520521
AccelGlyphCache.c, \
521522
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
522523
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
523-
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
524+
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS) $(HARFBUZZ_CXXFLAGS), \
524525
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
525526
CFLAGS_windows = -DCC_NOEX, \
526527
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
## Harfbuzz v2.3.1
1+
## Harfbuzz v2.7.2
22

33
### Harfbuzz License
44

5-
http://cgit.freedesktop.org/harfbuzz/tree/COPYING
5+
https://github.com/harfbuzz/harfbuzz/blob/master/COPYING
66

77
<pre>
88

9-
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
9+
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
1010
For parts of HarfBuzz that are licensed under different licenses see individual
1111
files names COPYING in subdirectories where applicable.
1212

13-
Copyright © 2010,2011,2012 Google, Inc.
13+
Copyright © 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Google, Inc.
14+
Copyright © 2018,2019,2020 Ebrahim Byagowi
15+
Copyright © 2019,2020 Facebook, Inc.
1416
Copyright © 2012 Mozilla Foundation
1517
Copyright © 2011 Codethink Limited
1618
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)

src/java.desktop/share/native/libharfbuzz/hb-aat-fdsc-table.hh

Lines changed: 0 additions & 126 deletions
This file was deleted.

src/java.desktop/share/native/libharfbuzz/hb-aat-layout-ankr-table.hh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct ankr
6666
{
6767
const NNOffsetTo<GlyphAnchors> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
6868
if (!offset)
69-
return Null(Anchor);
69+
return Null (Anchor);
7070
const GlyphAnchors &anchors = &(this+anchorData) + *offset;
7171
return anchors[i];
7272
}
@@ -76,13 +76,14 @@ struct ankr
7676
TRACE_SANITIZE (this);
7777
return_trace (likely (c->check_struct (this) &&
7878
version == 0 &&
79+
c->check_range (this, anchorData) &&
7980
lookupTable.sanitize (c, this, &(this+anchorData))));
8081
}
8182

8283
protected:
8384
HBUINT16 version; /* Version number (set to zero) */
8485
HBUINT16 flags; /* Flags (currently unused; set to zero) */
85-
LOffsetTo<Lookup<NNOffsetTo<GlyphAnchors> > >
86+
LOffsetTo<Lookup<NNOffsetTo<GlyphAnchors>>>
8687
lookupTable; /* Offset to the table's lookup table */
8788
LNNOffsetTo<HBUINT8>
8889
anchorData; /* Offset to the glyph data table */

src/java.desktop/share/native/libharfbuzz/hb-aat-layout-bsln-table.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct BaselineTableFormat2Part
8282
}
8383

8484
protected:
85-
GlyphID stdGlyph; /* The specific glyph index number in this
85+
HBGlyphID stdGlyph; /* The specific glyph index number in this
8686
* font that is used to set the baseline values.
8787
* This is the standard glyph.
8888
* This glyph must contain a set of control points
@@ -101,11 +101,11 @@ struct BaselineTableFormat3Part
101101
bool sanitize (hb_sanitize_context_t *c) const
102102
{
103103
TRACE_SANITIZE (this);
104-
return_trace (c->check_struct (this) && lookupTable.sanitize (c));
104+
return_trace (likely (c->check_struct (this) && lookupTable.sanitize (c)));
105105
}
106106

107107
protected:
108-
GlyphID stdGlyph; /* ditto */
108+
HBGlyphID stdGlyph; /* ditto */
109109
HBUINT16 ctlPoints[32]; /* ditto */
110110
Lookup<HBUINT16>
111111
lookupTable; /* Lookup table that maps glyphs to their

0 commit comments

Comments
 (0)