From aeaf2601c3d84fccb1e463a3ba089b3d16df2ea9 Mon Sep 17 00:00:00 2001 From: CoffeeStraw Date: Fri, 2 Aug 2024 22:16:17 +0200 Subject: [PATCH 1/5] Update Python versions in CI configuration --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cc7f4d2..f0c6351f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 @@ -51,7 +51,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 @@ -104,10 +104,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.12 - name: Install pypa/build run: >- @@ -126,11 +126,11 @@ jobs: . - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1.9 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1.9 with: password: ${{ secrets.PYPI_API_TOKEN }} From 872b48e68374b24bea03392c397e330229bd4858 Mon Sep 17 00:00:00 2001 From: CoffeeStraw Date: Fri, 2 Aug 2024 22:31:35 +0200 Subject: [PATCH 2/5] Fix font installation process --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c6351f..f4cbdc50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,11 +70,14 @@ jobs: if: matrix.os == 'macos-latest' run: brew install python py3cairo pygobject3 pango + - name: Setup Go + uses: actions/setup-go@v5 + - name: Install fonts (non-Windows) if: matrix.os != 'windows-latest' run: | - GO111MODULE=on GOBIN=$HOME/.local/bin go get github.com/Crosse/font-install@v1.4.1 - $HOME/.local/bin/font-install "https://osdn.net/frs/redir.php?m=gigenet&f=mix-mplus-ipa%2F58720%2Fmigu-1p-20130430.zip" + go install github.com/Crosse/font-install@latest + font-install "https://osdn.net/frs/redir.php?m=gigenet&f=mix-mplus-ipa%2F58720%2Fmigu-1p-20130430.zip" shell: bash - name: Install fonts (Windows) if: matrix.os == 'windows-latest' From 5c454f99054736ba825c0205b9a40104bf8cf515 Mon Sep 17 00:00:00 2001 From: CoffeeStraw Date: Fri, 2 Aug 2024 22:33:33 +0200 Subject: [PATCH 3/5] Add Go version --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4cbdc50..36df54df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,8 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 + with: + go-version: 1.22 - name: Install fonts (non-Windows) if: matrix.os != 'windows-latest' From fcaacfc7e0d38b1efc5c1b93ca9d2c7d6b7944ac Mon Sep 17 00:00:00 2001 From: CoffeeStraw Date: Fri, 2 Aug 2024 22:43:35 +0200 Subject: [PATCH 4/5] chore: Update font installation URLs --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36df54df..5a9cbb7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,11 +79,11 @@ jobs: if: matrix.os != 'windows-latest' run: | go install github.com/Crosse/font-install@latest - font-install "https://osdn.net/frs/redir.php?m=gigenet&f=mix-mplus-ipa%2F58720%2Fmigu-1p-20130430.zip" + font-install "https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1p-20200307.zip" shell: bash - name: Install fonts (Windows) if: matrix.os == 'windows-latest' - run: ./.github/scripts/install-fonts.ps1 'https://osdn.net/frs/redir.php?m=gigenet&f=mix-mplus-ipa%2F58720%2Fmigu-1p-20130430.zip' + run: ./.github/scripts/install-fonts.ps1 'https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1p-20200307.zip' shell: pwsh - name: Cache Python From 58c18ea82d9c86976837eeb6869e4018b1e9a46a Mon Sep 17 00:00:00 2001 From: CoffeeStraw Date: Fri, 2 Aug 2024 22:51:49 +0200 Subject: [PATCH 5/5] Fix test with new version of font --- tests/test_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_convert.py b/tests/test_convert.py index 8facce45..3e51e008 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -239,7 +239,7 @@ def test_text_to_shape(): if sys.platform == "win32": assert shape == Shape( - "m 14.938 23.422 b 13.031 22.562 11.156 22.125 9.328 22.125 7.219 22.125 6.156 22.734 6.156 23.984 6.156 24.578 6.391 25.031 6.844 25.359 7.312 25.672 8.109 25.922 9.25 26.078 11.797 26.422 13.625 27.078 14.719 28.047 15.828 29 16.375 30.328 16.375 32 16.375 33.625 15.734 34.922 14.453 35.891 13.172 36.844 11.375 37.328 9.078 37.328 6.312 37.328 3.844 36.75 1.688 35.609 l 2.547 32.234 b 4.5 33.359 6.594 33.922 8.844 33.922 10.844 33.922 11.828 33.266 11.828 31.922 11.828 31.312 11.625 30.844 11.219 30.516 10.797 30.203 10 29.938 8.812 29.766 6.234 29.328 4.422 28.641 3.375 27.734 2.297 26.797 1.75 25.516 1.75 23.906 1.781 22.312 2.406 21.047 3.641 20.125 4.891 19.203 6.703 18.75 9.078 18.75 11.469 18.75 13.703 19.188 15.797 20.062 l 14.938 23.422 m 24.672 19.094 l 24.672 29.766 b 24.672 31.297 24.875 32.344 25.312 32.906 25.734 33.469 26.453 33.75 27.484 33.75 28.5 33.75 29.422 33.25 30.25 32.219 31.062 31.203 31.484 30 31.484 28.625 l 31.484 19.094 35.953 19.094 35.953 36.984 31.797 36.984 31.688 34.469 31.625 34.469 b 30.938 35.375 30.078 36.062 29.078 36.578 28.062 37.078 27.016 37.328 25.938 37.328 24 37.328 22.562 36.781 21.641 35.656 20.719 34.547 20.266 32.734 20.266 30.203 l 20.266 19.094 24.672 19.094" + "m 14.938 23.422 b 13 22.562 11.141 22.125 9.328 22.125 7.234 22.141 6.188 22.766 6.156 23.984 6.156 24.828 6.688 25.422 7.734 25.766 8.156 25.891 8.656 25.984 9.25 26.078 12.922 26.609 15.156 27.812 15.969 29.688 16.234 30.359 16.375 31.125 16.375 32 16.375 34.25 15.266 35.797 13.047 36.672 11.922 37.109 10.594 37.328 9.078 37.328 6.312 37.328 3.844 36.75 1.688 35.609 l 2.547 32.234 b 4.5 33.359 6.594 33.922 8.844 33.922 10.812 33.906 11.812 33.234 11.828 31.922 11.828 31.141 11.484 30.594 10.766 30.281 10.312 30.078 9.656 29.906 8.812 29.766 5.094 29.172 2.859 27.906 2.094 25.969 1.875 25.359 1.75 24.672 1.75 23.906 1.75 21.656 2.906 20.141 5.234 19.328 6.328 18.953 7.609 18.75 9.078 18.75 11.484 18.75 13.734 19.188 15.797 20.062 l 14.938 23.422 m 24.672 19.094 l 24.672 29.766 b 24.672 31.797 25.109 33.047 26.016 33.469 26.406 33.656 26.891 33.75 27.484 33.75 28.641 33.75 29.641 33.141 30.484 31.891 31.172 30.906 31.516 29.812 31.516 28.625 l 31.516 19.094 35.984 19.094 35.984 36.984 31.797 36.984 31.688 34.469 31.625 34.469 b 30.359 36.125 28.719 37.062 26.703 37.297 26.422 37.312 26.172 37.328 25.938 37.328 23.188 37.328 21.453 36.188 20.75 33.891 20.422 32.906 20.266 31.672 20.266 30.203 l 20.266 19.094 24.672 19.094" ) elif sys.platform == "linux" or sys.platform == "darwin": i = 0