mirror of
https://github.com/openharmony/third_party_harfbuzz.git
synced 2026-07-01 10:04:31 -04:00
!81 HarfBuzz update version 11.0.0
Merge pull request !81 from Zacoh/harfbuzz0514
This commit is contained in:
@@ -14,62 +14,63 @@ if (defined(ohos_lite)) {
|
||||
import("//build/ohos.gni")
|
||||
}
|
||||
config("harfbuzz_config") {
|
||||
include_dirs = [ "${target_gen_dir}/harfbuzz-2.8.2/src" ]
|
||||
include_dirs = [ "${target_gen_dir}/harfbuzz-11.0.0/src" ]
|
||||
}
|
||||
|
||||
action("harfbuzz_action") {
|
||||
script = "//third_party/harfbuzz/install.py"
|
||||
outputs = [
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-aat-layout.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-aat-map.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-blob.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-buffer-serialize.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-buffer.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-common.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-face.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-fallback-shape.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-font.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-map.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-number.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-cff1-table.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-cff2-table.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-face.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-font.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-layout.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-map.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-math.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-meta.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-metrics.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-name.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-arabic.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-default.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-hangul.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-hebrew.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-indic-table.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-indic.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-khmer.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-myanmar.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-syllabic.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-thai.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-use.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-complex-vowel-constraints.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-fallback.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape-normalize.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-shape.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-tag.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ot-var.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-set.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-shape-plan.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-shape.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-shaper.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-static.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-subset-cff2.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-subset-cff-common.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-ucd.cc",
|
||||
"${target_gen_dir}/harfbuzz-2.8.2/src/hb-unicode.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-aat-layout.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-aat-map.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-blob.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-buffer-serialize.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-buffer.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-common.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-face.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-fallback-shape.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-font.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-map.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-number.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-cff1-table.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-cff2-table.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-face.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-font.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-layout.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-map.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-math.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-meta.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-metrics.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-name.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-arabic.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-default.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-hangul.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-hebrew.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-indic-table.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-indic.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-khmer.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-myanmar.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-syllabic.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-thai.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-use.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shaper-vowel-constraints.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shape-fallback.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shape-normalize.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-shape.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-tag.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ot-var.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-set.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-shape-plan.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-shape.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-shaper.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-static.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-subset-cff2.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-subset-cff-common.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-ucd.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-unicode.cc",
|
||||
"${target_gen_dir}/harfbuzz-11.0.0/src/hb-face-builder.cc",
|
||||
]
|
||||
|
||||
inputs = [ "//third_party/harfbuzz/harfbuzz-2.8.2.tar.xz" ]
|
||||
inputs = [ "//third_party/harfbuzz/harfbuzz-11.0.0.tar.xz" ]
|
||||
harfbuzz_path = rebase_path("${target_gen_dir}", root_build_dir)
|
||||
harfbuzz_source_path = rebase_path("//third_party/harfbuzz", root_build_dir)
|
||||
args = [
|
||||
@@ -124,7 +125,7 @@ if (defined(ohos_lite)) {
|
||||
ohos_static_library("harfbuzz_static") {
|
||||
sources = get_target_outputs(":harfbuzz_action")
|
||||
deps = [ ":harfbuzz_action" ]
|
||||
include_dirs = [ "${target_gen_dir}/harfbuzz-2.8.2/src" ]
|
||||
include_dirs = [ "${target_gen_dir}/harfbuzz-11.0.0/src" ]
|
||||
defines = [ "HAVE_PTHREAD = 1" ]
|
||||
public_configs = [ ":harfbuzz_config" ]
|
||||
part_name = "harfbuzz"
|
||||
|
||||
@@ -2,19 +2,23 @@ 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,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Google, Inc.
|
||||
Copyright © 2018,2019,2020 Ebrahim Byagowi
|
||||
Copyright © 2010-2022 Google, Inc.
|
||||
Copyright © 2015-2020 Ebrahim Byagowi
|
||||
Copyright © 2019,2020 Facebook, Inc.
|
||||
Copyright © 2012 Mozilla Foundation
|
||||
Copyright © 2012,2015 Mozilla Foundation
|
||||
Copyright © 2011 Codethink Limited
|
||||
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
|
||||
Copyright © 2009 Keith Stribley
|
||||
Copyright © 2009 Martin Hosken and SIL International
|
||||
Copyright © 2011 Martin Hosken and SIL International
|
||||
Copyright © 2007 Chris Wilson
|
||||
Copyright © 2005,2006,2020,2021 Behdad Esfahbod
|
||||
Copyright © 2005 David Turner
|
||||
Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
|
||||
Copyright © 1998-2004 David Turner and Werner Lemberg
|
||||
Copyright © 2005,2006,2020,2021,2022,2023 Behdad Esfahbod
|
||||
Copyright © 2004,2007,2008,2009,2010,2013,2021,2022,2023 Red Hat, Inc.
|
||||
Copyright © 1998-2005 David Turner and Werner Lemberg
|
||||
Copyright © 2016 Igalia S.L.
|
||||
Copyright © 2022 Matthias Clasen
|
||||
Copyright © 2018,2021 Khaled Hosny
|
||||
Copyright © 2018,2019,2020 Adobe, Inc
|
||||
Copyright © 2013-2015 Alexei Podtelezhnikov
|
||||
|
||||
For full copyright notices consult the individual files in the package.
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Notes:
|
||||
This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
|
||||
-->
|
||||
<!-- OAT(OSS Audit Tool) configuration guide:
|
||||
basedir: Root dir, the basedir + project path is the real source file location.
|
||||
licensefile:
|
||||
1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule.
|
||||
|
||||
tasklist(only for batch mode):
|
||||
1. task: Define oat check thread, each task will start a new thread.
|
||||
2. task name: Only an name, no practical effect.
|
||||
3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
|
||||
4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
|
||||
5. task project: Projects to be checked, the path field define the source root dir of the project.
|
||||
|
||||
|
||||
policyList:
|
||||
1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
|
||||
2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
|
||||
<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
|
||||
3. policyitem type:
|
||||
"compatibility" is used to check license compatibility in the specified path;
|
||||
"license" is used to check source license header in the specified path;
|
||||
"copyright" is used to check source copyright header in the specified path;
|
||||
"import" is used to check source dependency in the specified path, such as import ... ,include ...
|
||||
"filetype" is used to check file type in the specified path, supported file types: archive, binary
|
||||
"filename" is used to check whether the specified file exists in the specified path(support projectroot in default OAT.xml), supported file names: LICENSE, README, README.OpenSource
|
||||
|
||||
4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license.
|
||||
5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem.
|
||||
6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed.
|
||||
7. policyitem filefilter: Used to bind filefilter which define filter rules.
|
||||
8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
|
||||
|
||||
Note:If the text contains special characters, please escape them according to the following rules:
|
||||
" == >
|
||||
& == >
|
||||
' == >
|
||||
< == >
|
||||
> == >
|
||||
-->
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile>COPYING</licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<policyitem type="compatibility" name="OFL-1.1-no-RFN" path="test/shaping/data/in-house/COPYING" desc="license applies to many of the fonts in this folder"/>
|
||||
</policy>
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="git.mk" desc="a small Makefile to autogenerate .gitignore files"/>
|
||||
<filteritem type="filepath" name="test/shaping/texts/in-house/shaper-arabic/script-arabic/language-urdu/crulp/ligatures/LICENSE" desc="license file for language"/>
|
||||
<filteritem type="filename" name="mingw-ldd.py" desc="WTFPL"/>
|
||||
<filteritem type="filepath" name="util/hb-fc-list.c" desc="This is free software"/>
|
||||
<filteritem type="filepath" name="m4/ax_check_link_flag.m4" desc="auto config file"/>
|
||||
<filteritem type="filepath" name="m4/ax_pthread.m4" desc="auto config file"/>
|
||||
<filteritem type="filepath" name="m4/ax_code_coverage.m4" desc="auto config file"/>
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
<filteritem type="filepath" name="test/.*" desc="harfbuzz test file, not to check"/>
|
||||
<filteritem type="filepath" name="docs/HarfBuzz.png" desc="harfbuzz file, not to check"/>
|
||||
</filefilter>
|
||||
</filefilterlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
[
|
||||
{
|
||||
"Name" : "openEuler:HarfBuzz",
|
||||
"Name" : "HarfBuzz",
|
||||
"License" : "MIT License",
|
||||
"License File" : "COPYING",
|
||||
"Version Number" : "2.8.2-4.oe2203sp3",
|
||||
"Owner" : "liyujia4@huawei.com",
|
||||
"Upstream URL" : " https://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/Packages/harfbuzz-2.8.2-4.oe2203sp3.src.rpm ",
|
||||
"Version Number" : "11.0.0",
|
||||
"Owner" : "zhangyifan39@huawei.com",
|
||||
"Upstream URL" : "https://github.com/harfbuzz/harfbuzz",
|
||||
"Description" : "HarfBuzz is a text shaping engine. It primarily supports OpenType, but also Apple Advanced Typography. HarfBuzz is used in Android, Chrome, ChromeOS, Firefox, GNOME, GTK+, KDE, LibreOffice, OpenJDK, PlayStation, Qt, XeTeX, and other places."
|
||||
}
|
||||
]
|
||||
@@ -1,37 +0,0 @@
|
||||
From 56f11ec938260836387256225bc47665473e2bbe Mon Sep 17 00:00:00 2001
|
||||
From: Behdad Esfahbod <behdad@behdad.org>
|
||||
Date: Fri, 18 Feb 2022 14:08:43 -0600
|
||||
Subject: [PATCH] [buffer] Add HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT
|
||||
|
||||
---
|
||||
src/hb-buffer.h | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
|
||||
index 865ccb2..51b1760 100644
|
||||
--- a/src/hb-buffer.h
|
||||
+++ b/src/hb-buffer.h
|
||||
@@ -296,7 +296,10 @@ hb_buffer_guess_segment_properties (hb_buffer_t *buffer);
|
||||
* flag indicating that a dotted circle should
|
||||
* not be inserted in the rendering of incorrect
|
||||
* character sequences (such at <0905 093E>). Since: 2.4
|
||||
- *
|
||||
+ * @HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT:
|
||||
+ * flag indicating that the @HB_GLYPH_FLAG_UNSAFE_TO_CONCAT
|
||||
+ * glyph-flag should be produced by the shaper. By default
|
||||
+ * it will not be produced since it incurs a cost. Since: REPLACEME
|
||||
* Flags for #hb_buffer_t.
|
||||
*
|
||||
* Since: 0.9.20
|
||||
@@ -307,7 +310,8 @@ typedef enum { /*< flags >*/
|
||||
HB_BUFFER_FLAG_EOT = 0x00000002u, /* End-of-text */
|
||||
HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004u,
|
||||
HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES = 0x00000008u,
|
||||
- HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE = 0x00000010u
|
||||
+ HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE = 0x00000010u,
|
||||
+ HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT = 0x00000040u
|
||||
} hb_buffer_flags_t;
|
||||
|
||||
HB_EXTERN void
|
||||
--
|
||||
2.27.0
|
||||
@@ -1,38 +0,0 @@
|
||||
From 85be877925ddbf34f74a1229f3ca1716bb6170dc Mon Sep 17 00:00:00 2001
|
||||
From: Behdad Esfahbod <behdad@behdad.org>
|
||||
Date: Wed, 1 Feb 2023 20:00:43 -0700
|
||||
Subject: [PATCH] [layout] Limit how far we skip when looking back
|
||||
|
||||
See comments.
|
||||
---
|
||||
src/hb-ot-layout-gsubgpos.hh | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
|
||||
index c17bf92..712e307 100644
|
||||
--- a/src/hb-ot-layout-gsubgpos.hh
|
||||
+++ b/src/hb-ot-layout-gsubgpos.hh
|
||||
@@ -535,7 +535,19 @@ struct hb_ot_apply_context_t :
|
||||
bool prev ()
|
||||
{
|
||||
assert (num_items > 0);
|
||||
- while (idx > num_items - 1)
|
||||
+ /* The alternate condition below is faster at string boundaries,
|
||||
+ * but produces subpar "unsafe-to-concat" values. */
|
||||
+ unsigned stop = num_items - 1;
|
||||
+ if (c->buffer->flags & HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT)
|
||||
+ stop = 1 - 1;
|
||||
+
|
||||
+ /* When looking back, limit how far we search; this function is mostly
|
||||
+ * used for looking back for base glyphs when attaching marks. If we
|
||||
+ * don't limit, we can get O(n^2) behavior where n is the number of
|
||||
+ * consecutive marks. */
|
||||
+ stop = (unsigned) hb_max ((int) stop, (int) idx - HB_MAX_CONTEXT_LENGTH);
|
||||
+
|
||||
+ while (idx > stop)
|
||||
{
|
||||
idx--;
|
||||
const hb_glyph_info_t &info = c->buffer->out_info[idx];
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
|
||||
From: Behdad Esfahbod <behdad@behdad.org>
|
||||
Date: Wed, 1 Jun 2022 07:38:21 -0600
|
||||
Subject: [PATCH] [sbix] Limit glyph extents
|
||||
|
||||
Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
|
||||
---
|
||||
src/hb-ot-color-sbix-table.hh | 6 ++++++
|
||||
test/fuzzing/fonts/sbix-extents.ttf | Bin 0 -> 582 bytes
|
||||
2 files changed, 6 insertions(+)
|
||||
create mode 100644 test/fuzzing/fonts/sbix-extents.ttf
|
||||
|
||||
diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
|
||||
index 9741ebd450..6efae43cda 100644
|
||||
--- a/src/hb-ot-color-sbix-table.hh
|
||||
+++ b/src/hb-ot-color-sbix-table.hh
|
||||
@@ -298,6 +298,12 @@ struct sbix
|
||||
|
||||
const PNGHeader &png = *blob->as<PNGHeader>();
|
||||
|
||||
+ if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
|
||||
+ {
|
||||
+ hb_blob_destroy (blob);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
extents->x_bearing = x_offset;
|
||||
extents->y_bearing = png.IHDR.height + y_offset;
|
||||
extents->width = png.IHDR.width;
|
||||
Binary file not shown.
Binary file not shown.
-113
@@ -1,113 +0,0 @@
|
||||
Name: harfbuzz
|
||||
Version: 2.8.2
|
||||
Release: 4
|
||||
Summary: A text shaping engine
|
||||
|
||||
License: MIT
|
||||
URL: https://harfbuzz.github.io/what-is-harfbuzz.html
|
||||
Source0: https://github.com/harfbuzz/harfbuzz/releases/download/2.8.2/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch0001: backport-CVE-2022-33068.patch
|
||||
Patch0002: backport-0001-CVE-2023-25193.patch
|
||||
Patch0003: backport-0002-CVE-2023-25193.patch
|
||||
|
||||
BuildRequires: gcc-c++ freetype-devel cairo-devel glib2-devel graphite2-devel
|
||||
BuildRequires: gtk-doc libicu-devel gobject-introspection-devel
|
||||
Provides: harfbuzz-icu
|
||||
Obsoletes: harfbuzz-icu
|
||||
|
||||
%description
|
||||
HarfBuzz is a text-shaping engine. If you give HarfBuzz a font and a string
|
||||
containing a sequence of Unicode codepoints, HarfBuzz selects and positions
|
||||
the corresponding glyphs from the font, applying all of the necessary layout
|
||||
rules and font features. HarfBuzz then returns the string to you in the form
|
||||
that is correctly arranged for the language and writing system.
|
||||
|
||||
%package devel
|
||||
Summary: The development environment for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Header files and libraries for building a extension library for %{name}.
|
||||
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static --with-graphite2 --with-gobject --enable-introspection
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
||||
%delete_la
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%doc AUTHORS NEWS
|
||||
%license COPYING
|
||||
%{_libdir}/libharfbuzz.so.*
|
||||
%{_libdir}/libharfbuzz-subset.so.*
|
||||
%{_libdir}/libharfbuzz-gobject.so.0*
|
||||
%{_libdir}/libharfbuzz-icu.so.*
|
||||
%dir %{_libdir}/girepository-1.0
|
||||
%{_libdir}/girepository-1.0/HarfBuzz-0.0.typelib
|
||||
|
||||
%files devel
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_libdir}/cmake/harfbuzz/
|
||||
%{_includedir}/harfbuzz/
|
||||
%dir %{_datadir}/gir-1.0
|
||||
%{_datadir}/gir-1.0/HarfBuzz-0.0.gir
|
||||
|
||||
%files help
|
||||
%doc README
|
||||
%{_datadir}/gtk-doc/html/harfbuzz/*
|
||||
|
||||
%changelog
|
||||
* Wed Feb 15 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.8.2-4
|
||||
- fix CVE-2023-25193
|
||||
|
||||
* Thu Jul 14 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 2.8.2-3
|
||||
- fix CVE-2022-33068
|
||||
|
||||
* Tue May 24 2022 loong_C <loong_c@yeah.net> - 2.8.2-2
|
||||
- fix spec changelog date
|
||||
|
||||
* Fri Dec 03 2021 liuyumeng <liuyumeng5@huawei.com> - 2.8.2-1
|
||||
- update to harfbuzz-2.8.2-1
|
||||
|
||||
* Mon Jul 05 2021 wangkerong <wangkerong@huawei.com> - 2.8.1-2
|
||||
- enable make check
|
||||
|
||||
* Fri Jun 25 2021 wangkerong <wangkerong@huawei.com> - 2.8.1-1
|
||||
- update to 2.8.1
|
||||
|
||||
* Thu Jan 28 2021 zhanzhimin <zhanzhimin@huawei.com> - 2.7.4-1
|
||||
- update to 2.7.4
|
||||
|
||||
* Thu Sep 10 2020 chengguipeng <chengguipeng1@huawei.com> - 2.6.8-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:modify source0 url
|
||||
|
||||
* Wed Jul 29 2020 hanhui <hanhui15@huawei.com> - 2.6.8-2
|
||||
- modify HarfBuzz-0.0.gir patch
|
||||
|
||||
* Tue Jul 21 2020 hanhui <hanhui15@huawei.com> - 2.6.8-1
|
||||
- Update to 2.6.8
|
||||
|
||||
* Mon Jun 15 2020 hanhui <hanhui15@huawei.com> - 2.6.1-1
|
||||
- Update to 2.6.1
|
||||
|
||||
* Mon Aug 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.8.7-2
|
||||
- Package Init
|
||||
@@ -1,4 +0,0 @@
|
||||
version_control: github
|
||||
src_repo: harfbuzz/harfbuzz
|
||||
tag_prefix: "^"
|
||||
seperator: "."
|
||||
+1212
-416
File diff suppressed because it is too large
Load Diff
+2
-8
@@ -32,9 +32,6 @@ def untar_file(tar_file_path, extract_path):
|
||||
|
||||
def move_file(src_path, dst_path):
|
||||
files = [
|
||||
"backport-CVE-2022-33068.patch",
|
||||
"backport-0001-CVE-2023-25193.patch",
|
||||
"backport-0002-CVE-2023-25193.patch",
|
||||
"huawei_harfbuzz.patch"
|
||||
]
|
||||
for file in files:
|
||||
@@ -56,9 +53,6 @@ def apply_patch(patch_file, target_dir):
|
||||
|
||||
def do_patch(target_dir):
|
||||
patch_file = [
|
||||
"backport-CVE-2022-33068.patch",
|
||||
"backport-0001-CVE-2023-25193.patch",
|
||||
"backport-0002-CVE-2023-25193.patch",
|
||||
"huawei_harfbuzz.patch"
|
||||
]
|
||||
|
||||
@@ -71,8 +65,8 @@ def main():
|
||||
harfbuzz_path.add_argument('--gen-dir', help='generate path of log', required=True)
|
||||
harfbuzz_path.add_argument('--source-dir', help='generate path of log', required=True)
|
||||
args = harfbuzz_path.parse_args()
|
||||
tar_file_path = os.path.join(args.source_dir, "harfbuzz-2.8.2.tar.xz")
|
||||
target_dir = os.path.join(args.gen_dir, "harfbuzz-2.8.2")
|
||||
tar_file_path = os.path.join(args.source_dir, "harfbuzz-11.0.0.tar.xz")
|
||||
target_dir = os.path.join(args.gen_dir, "harfbuzz-11.0.0")
|
||||
|
||||
untar_file(tar_file_path, args.gen_dir)
|
||||
move_file(args.source_dir, target_dir)
|
||||
|
||||
Reference in New Issue
Block a user