Skip to content

Commit

Permalink
Update HarfBuzz from Chromium 114.0.5735.358
Browse files Browse the repository at this point in the history
Issue: 326748668
Reviewed-on: #3168
  • Loading branch information
dahlstrom-g authored May 8, 2024
2 parents f842cd7 + 703182b commit a87dc14
Show file tree
Hide file tree
Showing 547 changed files with 49,801 additions and 10,531 deletions.
26 changes: 19 additions & 7 deletions third_party/harfbuzz-ng/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ if (use_system_harfbuzz) {
]

sources = [
"src/src/OT/Color/CBDT/CBDT.hh",
"src/src/OT/Color/COLR/COLR.hh",
"src/src/OT/Color/CPAL/CPAL.hh",
"src/src/OT/Color/sbix/sbix.hh",
"src/src/OT/Color/svg/svg.hh",
"src/src/OT/Layout/GDEF/GDEF.hh",
"src/src/OT/glyf/VarCompositeGlyph.hh",
"src/src/OT/glyf/composite-iter.hh",
"src/src/OT/glyf/coord-setter.hh",
"src/src/OT/name/name.hh",
"src/src/graph/classdef-graph.hh",
"src/src/graph/coverage-graph.hh",
"src/src/graph/gsubgpos-context.cc",
Expand Down Expand Up @@ -98,7 +108,8 @@ if (use_system_harfbuzz) {
"src/src/hb-blob.cc",
"src/src/hb-blob.hh",
"src/src/hb-buffer-deserialize-json.hh",
"src/src/hb-buffer-deserialize-text.hh",
"src/src/hb-buffer-deserialize-text-glyphs.hh",
"src/src/hb-buffer-deserialize-text-unicode.hh",
"src/src/hb-buffer-serialize.cc",
"src/src/hb-buffer-verify.cc",
"src/src/hb-buffer.cc",
Expand All @@ -117,6 +128,7 @@ if (use_system_harfbuzz) {
"src/src/hb-draw.cc",
"src/src/hb-draw.h",
"src/src/hb-draw.hh",
"src/src/hb-face-builder.cc",
"src/src/hb-face.cc",
"src/src/hb-face.hh",
"src/src/hb-font.cc",
Expand All @@ -125,11 +137,13 @@ if (use_system_harfbuzz) {
"src/src/hb-icu.cc",
"src/src/hb-iter.hh",
"src/src/hb-kern.hh",
"src/src/hb-limits.hh",
"src/src/hb-machinery.hh",
"src/src/hb-map.cc",
"src/src/hb-map.hh",
"src/src/hb-meta.hh",
"src/src/hb-ms-feature-ranges.hh",
"src/src/hb-multimap.hh",
"src/src/hb-mutex.hh",
"src/src/hb-null.hh",
"src/src/hb-number-parser.hh",
Expand All @@ -145,12 +159,6 @@ if (use_system_harfbuzz) {
"src/src/hb-ot-cff2-table.cc",
"src/src/hb-ot-cff2-table.hh",
"src/src/hb-ot-cmap-table.hh",
"src/src/hb-ot-color-cbdt-table.hh",
"src/src/hb-ot-color-colr-table.hh",
"src/src/hb-ot-color-colrv1-closure.hh",
"src/src/hb-ot-color-cpal-table.hh",
"src/src/hb-ot-color-sbix-table.hh",
"src/src/hb-ot-color-svg-table.hh",
"src/src/hb-ot-color.cc",
"src/src/hb-ot-color.h",
"src/src/hb-ot-deprecated.h",
Expand Down Expand Up @@ -233,12 +241,15 @@ if (use_system_harfbuzz) {
"src/src/hb-ot-tag.cc",
"src/src/hb-ot-var-avar-table.hh",
"src/src/hb-ot-var-common.hh",
"src/src/hb-ot-var-cvar-table.hh",
"src/src/hb-ot-var-fvar-table.hh",
"src/src/hb-ot-var-gvar-table.hh",
"src/src/hb-ot-var-hvar-table.hh",
"src/src/hb-ot-var-mvar-table.hh",
"src/src/hb-ot-var.cc",
"src/src/hb-ot-vorg-table.hh",
"src/src/hb-paint-extents.cc",
"src/src/hb-paint-extents.hh",
"src/src/hb-pool.hh",
"src/src/hb-priority-queue.hh",
"src/src/hb-repacker.hh",
Expand Down Expand Up @@ -309,6 +320,7 @@ if (use_system_harfbuzz) {
"HAVE_ICU",
"HAVE_ICU_BUILTIN",
"HB_NO_MMAP",
"HB_NO_PAINT",
"HB_NO_RESOURCE_FORK",

# Size reductions by disabling parts that we do not currently require:
Expand Down
4 changes: 2 additions & 2 deletions third_party/harfbuzz-ng/METADATA
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
third_party {
identifier {
type: "ChromiumVersion"
value: "112.0.5615.134" # from https://chromereleases.googleblog.com/2023/04/stable-channel-update-for-chromeos_19.html
value: "114.0.5735.358" # from https://chromereleases.googleblog.com/2024/03/long-term-support-channel-update-for_26.html
}
identifier {
type: "Git"
value: "https://chromium.googlesource.com/chromium/src.git"
version: "53b87ba394bbdcf2f9d63e985ca5385a5b420ca9"
version: "1759c6ae9316996b9f150c0ce9d0ca78a3d15c02"
}
identifier {
type: "UpstreamSubdir"
Expand Down
8 changes: 5 additions & 3 deletions third_party/harfbuzz-ng/src/.ci/build-win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
set -e

meson --cross-file=.ci/win32-cross-file.txt \
--wrap-mode=forcefallback \
--wrap-mode=default \
-Dtests=disabled \
-Dcairo=enabled \
-Dcairo:fontconfig=disabled \
-Dcairo:freetype=disabled \
-Dcairo:dwrite=disabled \
-Dcairo:tests=disabled \
-Dglib=enabled \
-Dfreetype=enabled \
-Dfreetype=disabled \
-Dgdi=enabled \
-Ddirectwrite=enabled \
-Dcairo=enabled \
win32build \
$@

Expand Down
8 changes: 5 additions & 3 deletions third_party/harfbuzz-ng/src/.ci/build-win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
set -e

meson --cross-file=.ci/win64-cross-file.txt \
--wrap-mode=forcefallback \
--wrap-mode=default \
-Dtests=disabled \
-Dcairo=enabled \
-Dcairo:fontconfig=disabled \
-Dcairo:freetype=disabled \
-Dcairo:dwrite=disabled \
-Dcairo:tests=disabled \
-Dglib=enabled \
-Dfreetype=enabled \
-Dfreetype=disabled \
-Dgdi=enabled \
-Ddirectwrite=enabled \
-Dcairo=enabled \
win64build \
$@

Expand Down
49 changes: 18 additions & 31 deletions third_party/harfbuzz-ng/src/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
xcode: "12.5.1"
steps:
- checkout
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config ragel freetype glib cairo python3 icu4c graphite2 gobject-introspection gtk-doc ninja
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config ragel freetype glib cairo python3 icu4c graphite2 gobject-introspection ninja
- run: pip3 install meson --upgrade
- run: PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" meson build -Dcoretext=enabled -Dgraphite=enabled -Dauto_features=enabled -Dchafa=disabled
- run: PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" meson setup build -Dcoretext=enabled -Dgraphite=enabled -Dauto_features=enabled -Dchafa=disabled -Ddocs=disabled
- run: meson compile -Cbuild
- run: meson test -Cbuild --print-errorlogs
- store_artifacts:
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
steps:
- checkout
- run: dnf install -y pkg-config ragel valgrind gcc gcc-c++ meson git glib2-devel freetype-devel cairo-devel libicu-devel gobject-introspection-devel graphite2-devel redhat-rpm-config python python-pip || true
- run: meson build --buildtype=debugoptimized
- run: ninja -Cbuild -j9
- run: meson setup build --buildtype=debugoptimized
- run: meson compile -Cbuild -j9
# TOOD: increase timeouts and remove --no-suite=slow
- run: RUN_VALGRIND=1 meson test -Cbuild --no-suite=slow --wrap='valgrind --leak-check=full --error-exitcode=1' --print-errorlogs --num-processes=$(($(nproc)/2 + 1))

Expand All @@ -69,24 +69,9 @@ jobs:
- checkout
- run: apk update && apk add ragel gcc g++ glib-dev freetype-dev cairo-dev git py3-pip ninja
- run: pip3 install meson==0.56.0
- run: meson build --buildtype=minsize
- run: ninja -Cbuild -j9
- run: meson test -Cbuild --print-errorlogs

archlinux:
docker:
- image: archlinux/base
steps:
- checkout
- run: pacman --noconfirm -Syu freetype2 meson git clang cairo icu gettext gobject-introspection gcc gcc-libs glib2 graphite pkg-config ragel python python-pip base-devel gtk-doc
- run: pip install flake8 fonttools
- run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
- run: meson build -Dgraphite=enabled -Dauto_features=enabled -Dexperimental_api=true
- run: meson setup build --buildtype=minsize
- run: meson compile -Cbuild -j9
- run: meson test -Cbuild --print-errorlogs
- run: meson dist -Cbuild
- run: clang -c src/harfbuzz.cc -DHB_NO_MT
- run: clang -c src/hb-*.cc -DHB_NO_MT -DHB_TINY -DHB_NO_OT_FONT

asan-ubsan:
docker:
Expand All @@ -96,8 +81,9 @@ jobs:
- run: apt update || true
- run: DEBIAN_FRONTEND=noninteractive apt install -y python3 python3-pip ninja-build clang lld git binutils pkg-config ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev
- run: pip3 install meson==0.56.0
- run: CC=clang CXX=clang++ meson build --default-library=static -Db_sanitize=address,undefined --buildtype=debugoptimized --wrap-mode=nodownload -Dexperimental_api=true
- run: ninja -Cbuild -j8 && meson test -Cbuild --print-errorlogs | asan_symbolize | c++filt
- run: CC=clang CXX=clang++ meson setup build --default-library=static -Db_sanitize=address,undefined --buildtype=debugoptimized --wrap-mode=nodownload -Dexperimental_api=true
- run: meson compile -Cbuild -j9
- run: meson test -Cbuild --print-errorlogs | asan_symbolize | c++filt

tsan:
docker:
Expand All @@ -107,8 +93,9 @@ jobs:
- run: apt update || true
- run: DEBIAN_FRONTEND=noninteractive apt install -y python3 python3-pip ninja-build clang lld git binutils pkg-config ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev
- run: pip3 install meson==0.56.0
- run: CC=clang CXX=clang++ meson build --default-library=static -Db_sanitize=thread --buildtype=debugoptimized --wrap-mode=nodownload -Dexperimental_api=true
- run: ninja -Cbuild -j8 && meson test -Cbuild --print-errorlogs | asan_symbolize | c++filt
- run: CC=clang CXX=clang++ meson setup build --default-library=static -Db_sanitize=thread --buildtype=debugoptimized --wrap-mode=nodownload -Dexperimental_api=true
- run: meson compile -Cbuild -j9
- run: meson test -Cbuild --print-errorlogs | asan_symbolize | c++filt

msan:
docker:
Expand All @@ -119,8 +106,9 @@ jobs:
- run: DEBIAN_FRONTEND=noninteractive apt install -y python3 python3-pip ninja-build clang lld git binutils pkg-config ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev
- run: pip3 install meson==0.56.0
# msan, needs --force-fallback-for=glib,freetype2 also which doesn't work yet but runs fuzzer cases at least
- run: CC=clang CXX=clang++ meson build --default-library=static -Db_sanitize=memory --buildtype=debugoptimized --wrap-mode=nodownload -Dauto_features=disabled -Dtests=enabled -Dexperimental_api=true
- run: ninja -Cbuild -j8 && meson test -Cbuild --print-errorlogs | asan_symbolize | c++filt
- run: CC=clang CXX=clang++ meson setup build --default-library=static -Db_sanitize=memory --buildtype=debugoptimized --wrap-mode=nodownload -Dauto_features=disabled -Dtests=enabled -Dexperimental_api=true
- run: meson compile -Cbuild -j9
- run: meson test -Cbuild --print-errorlogs | asan_symbolize | c++filt

clang-cxx2a:
docker:
Expand All @@ -135,8 +123,8 @@ jobs:
executor: win32-executor
steps:
- checkout
- run: sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y ninja-build gtk-doc-tools python3 python3-pip git g++-mingw-w64-i686 zip
- run: pip3 install meson==0.56.0 --upgrade
- run: sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y ninja-build python3 python3-pip git g++-mingw-w64-i686 zip
- run: pip3 install meson==0.60.0
- run: .ci/build-win32.sh
- store_artifacts:
path: harfbuzz-win32.zip
Expand All @@ -158,8 +146,8 @@ jobs:
executor: win64-executor
steps:
- checkout
- run: sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y ninja-build gtk-doc-tools python3 python3-pip git g++-mingw-w64-x86-64 zip
- run: pip3 install meson==0.56.0 --upgrade
- run: sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y ninja-build python3 python3-pip git g++-mingw-w64-x86-64 zip
- run: pip3 install meson==0.60.0
- run: bash .ci/build-win64.sh
- store_artifacts:
path: harfbuzz-win64.zip
Expand Down Expand Up @@ -198,7 +186,6 @@ workflows:
ignore: /.*/
- fedora-valgrind
- alpine
#- archlinux
- asan-ubsan
- tsan
- msan
Expand Down
8 changes: 5 additions & 3 deletions third_party/harfbuzz-ng/src/.codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
comment: off
comment: false

coverage:
status:
project:
default:
threshold: 1%
patch: off
informational: true
patch:
default:
informational: true
4 changes: 4 additions & 0 deletions third_party/harfbuzz-ng/src/.github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CIFuzz
on: [pull_request]

permissions:
contents: read

jobs:
Fuzzing:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
Expand Down
76 changes: 45 additions & 31 deletions third_party/harfbuzz-ng/src/.github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,60 @@ permissions:

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: install dependencies
run: sudo apt-get update && sudo apt-get install pkg-config gcc gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python3 python3-setuptools ninja-build gobject-introspection libgirepository1.0-dev
- run: sudo pip3 install fonttools meson==0.56.0 gcovr==5.0
- name: run
run: meson build -Db_coverage=true --auto-features=enabled -Dgraphite=enabled -Dchafa=disabled -Dragel_subproject=true -Doptimization=2
- name: ci
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }}
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install \
gcc \
gobject-introspection \
gtk-doc-tools \
libcairo2-dev \
libfreetype6-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libgraphite2-dev \
libicu-dev \
ninja-build \
pkg-config \
python3 \
python3-setuptools
- name: Install Python Dependencies
run: sudo pip3 install fonttools meson==0.56.0 gcovr==5.0
- name: Setup Meson
run: |
ccache --version
meson setup build \
-Dauto_features=enabled \
-Dchafa=disabled \
-Dgraphite=enabled \
-Doptimization=2 \
-Db_coverage=true \
-Ddoc_tests=true \
-Dragel_subproject=true
- name: Build
run: meson compile -Cbuild
- name: Test
run: meson test --print-errorlogs -Cbuild

- name: generate documentations
- name: Generate Documentations
run: ninja -Cbuild harfbuzz-doc
- name: deploy documentations
- name: Deploy Documentations
if: github.ref_type == 'tag'
run: .ci/deploy-docs.sh
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REVISION: ${{ github.sha }}

# waiting for https://github.com/rhysd/github-action-benchmark/issues/36 to happen
# - name: benchmark
# run: build/perf/perf --benchmark_format=json > perf/result.json
# - name: store benchmark result
# uses: rhysd/github-action-benchmark@b2ee598
# if: github.event_name != 'pull_request'
# with:
# name: C++ Benchmark
# tool: 'googlecpp'
# output-file-path: perf/result.json
# gh-pages-branch: gh-pages
# github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# auto-push: true
# alert-threshold: '150%'
# comment-on-alert: true
# fail-on-alert: true

- name: cov
- name: Generate Coverage
run: ninja -Cbuild coverage-xml
- uses: codecov/codecov-action@v3
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
file: build/meson-logs/coverage.xml
Loading

0 comments on commit a87dc14

Please sign in to comment.