Skip to content

Commit b560d79

Browse files
committed
Update to .net8
1 parent eadc8db commit b560d79

File tree

15 files changed

+46
-58
lines changed

15 files changed

+46
-58
lines changed

.github/workflows/build-and-test.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,42 @@ jobs:
1919
- ${{ contains(github.event.pull_request.labels.*.name, 'arch:arm32') || contains(github.event.pull_request.labels.*.name, 'arch:arm64') }}
2020
options:
2121
- os: ubuntu-latest
22-
framework: net7.0
23-
sdk: 7.0.x
22+
framework: net9.0
23+
sdk: 9.0.x
2424
sdk-preview: true
2525
runtime: -x64
2626
codecov: false
2727
- os: macos-latest
28-
framework: net7.0
29-
sdk: 7.0.x
28+
framework: net9.0
29+
sdk: 9.0.x
3030
sdk-preview: true
3131
runtime: -x64
3232
codecov: false
3333
- os: windows-latest
34-
framework: net7.0
35-
sdk: 7.0.x
34+
framework: net9.0
35+
sdk: 9.0.x
3636
sdk-preview: true
3737
runtime: -x64
3838
codecov: false
3939
- os: buildjet-4vcpu-ubuntu-2204-arm
40-
framework: net7.0
41-
sdk: 7.0.x
40+
framework: net9.0
41+
sdk: 9.0.x
4242
sdk-preview: true
4343
runtime: -x64
4444
codecov: false
4545
- os: ubuntu-latest
46-
framework: net6.0
47-
sdk: 6.0.x
46+
framework: net8.0
47+
sdk: 8.0.x
4848
runtime: -x64
4949
codecov: false
5050
- os: macos-latest
51-
framework: net6.0
52-
sdk: 6.0.x
51+
framework: net8.0
52+
sdk: 8.0.x
5353
runtime: -x64
5454
codecov: false
5555
- os: windows-latest
56-
framework: net6.0
57-
sdk: 6.0.x
56+
framework: net8.0
57+
sdk: 8.0.x
5858
runtime: -x64
5959
codecov: true
6060
exclude:

samples/DrawWithImageSharp/DrawWithImageSharp.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
<Choose>
1414
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
1515
<PropertyGroup>
16-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
16+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
1717
</PropertyGroup>
1818
</When>
1919
<Otherwise>
2020
<PropertyGroup>
21-
<TargetFrameworks>net6.0</TargetFrameworks>
21+
<TargetFrameworks>net8.0</TargetFrameworks>
2222
</PropertyGroup>
2323
</Otherwise>
2424
</Choose>
25-
25+
2626
<ItemGroup>
2727
<Content Include="..\..\tests\SixLabors.Fonts.Tests\Fonts\**\*.ttf" Link="Fonts\%(Filename)%(Extension)">
2828
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

samples/ListFonts/ListFonts.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
<Choose>
88
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
99
<PropertyGroup>
10-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
10+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
1111
</PropertyGroup>
1212
</When>
1313
<Otherwise>
1414
<PropertyGroup>
15-
<TargetFrameworks>net6.0</TargetFrameworks>
15+
<TargetFrameworks>net8.0</TargetFrameworks>
1616
</PropertyGroup>
1717
</Otherwise>
1818
</Choose>
19-
19+
2020
<ItemGroup>
2121
<ProjectReference Include="..\..\src\SixLabors.Fonts\SixLabors.Fonts.csproj" />
2222
</ItemGroup>

src/SixLabors.Fonts/FontCollection.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private FontFamily AddImpl(Stream stream, CultureInfo culture, out FontDescripti
208208
return ((IFontMetricsCollection)this).AddMetrics(metrics, culture);
209209
}
210210

211-
private IEnumerable<FontFamily> AddCollectionImpl(
211+
private HashSet<FontFamily> AddCollectionImpl(
212212
string path,
213213
CultureInfo culture,
214214
out IEnumerable<FontDescription> descriptions)
@@ -228,7 +228,7 @@ private IEnumerable<FontFamily> AddCollectionImpl(
228228
return families;
229229
}
230230

231-
private IEnumerable<FontFamily> AddCollectionImpl(
231+
private HashSet<FontFamily> AddCollectionImpl(
232232
Stream stream,
233233
CultureInfo culture,
234234
out IEnumerable<FontDescription> descriptions)
@@ -251,7 +251,7 @@ private IEnumerable<FontFamily> AddCollectionImpl(
251251
return installedFamilies;
252252
}
253253

254-
private IEnumerable<FontFamily> FamiliesByCultureImpl(CultureInfo culture)
254+
private FontFamily[] FamiliesByCultureImpl(CultureInfo culture)
255255
=> this.metricsCollection
256256
.Select(x => x.Description.FontFamily(culture))
257257
.Distinct()

src/SixLabors.Fonts/IO/ZlibInflateStream.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ public override void Flush()
122122
/// <inheritdoc/>
123123
public override int Read(byte[] buffer, int offset, int count)
124124
{
125-
if (this.deflateStream is null)
126-
{
127-
throw new ObjectDisposedException("inner stream");
128-
}
125+
ObjectDisposedException.ThrowIf(this.deflateStream is null, this.deflateStream);
129126

130127
// We don't check CRC on reading
131128
int read = this.deflateStream.Read(buffer, offset, count);

src/SixLabors.Fonts/SixLabors.Fonts.csproj

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
<Choose>
3333
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
3434
<PropertyGroup>
35-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
35+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
3636
<IsTrimmable>true</IsTrimmable>
3737
</PropertyGroup>
3838
</When>
3939
<Otherwise>
4040
<PropertyGroup>
41-
<TargetFrameworks>net6.0</TargetFrameworks>
41+
<TargetFrameworks>net8.0</TargetFrameworks>
4242
<IsTrimmable>true</IsTrimmable>
4343
</PropertyGroup>
4444
</Otherwise>
@@ -55,15 +55,5 @@
5555
<None Include="..\..\shared-infrastructure\branding\icons\fonts\sixlabors.fonts.128.png" Pack="true" PackagePath="" />
5656
</ItemGroup>
5757

58-
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
59-
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" />
60-
</ItemGroup>
61-
62-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
63-
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
64-
<PackageReference Include="System.Buffers" Version="4.5.1" />
65-
<PackageReference Include="System.Memory" Version="4.5.4" />
66-
</ItemGroup>
67-
6858
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />
6959
</Project>

src/SixLabors.Fonts/StreamFontMetrics.Cff.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private static StreamFontMetrics LoadCompactFont(FontReader reader)
6565
return new StreamFontMetrics(tables);
6666
}
6767

68-
private GlyphMetrics CreateCffGlyphMetrics(
68+
private CffGlyphMetrics CreateCffGlyphMetrics(
6969
in CodePoint codePoint,
7070
ushort glyphId,
7171
GlyphType glyphType,

src/SixLabors.Fonts/StreamFontMetrics.TrueType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private static StreamFontMetrics LoadTrueTypeFont(FontReader reader)
114114
return new StreamFontMetrics(tables);
115115
}
116116

117-
private GlyphMetrics CreateTrueTypeGlyphMetrics(
117+
private TrueTypeGlyphMetrics CreateTrueTypeGlyphMetrics(
118118
in CodePoint codePoint,
119119
ushort glyphId,
120120
GlyphType glyphType,

src/SixLabors.Fonts/Tables/AdvancedTypographic/Shapers/IndicShaper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ private static bool IsJoiner(GlyphShapingData data)
836836
private static bool IsHalantOrCoeng(GlyphShapingData data)
837837
=> data.IndicShapingEngineInfo != null && (data.IndicShapingEngineInfo.Category & HalantOrCoengFlags) != 0;
838838

839-
private static int NextSyllable(IGlyphShapingCollection collection, int index, int count)
839+
private static int NextSyllable(GlyphSubstitutionCollection collection, int index, int count)
840840
{
841841
if (index >= count)
842842
{

src/SixLabors.Fonts/Tables/AdvancedTypographic/Shapers/UniversalShaper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ private static void Reorder(IGlyphShapingCollection collection, int index, int c
317317
}
318318
}
319319

320-
private static int NextSyllable(IGlyphShapingCollection collection, int index, int count)
320+
private static int NextSyllable(GlyphSubstitutionCollection collection, int index, int count)
321321
{
322322
if (index >= count)
323323
{

0 commit comments

Comments
 (0)