diff --git a/.github/workflows/build-libs.yml b/.github/workflows/build-libs.yml index 1719fe0..37a43f0 100644 --- a/.github/workflows/build-libs.yml +++ b/.github/workflows/build-libs.yml @@ -20,6 +20,9 @@ jobs: - os: windows-latest arch: x64 lib: x64/FosterPlatform.dll + - os: windows-latest + arch: arm64 + lib: arm64/FosterPlatform.dll - os: macos-latest arch: x64-arm64 lib: osx/libFosterPlatform.dylib @@ -66,12 +69,12 @@ jobs: sudo apt-get update sudo apt-get install -y libsdl2-dev:armhf libwayland-dev:armhf libegl-dev:armhf libdrm-dev:armhf libxkbcommon-dev:armhf libpulse-dev:armhf - name: CMake Configure - if: ${{ matrix.arch != 'arm64' && matrix.arch != 'arm32' }} + if: ${{ !(runner.os == 'Linux' && matrix.arch == 'arm64') && !(runner.os == 'Linux' && matrix.arch == 'arm32') }} run: cmake -B build -S Platform - - name: CMake Configure (arm64) + - name: CMake Configure (Linux-arm64) if: ${{ runner.os == 'Linux' && matrix.arch == 'arm64' }} run: PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig cmake -B build -S Platform -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_SYSTEM_NAME=Linux - - name: CMake Configure (arm32) + - name: CMake Configure (Linux-arm32) if: ${{ runner.os == 'Linux' && matrix.arch == 'arm32' }} run: PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig cmake -B build -S Platform -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_SYSTEM_PROCESSOR=armv7l -DCMAKE_SYSTEM_NAME=Linux - name: CMake Build @@ -88,11 +91,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.0.0 - - name: Download windows lib + - name: Download windows x64 lib uses: actions/download-artifact@v3 with: name: windows-latest-x64-build path: Platform/libs/x64 + - name: Download windows arm lib + uses: actions/download-artifact@v3 + with: + name: windows-latest-arm64-build + path: Platform/libs/arm64 - name: Download macos lib uses: actions/download-artifact@v3 with: diff --git a/Framework/Graphics/SpriteFont.cs b/Framework/Graphics/SpriteFont.cs index 2bcb34e..da366a3 100644 --- a/Framework/Graphics/SpriteFont.cs +++ b/Framework/Graphics/SpriteFont.cs @@ -289,7 +289,7 @@ public void WrapText(ReadOnlySpan text, float maxLineWidth, List<(int Star if (lineWidth > 0 && lineWidth + nextWordWidth > maxLineWidth) { writeLinesTo.Add((start, i - start)); - start = i; + start = i + 1; lineWidth = 0; } @@ -413,9 +413,6 @@ public void RenderText(Batcher batch, ReadOnlySpan text, Vector2 position, public void RenderText(Batcher batch, ReadOnlySpan text, Vector2 position, Vector2 justify, Color color) { - // TODO: - // I feel like the vertical alignment is slightly off, but not sure how. - var at = position + new Vector2(0, Ascent); var last = 0;