[harfbuff] fix arm64 osx build (#24055)

This commit is contained in:
autoantwort 2022-04-11 17:49:10 +02:00 committed by GitHub
parent 5d1860a189
commit 3d93caa1b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 2 deletions

View File

@ -0,0 +1,43 @@
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
index 5f383064c4..6ccc1b0a2b 100644
--- a/src/hb-coretext.cc
+++ b/src/hb-coretext.cc
@@ -897,7 +897,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
DEBUG_MSG (CORETEXT, nullptr, "Num runs: %d", num_runs);
buffer->len = 0;
- uint32_t status_and = ~0, status_or = 0;
+ uint32_t status_or = 0;
CGFloat advances_so_far = 0;
/* For right-to-left runs, CoreText returns the glyphs positioned such that
* any trailing whitespace is to the left of (0,0). Adjust coordinate system
@@ -918,7 +918,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
CTRunRef run = static_cast<CTRunRef>(CFArrayGetValueAtIndex (glyph_runs, i));
CTRunStatus run_status = CTRunGetStatus (run);
status_or |= run_status;
- status_and &= run_status;
DEBUG_MSG (CORETEXT, run, "CTRunStatus: %x", run_status);
CGFloat run_advance = CTRunGetTypographicBounds (run, range_all, nullptr, nullptr, nullptr);
if (HB_DIRECTION_IS_VERTICAL (buffer->props.direction))
@@ -1140,21 +1139,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
buffer->len += num_glyphs;
}
- /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel,
- * or if it does, it doesn't respect it. So we get runs with wrong
- * directions. As such, disable the assert... It wouldn't crash, but
- * cursoring will be off...
- *
- * https://crbug.com/419769
- */
- if (false)
- {
- /* Make sure all runs had the expected direction. */
- HB_UNUSED bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
- assert (bool (status_and & kCTRunStatusRightToLeft) == backward);
- assert (bool (status_or & kCTRunStatusRightToLeft) == backward);
- }
-
buffer->clear_positions ();
unsigned int count = buffer->len;

View File

@ -11,6 +11,7 @@ vcpkg_from_github(
# Details: https://github.com/microsoft/vcpkg/issues/16262
0001-circumvent-samefile-error.patch
0002-fix-uwp-build.patch
fix-macos-build.diff # fixes https://github.com/harfbuzz/harfbuzz/issues/3484
)
if("icu" IN_LIST FEATURES)

View File

@ -1,7 +1,7 @@
{
"name": "harfbuzz",
"version-semver": "3.2.0",
"port-version": 1,
"port-version": 2,
"description": "HarfBuzz OpenType text shaping engine",
"homepage": "https://github.com/harfbuzz/harfbuzz",
"dependencies": [

View File

@ -2714,7 +2714,7 @@
},
"harfbuzz": {
"baseline": "3.2.0",
"port-version": 1
"port-version": 2
},
"hayai": {
"baseline": "2019-08-10",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fb0fcb23cc704f5a2bca6fc631622309876ab271",
"version-semver": "3.2.0",
"port-version": 2
},
{
"git-tree": "b2c918c04e1ecf5b6a591911cea03f7093ab6933",
"version-semver": "3.2.0",