Skip to content

Commit c165bfc

Browse files
authored
fix(java): No rounding of width (#63)
1 parent 57a4660 commit c165bfc

File tree

16 files changed

+39
-19
lines changed

16 files changed

+39
-19
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
with:
3939
name: nupkgs
4040
path: dist/.organize/nupkgs
41-
- run: ./build.sh DotNetPublish
41+
- run: dotnet build/bin/Debug/publish/_build.dll DotNetPublish
42+
shell: bash
4243

4344
java-publish:
4445
runs-on: ubuntu-latest
@@ -70,7 +71,8 @@ jobs:
7071
# name: maven
7172
# path: dist/.organize/maven
7273
path: dist/.organize
73-
- run: ./build.sh JavaPublish
74+
- run: dotnet build/bin/Debug/publish/_build.dll JavaPublish
75+
shell: bash
7476

7577
node-publish:
7678
runs-on: ubuntu-latest
@@ -94,4 +96,5 @@ jobs:
9496
with:
9597
node-version: "lts/*"
9698
registry-url: https://registry.npmjs.org/
97-
- run: ./build.sh NodePublish
99+
- run: dotnet build/bin/Debug/publish/_build.dll NodePublish
100+
shell: bash

.github/workflows/~dotnet.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
- uses: actions/download-artifact@v4
2525
with:
2626
path: dist/.organize
27-
- run: ./build.cmd DotNet
27+
- run: dotnet build/bin/Debug/publish/_build.dll DotNet
28+
shell: bash
2829
- uses: actions/upload-artifact@v4
2930
with:
3031
name: nupkgs
@@ -54,11 +55,16 @@ jobs:
5455
with:
5556
dotnet-version: '9'
5657
- uses: actions/checkout@v4
58+
- uses: actions/download-artifact@v4
59+
with:
60+
name: nuke
61+
path: build/bin/Debug/publish/
5762
- uses: actions/download-artifact@v4
5863
with:
5964
name: nupkgs
6065
path: dist/.organize/nupkgs
61-
- run: ./build.cmd DotNetTest --architecture ${{ matrix.architecture }} --framework ${{ matrix.framework }}
66+
- run: dotnet build/bin/Debug/publish/_build.dll DotNetTest --architecture ${{ matrix.architecture }} --framework ${{ matrix.framework }}
67+
shell: bash
6268
- uses: actions/upload-artifact@v4
6369
if: always()
6470
with:

.github/workflows/~java.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
- uses: actions/download-artifact@v4
3535
with:
3636
path: dist/.organize
37-
- run: ./build.cmd Java
37+
- run: dotnet build/bin/Debug/publish/_build.dll Java
38+
shell: bash
3839
- uses: actions/upload-artifact@v4
3940
with:
4041
name: maven
@@ -67,7 +68,8 @@ jobs:
6768
with:
6869
name: maven
6970
path: dist/.organize/maven
70-
- run: ./build.cmd JavaTest
71+
- run: dotnet build/bin/Debug/publish/_build.dll JavaTest
72+
shell: bash
7173
- uses: actions/upload-artifact@v4
7274
if: always()
7375
with:

.github/workflows/~native.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565

6666
- name: Compiling LibSkia
6767
run: dotnet build/bin/Debug/publish/_build.dll LibSkiaWithCache --target-os ${{ inputs.target-os }} --architecture ${{ matrix.architecture }} --use-cache ${{ inputs.use-skia-cache }}
68+
shell: bash
6869
id: build
6970

7071
- name: Uploading LibSkia to Artifacts
@@ -112,6 +113,7 @@ jobs:
112113

113114
- name: Compiling LibAlphaSkia
114115
run: dotnet build/bin/Debug/publish/_build.dll LibAlphaSkia LibAlphaSkiaTest --target-os ${{ inputs.target-os }} --architecture ${{ matrix.architecture }} --variant ${{ matrix.variant }}
116+
shell: bash
115117

116118
- name: Uploading LibAlphaSkia to Artifacts
117119
uses: actions/upload-artifact@v4

.github/workflows/~node.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- uses: actions/download-artifact@v4
2626
with:
2727
path: dist/.organize
28-
- run: ./build.cmd Node
28+
- run: dotnet build/bin/Debug/publish/_build.dll Node
29+
shell: bash
2930
- uses: actions/upload-artifact@v4
3031
with:
3132
name: nodetars
@@ -44,14 +45,19 @@ jobs:
4445
with:
4546
dotnet-version: '9'
4647
- uses: actions/checkout@v4
48+
- uses: actions/download-artifact@v4
49+
with:
50+
name: nuke
51+
path: build/bin/Debug/publish/
4752
- uses: actions/download-artifact@v4
4853
with:
4954
name: nodetars
5055
path: dist/.organize/node
5156
- uses: actions/setup-node@v4
5257
with:
5358
node-version: ${{ matrix.node }}
54-
- run: ./build.cmd NodeTest
59+
- run: dotnet build/bin/Debug/publish/_build.dll NodeTest
60+
shell: bash
5561
- id: sanitize-node-version
5662
if: always()
5763
run: echo "NODE_VERSION=${{ matrix.node }}" | sed 's/[*\/]//g' >> "$GITHUB_OUTPUT"

.github/workflows/~reusable-full-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
with:
2626
dotnet-version: '9'
2727
- run: dotnet publish --configuration Debug ./build/_build.csproj
28+
shell: bash
2829
- uses: actions/upload-artifact@v4
2930
with:
3031
name: nuke

build/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int LoadSkiaVersion()
3737
return int.Parse(text[(startOfMarker + marker.Length)..endOfMarker].Trim());
3838
}
3939

40-
static readonly Version FileVersionBase = new Version(3, 1, 0, 0);
40+
static readonly Version FileVersionBase = new Version(3, 2, 0, 0);
4141

4242
#endregion
4343

lib/dotnet/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<DebugType>portable</DebugType>
55
<DebugSymbols>true</DebugSymbols>
6-
<Version Condition=" '$(Version)' == '' ">3.1.135</Version>
6+
<Version Condition=" '$(Version)' == '' ">3.2.135</Version>
77
<AssemblyVersion Condition=" '$(AssemblyVersion)' == '' ">$(Version).0</AssemblyVersion>
88
<FileVersion Condition=" '$(FileVersion)' == '' ">$(AssemblyVersion)</FileVersion>
99
<NeutralLanguage>en</NeutralLanguage>

lib/java/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var libAuthorId = ""
2020
var libAuthorName = ""
2121
var libOrgUrl = ""
2222
var libCompany = ""
23-
var libVersion = "3.1.135"
23+
var libVersion = "3.2.135"
2424
var libProjectUrl = ""
2525
var libGitUrlHttp = ""
2626
var libGitUrlGit = ""

lib/java/jni/src/AlphaSkiaTextMetrics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern "C"
1010
CHECK_HANDLE_RETURN(handle, static_cast<jfloat>(0))
1111

1212
uint16_t value = alphaskia_text_metrics_get_width(reinterpret_cast<alphaskia_text_metrics_t>(handle));
13-
return static_cast<jint>(value);
13+
return static_cast<jfloat>(value);
1414
}
1515

1616
JNIEXPORT jfloat JNICALL Java_alphaTab_alphaSkia_AlphaSkiaTextMetrics_getActualBoundingBoxLeft(JNIEnv *env, jobject instance)

0 commit comments

Comments
 (0)