From cc41347eeb51dd24befe4a18fdee74c0f4fb30a0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 19:03:27 -0600 Subject: [PATCH 01/24] Test --- README.md | 2 ++ harfbuzz | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e072070..c2bb4c0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +test + [![Githun CI Status](https://github.com/harfbuzz/uharfbuzz/workflows/Build%20+%20Deploy/badge.svg)](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) [![PyPI](https://img.shields.io/pypi/v/uharfbuzz.svg)](https://pypi.org/project/uharfbuzz) diff --git a/harfbuzz b/harfbuzz index e60ec9d..b430553 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit e60ec9dcd3b0f94d13b8baf7ba12cd6cf0626064 +Subproject commit b4305532a7746422e0b615eee6304119c1092fd8 From 22f10696ae6dee7cd5f175d51d92fa45be0f96df Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 19:44:45 -0600 Subject: [PATCH 02/24] Only build win64 python3.11 wheel --- .github/workflows/ci.yml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d3df42..ef8fc2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest] steps: - uses: actions/checkout@v2 diff --git a/pyproject.toml b/pyproject.toml index f7e9ea1..abaaab5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ build-backend = "setuptools.build_meta" [tool.cibuildwheel] # only build for 64-bit +build = ["cp311-win_amd64"] skip = ["*-manylinux_i686", "*-musllinux_i686"] test-requires = "pytest" From 5e6f2e386c4707c147da63c5e6ebf9d7a734090a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 20:19:54 -0600 Subject: [PATCH 03/24] Does this work?! --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index abaaab5..bf54591 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,3 +38,6 @@ CFLAGS = "-g0" select = "*-musllinux*" before-all = "apk add ccache" environment = {CC = "/usr/lib/ccache/bin/gcc"} + +[tool.cibuildwheel.windows] +CFLAGS = "/DEBUG:FULL" From 5bdc5e61149568c53da86fac2338b26895c9ba7d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 20:33:51 -0600 Subject: [PATCH 04/24] Try verbose build --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf54591..1ef06cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,4 +40,5 @@ before-all = "apk add ccache" environment = {CC = "/usr/lib/ccache/bin/gcc"} [tool.cibuildwheel.windows] -CFLAGS = "/DEBUG:FULL" +#CFLAGS = "/DEBUG:FULL" +build-verbosity = "3" From 95583cce24da797344bbb44dbdf30b6f352d1fff Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 20:54:14 -0600 Subject: [PATCH 05/24] try debug build --- setup.py | 5 ++--- tests/test_uharfbuzz.py | 23 ----------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/setup.py b/setup.py index 079474c..33b7d9d 100755 --- a/setup.py +++ b/setup.py @@ -28,9 +28,8 @@ define_macros.append(('HAVE_UNISTD_H', '1')) define_macros.append(('HAVE_SYS_MMAN_H', '1')) else: - define_macros.append(('HAVE_DIRECTWRITE', '1')) - define_macros.append(('HAVE_UNISCRIBE', '1')) - libraries += ['usp10', 'gdi32', 'user32', 'rpcrt4', 'dwrite'] + extra_compile_args.append('/DEBUG:FULL /Z7') + libraries += ['user32', 'rpcrt4'] if platform.system() == 'Darwin': define_macros.append(('HAVE_CORETEXT', '1')) diff --git a/tests/test_uharfbuzz.py b/tests/test_uharfbuzz.py index ad56956..d81854d 100644 --- a/tests/test_uharfbuzz.py +++ b/tests/test_uharfbuzz.py @@ -326,29 +326,6 @@ def test_shape_set_shaper(self, blankfont): expected = [(0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0)] assert pos == expected - @pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") - def test_shape_set_shaper_directwrite(self, blankfont): - string = "abcde" - buf = hb.Buffer() - buf.add_str(string) - buf.guess_segment_properties() - hb.shape(blankfont, buf, shapers=["directwrite"]) - pos = [g.position for g in buf.glyph_positions] - expected = [(0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0)] - assert pos == expected - - @pytest.mark.xfail - @pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") - def test_shape_set_shaper_uniscribe(self, blankfont): - string = "abcde" - buf = hb.Buffer() - buf.add_str(string) - buf.guess_segment_properties() - hb.shape(blankfont, buf, shapers=["uniscribe"]) - pos = [g.position for g in buf.glyph_positions] - expected = [(0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0)] - assert pos == expected - @pytest.mark.skipif(sys.platform != "darwin", reason="requires macOS") def test_shape_set_shaper_coretext(self, blankfont): string = "abcde" From aa5d23a44c09cb4ac67f378fd3fe716b017de647 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 21:12:21 -0600 Subject: [PATCH 06/24] Try debug build, another way --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index a2d8121..76351cc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,3 +3,6 @@ formats = zip [metadata] license_file = LICENSE + +[build_ext] +debug = 1 From 51e8016814afef38759754d499393c0cccae15b0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 21:23:19 -0600 Subject: [PATCH 07/24] Fixup --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 33b7d9d..43023be 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,8 @@ define_macros.append(('HAVE_UNISTD_H', '1')) define_macros.append(('HAVE_SYS_MMAN_H', '1')) else: - extra_compile_args.append('/DEBUG:FULL /Z7') + extra_compile_options.append('/DEBUG:FULL') + extra_compile_options.append('/Z7') libraries += ['user32', 'rpcrt4'] if platform.system() == 'Darwin': From 80e0be45145b4a849c3701346947ead506db89fd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 21:24:00 -0600 Subject: [PATCH 08/24] Another try --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 43023be..c04cab3 100755 --- a/setup.py +++ b/setup.py @@ -30,6 +30,7 @@ else: extra_compile_options.append('/DEBUG:FULL') extra_compile_options.append('/Z7') + extra_compile_options.append('/bigobj') libraries += ['user32', 'rpcrt4'] if platform.system() == 'Darwin': From 32b33dddb74bb090206f8718c5bff043f867aa80 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 21:26:31 -0600 Subject: [PATCH 09/24] Again --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c04cab3..adda05b 100755 --- a/setup.py +++ b/setup.py @@ -28,9 +28,9 @@ define_macros.append(('HAVE_UNISTD_H', '1')) define_macros.append(('HAVE_SYS_MMAN_H', '1')) else: - extra_compile_options.append('/DEBUG:FULL') - extra_compile_options.append('/Z7') - extra_compile_options.append('/bigobj') + extra_compile_args.append('/DEBUG:FULL') + extra_compile_args.append('/Z7') + extra_compile_args.append('/bigobj') libraries += ['user32', 'rpcrt4'] if platform.system() == 'Darwin': From 5bde3fb448173804dd65ee7ffab02f26372e8f0e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 21:30:53 -0600 Subject: [PATCH 10/24] . --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 76351cc..68a352f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,4 +5,4 @@ formats = zip license_file = LICENSE [build_ext] -debug = 1 +#debug = 1 From bc2dedc769753598fec13aeada18f8d6ebb970ca Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 27 Jul 2023 21:49:23 -0600 Subject: [PATCH 11/24] linker /DEBUG --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index adda05b..8f61d7f 100755 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ extra_compile_args.append('/DEBUG:FULL') extra_compile_args.append('/Z7') extra_compile_args.append('/bigobj') + extra_link_args.append('/DEBUG:FULL') libraries += ['user32', 'rpcrt4'] if platform.system() == 'Darwin': From 4a1f32cf09b5ae1d9d1e0bfc0c7bfebacae1ac4e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 08:50:37 -0600 Subject: [PATCH 12/24] . --- pyproject.toml | 1 - setup.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1ef06cf..d2ca338 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,5 +40,4 @@ before-all = "apk add ccache" environment = {CC = "/usr/lib/ccache/bin/gcc"} [tool.cibuildwheel.windows] -#CFLAGS = "/DEBUG:FULL" build-verbosity = "3" diff --git a/setup.py b/setup.py index 8f61d7f..145ef4b 100755 --- a/setup.py +++ b/setup.py @@ -30,6 +30,7 @@ else: extra_compile_args.append('/DEBUG:FULL') extra_compile_args.append('/Z7') + extra_compile_args.append('/Zc:ternary') extra_compile_args.append('/bigobj') extra_link_args.append('/DEBUG:FULL') libraries += ['user32', 'rpcrt4'] From af1c07fac23bcbb8101a6a38120eadd7473e8ac9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 10:24:28 -0600 Subject: [PATCH 13/24] /Od --- setup.py | 1 + src/uharfbuzz/_harfbuzz.pyx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 145ef4b..011057d 100755 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ extra_compile_args.append('/Z7') extra_compile_args.append('/Zc:ternary') extra_compile_args.append('/bigobj') + extra_compile_args.append('/Od') extra_link_args.append('/DEBUG:FULL') libraries += ['user32', 'rpcrt4'] diff --git a/src/uharfbuzz/_harfbuzz.pyx b/src/uharfbuzz/_harfbuzz.pyx index cf4656f..cfe847e 100644 --- a/src/uharfbuzz/_harfbuzz.pyx +++ b/src/uharfbuzz/_harfbuzz.pyx @@ -1546,7 +1546,7 @@ def repack_with_tag(tag: str, tail += len(subtables[i]) obj_list.update_obj_length(i, table_data + head, table_data + tail) head = tail - + node = graphnodes[i] # real_links p = obj_list.create_links(i, len(node[0]), True) From a475f547e7e74e6dd9708887508c9c60b9ba1e5c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 10:47:11 -0600 Subject: [PATCH 14/24] Roll harfbuzz to enable memory-barrier on MSVC --- harfbuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harfbuzz b/harfbuzz index b430553..8f94ca8 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit b4305532a7746422e0b615eee6304119c1092fd8 +Subproject commit 8f94ca8915d425c3887f613531315479274b65fc From 109adbfcdab6eb696404e962d457670c42b29b8a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 10:48:35 -0600 Subject: [PATCH 15/24] Revert "/Od" This reverts commit af1c07fac23bcbb8101a6a38120eadd7473e8ac9. --- setup.py | 1 - src/uharfbuzz/_harfbuzz.pyx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 011057d..145ef4b 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,6 @@ extra_compile_args.append('/Z7') extra_compile_args.append('/Zc:ternary') extra_compile_args.append('/bigobj') - extra_compile_args.append('/Od') extra_link_args.append('/DEBUG:FULL') libraries += ['user32', 'rpcrt4'] diff --git a/src/uharfbuzz/_harfbuzz.pyx b/src/uharfbuzz/_harfbuzz.pyx index cfe847e..cf4656f 100644 --- a/src/uharfbuzz/_harfbuzz.pyx +++ b/src/uharfbuzz/_harfbuzz.pyx @@ -1546,7 +1546,7 @@ def repack_with_tag(tag: str, tail += len(subtables[i]) obj_list.update_obj_length(i, table_data + head, table_data + tail) head = tail - + node = graphnodes[i] # real_links p = obj_list.create_links(i, len(node[0]), True) From 3d3220e5ab06d4d684f52dad469e7b5dcde99155 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 10:54:04 -0600 Subject: [PATCH 16/24] Roll harfbuzz again --- harfbuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harfbuzz b/harfbuzz index 8f94ca8..ba1ffd2 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit 8f94ca8915d425c3887f613531315479274b65fc +Subproject commit ba1ffd2e8beabdd35efd8ba2bad553fc8fadf128 From 050fafd09758b6fa120149ec89f4f69d72b2a4d3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 11:31:32 -0600 Subject: [PATCH 17/24] Roll back HB to 8.0.0 --- harfbuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harfbuzz b/harfbuzz index ba1ffd2..b430553 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit ba1ffd2e8beabdd35efd8ba2bad553fc8fadf128 +Subproject commit b4305532a7746422e0b615eee6304119c1092fd8 From ede15678907b2404cf105ed7d510c27ba08170d5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 12:00:28 -0600 Subject: [PATCH 18/24] Roll HB to main --- harfbuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harfbuzz b/harfbuzz index b430553..3bedb0e 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit b4305532a7746422e0b615eee6304119c1092fd8 +Subproject commit 3bedb0eeed62aaab3c6be849480a54214a59715b From dcbb62a9e4181fbe9cedd5925784e97ddf9ea64f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 12:06:39 -0600 Subject: [PATCH 19/24] Revert HB to 8.0.1 --- harfbuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harfbuzz b/harfbuzz index 3bedb0e..d160d93 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit 3bedb0eeed62aaab3c6be849480a54214a59715b +Subproject commit d160d9389cb4c5b15ebea9b41eb74018c4358924 From 86a27911464e1fab23ba94f3d235cdcd19efc765 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 12:14:37 -0600 Subject: [PATCH 20/24] windows-2022 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef8fc2b..f9b9f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest] + os: [windows-2022] steps: - uses: actions/checkout@v2 From 28cf74c02ecd069037e36e452fb660b56bb06920 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 12:23:50 -0600 Subject: [PATCH 21/24] windows-2019 --- .github/workflows/ci.yml | 2 +- harfbuzz | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9b9f2d..149bae6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2022] + os: [windows-2019] steps: - uses: actions/checkout@v2 diff --git a/harfbuzz b/harfbuzz index d160d93..b430553 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit d160d9389cb4c5b15ebea9b41eb74018c4358924 +Subproject commit b4305532a7746422e0b615eee6304119c1092fd8 From dcbedf80024e78b6d672b6a8addc68079f2cc84f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 13:08:24 -0600 Subject: [PATCH 22/24] HB 8.0.1 --- harfbuzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harfbuzz b/harfbuzz index b430553..d160d93 160000 --- a/harfbuzz +++ b/harfbuzz @@ -1 +1 @@ -Subproject commit b4305532a7746422e0b615eee6304119c1092fd8 +Subproject commit d160d9389cb4c5b15ebea9b41eb74018c4358924 From 87058373e67dc386467ceabfe6f0dea9bcd83402 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 13:09:53 -0600 Subject: [PATCH 23/24] sanitize=address --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 145ef4b..15d18ea 100755 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ extra_compile_args.append('/Z7') extra_compile_args.append('/Zc:ternary') extra_compile_args.append('/bigobj') + extra_compile_args.append('/fsanitize=address') extra_link_args.append('/DEBUG:FULL') libraries += ['user32', 'rpcrt4'] From cc6e74f3104ff7ae06e1c49f623e5404037b542d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Jul 2023 13:10:54 -0600 Subject: [PATCH 24/24] windows-latest again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 149bae6..ef8fc2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019] + os: [windows-latest] steps: - uses: actions/checkout@v2