From 8f8968cbb1c545e64a515109624f46ae9e3d3c8a Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Thu, 9 Jul 2026 18:41:44 +0100 Subject: [PATCH] Deps: Revert workaround for MSVC ICE with PlutoVG This reverts commit 7ade24fc77a7150f50304a08bfa43496d0e352ed. --- .../scripts/windows/build-dependencies.bat | 1 - .../windows/plutovg-workaround-msvc-ice.patch | 52 ------------------- 2 files changed, 53 deletions(-) delete mode 100644 .github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch diff --git a/.github/workflows/scripts/windows/build-dependencies.bat b/.github/workflows/scripts/windows/build-dependencies.bat index 932c74b6a8..cd5e1e7eb7 100755 --- a/.github/workflows/scripts/windows/build-dependencies.bat +++ b/.github/workflows/scripts/windows/build-dependencies.bat @@ -471,7 +471,6 @@ echo "Building PlutoVG..." rmdir /S /Q "plutovg-%PLUTOVG%" %SEVENZIP% x "plutovg-%PLUTOVG%.zip" || goto error cd "plutovg-%PLUTOVG%" || goto error -%PATCH% -p1 < "%SCRIPTDIR%\plutovg-workaround-msvc-ice.patch" || goto error cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error cmake --build build --parallel || goto error ninja -C build install || goto error diff --git a/.github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch b/.github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch deleted file mode 100644 index 69da4fae4f..0000000000 --- a/.github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/source/plutovg-font.c b/source/plutovg-font.c -index 0ad89b1..110de7f 100644 ---- a/source/plutovg-font.c -+++ b/source/plutovg-font.c -@@ -836,7 +836,8 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - size_t family_index = 0; - if(unicode_family_name) { - const stbtt_uint8* family_name = unicode_family_name; -- while(family_length) { -+ //while(family_length) { -+ for (int i = family_length; i > 0; i -= 2) { - stbtt_uint16 ch = family_name[0] * 256 + family_name[1]; - if(ch < 0x80) { - entry->family[family_index++] = ch; -@@ -853,7 +854,8 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - entry->family[family_index++] = (0x80 + ((c) & 0x3f)); - - family_name += 2; -- family_length -= 2; -+ //family_length -= 2; -+ i -= 2; - } else { - entry->family[family_index++] = (0xe0 + (ch >> 12)); - entry->family[family_index++] = (0x80 + ((ch >> 6) & 0x3f)); -@@ -861,7 +863,7 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - } - - family_name += 2; -- family_length -= 2; -+ //family_length -= 2; - } - - entry->family[family_index] = '\0'; -@@ -902,7 +904,8 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - }; - - const stbtt_uint8* family_name = roman_family_name; -- while(family_length) { -+ //while(family_length) { -+ for (int i2 = family_length; i2 > 0; i2--) { - stbtt_uint16 ch = MAC_ROMAN_TABLE[family_name[0]]; - if(ch < 0x80) { - entry->family[family_index++] = ch; -@@ -916,7 +919,7 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - } - - family_name += 1; -- family_length -= 1; -+ //family_length -= 1; - } - - entry->family[family_index] = '\0';