Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions SixLabors.Fonts.sln
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnicodeTestData", "UnicodeT
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SixLabors.Fonts.Benchmarks", "tests\SixLabors.Fonts.Benchmarks\SixLabors.Fonts.Benchmarks\SixLabors.Fonts.Benchmarks.csproj", "{FB8FDC5F-7FEB-4132-9133-C25E05C0B3D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawWithImageSharp", "samples\DrawWithImageSharp\DrawWithImageSharp.csproj", "{01863664-6C7E-61F2-F74B-7D451FFDC3C2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -99,6 +101,10 @@ Global
{FB8FDC5F-7FEB-4132-9133-C25E05C0B3D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB8FDC5F-7FEB-4132-9133-C25E05C0B3D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB8FDC5F-7FEB-4132-9133-C25E05C0B3D9}.Release|Any CPU.Build.0 = Release|Any CPU
{01863664-6C7E-61F2-F74B-7D451FFDC3C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01863664-6C7E-61F2-F74B-7D451FFDC3C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01863664-6C7E-61F2-F74B-7D451FFDC3C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01863664-6C7E-61F2-F74B-7D451FFDC3C2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -113,6 +119,7 @@ Global
{ABB6E111-672F-4846-88D6-C49C6CD01606} = {249327CF-1415-428B-8EEA-8C7705B1DE8F}
{654DD381-B93D-4459-B669-296F5D9172ED} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{FB8FDC5F-7FEB-4132-9133-C25E05C0B3D9} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{01863664-6C7E-61F2-F74B-7D451FFDC3C2} = {71A3911C-D6B9-4EBE-9691-2FE28BDF462E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {38F4B47F-4F74-40F5-8707-C0EF1D0BDF92}
Expand Down
3 changes: 1 addition & 2 deletions samples/DrawWithImageSharp/DrawWithImageSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.4" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="3.0.0-alpha.0.6" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion samples/DrawWithImageSharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Drawing.Processing.Processors.Text;
using SixLabors.ImageSharp.Drawing.Text;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using IOPath = System.IO.Path;
Expand All @@ -21,15 +22,15 @@
{
var fonts = new FontCollection();
var woffFonts = new FontCollection();
FontFamily font = fonts.Add(IOPath.Combine("Fonts", "SixLaborsSampleAB.ttf"));

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 25 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily fontWoff = woffFonts.Add(IOPath.Combine("Fonts", "SixLaborsSampleAB.woff"));

Check warning on line 26 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 26 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 26 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 26 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 26 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 26 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily fontWoff2 = woffFonts.Add(IOPath.Combine("Fonts", "OpenSans-Regular.woff2"));

Check warning on line 27 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 27 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 27 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 27 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 27 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 27 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily carter = fonts.Add(IOPath.Combine("Fonts", "CarterOne.ttf"));

Check warning on line 28 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 28 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 28 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 28 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 28 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 28 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily wendyOne = fonts.Add(IOPath.Combine("Fonts", "WendyOne-Regular.ttf"));

Check warning on line 29 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 29 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 29 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 29 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily whitneyBook = fonts.Add(IOPath.Combine("Fonts", "whitney-book.ttf"));

Check warning on line 30 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 30 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily colorEmoji = fonts.Add(IOPath.Combine("Fonts", "Twemoji Mozilla.ttf"));

Check warning on line 31 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 31 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily openSans = fonts.Add(IOPath.Combine("Fonts", "OpenSans-Regular.ttf"));

Check warning on line 32 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)

Check warning on line 32 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily sunflower = fonts.Add(IOPath.Combine("Fonts", "Sunflower-Medium.ttf"));

Check warning on line 33 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'FontCollection.Add(string)' could vary based on the current user's locale settings. Replace this call in 'Program.Main(string[])' with a call to 'FontCollection.Add(string, CultureInfo)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304)
FontFamily bugzilla = fonts.Add(IOPath.Combine("Fonts", "me_quran_volt_newmet.ttf"));

FontFamily notoKR = fonts.Add(IOPath.Combine("Fonts", "NotoSansKR-Regular.otf"));
Expand Down Expand Up @@ -75,10 +76,10 @@
});

return;
RenderText(arial, "abcdefghijklmnopqrstuvwxyz", pointSize: 30);

Check warning on line 79 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Unreachable code detected

Check warning on line 79 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Unreachable code detected

Check warning on line 79 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Unreachable code detected

Check warning on line 79 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Unreachable code detected
RenderText(arial, "abcdefghijklmnopqrstuvwxyz\r\nabcdefghijklmnopqrstuvwxyz", pointSize: 30);
RenderText(arial, "abcdef ghijk lmnopq rstuvwxyz", pointSize: 30);
// return;

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Single-line comments should not be followed by blank line (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Single-line comments should not be followed by blank line (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Single-line comments should not be followed by blank line (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Check warning on line 82 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Single-line comments should not be followed by blank line (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md)

var textRuns = new List<RichTextRun>
{
Expand Down Expand Up @@ -218,7 +219,7 @@
using var img = new Image<Rgba32>(width, height);
img.Mutate(x => x.Fill(Color.White));

IPathCollection shapes = TextBuilder.GenerateGlyphs(text, new RichTextOptions(font) { Origin = new Vector2(50f, 4f) });
IPathCollection shapes = TextBuilder.GeneratePaths(text, new RichTextOptions(font) { Origin = new Vector2(50f, 4f) });
img.Mutate(x => x.Fill(Color.Black, shapes));

Directory.CreateDirectory(IOPath.GetDirectoryName(fullPath));
Expand Down Expand Up @@ -288,9 +289,9 @@
float pointSize = 12,
IEnumerable<FontFamily> fallbackFonts = null)
{
foreach (VerticalAlignment va in (VerticalAlignment[])Enum.GetValues(typeof(VerticalAlignment)))

Check warning on line 292 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

Prefer the generic overload 'System.Enum.GetValues<TEnum>()' instead of 'System.Enum.GetValues(System.Type)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2263)
{
foreach (HorizontalAlignment ha in (HorizontalAlignment[])Enum.GetValues(typeof(HorizontalAlignment)))

Check warning on line 294 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

Prefer the generic overload 'System.Enum.GetValues<TEnum>()' instead of 'System.Enum.GetValues(System.Type)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2263)
{
Font font = new(fontFamily, pointSize);
RichTextOptions textOptions = new(font)
Expand Down Expand Up @@ -320,8 +321,8 @@

img[size.Width / 2, size.Height / 2] = Color.White.ToPixel<Rgba32>();

string h = ha.ToString().Replace(nameof(HorizontalAlignment), string.Empty).ToLower();

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 324 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)
string v = va.ToString().Replace(nameof(VerticalAlignment), string.Empty).ToLower();

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'Program.RenderTextProcessorWithAlignment(FontFamily, string,

Check warning on line 325 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

Specify a culture or use an invariant version to avoid implicit dependency on current culture (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311)

string fullPath = CreatePath(font.Name, text + "-" + h + "-" + v + ".png");
Directory.CreateDirectory(IOPath.GetDirectoryName(fullPath));
Expand Down Expand Up @@ -365,7 +366,7 @@

var sb = new StringBuilder();
IEnumerable<ISimplePath> converted = shape.Flatten();
converted.Aggregate(sb, (s, p) =>

Check warning on line 369 in samples/DrawWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

'SaveImage' calls 'Aggregate' but does not use the value the method returns. Linq methods are known to not have side effects. Use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1806)
{
ReadOnlySpan<PointF> points = p.Points.Span;
for (int i = 0; i < points.Length; i++)
Expand Down
25 changes: 22 additions & 3 deletions src/SixLabors.Fonts/GlyphPositioningCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal sealed class GlyphPositioningCollection : IGlyphShapingCollection
/// <summary>
/// Contains a map the index of a map within the collection, non-sequential codepoint offsets, and their glyph ids, point size, and mtrics.
/// </summary>
private readonly List<GlyphPositioningData> glyphs = new();
private readonly List<GlyphPositioningData> glyphs = [];

/// <summary>
/// Initializes a new instance of the <see cref="GlyphPositioningCollection"/> class.
Expand Down Expand Up @@ -149,6 +149,11 @@ public bool TryUpdate(Font font, GlyphSubstitutionCollection collection)
ColorFontSupport colorFontSupport = this.TextOptions.ColorFontSupport;
bool hasFallBacks = false;
List<int> orphans = [];

Tag vert = FeatureTags.VerticalAlternates;
Tag vrt2 = FeatureTags.VerticalAlternatesAndRotation;
Tag vrtr = FeatureTags.VerticalAlternatesForRotation;

for (int i = 0; i < this.glyphs.Count; i++)
{
GlyphPositioningData current = this.glyphs[i];
Expand All @@ -173,6 +178,15 @@ public bool TryUpdate(Font font, GlyphSubstitutionCollection collection)
// cache the original in the font metrics and only update our collection.
TextAttributes textAttributes = shape.TextRun.TextAttributes;
TextDecorations textDecorations = shape.TextRun.TextDecorations;

bool isVertical = AdvancedTypographicUtils.IsVerticalGlyph(codePoint, layoutMode);
foreach (Tag feature in shape.AppliedFeatures)
{
isVertical |= feature == vert;
isVertical |= feature == vrt2;
isVertical |= feature == vrtr;
}

GlyphMetrics metrics = fontMetrics.GetGlyphMetrics(codePoint, id, textAttributes, textDecorations, layoutMode, colorFontSupport);
{
// If the glyphs are fallbacks we don't want them as
Expand All @@ -183,16 +197,20 @@ public bool TryUpdate(Font font, GlyphSubstitutionCollection collection)
}
}

if (!hasFallBacks)
if (metrics.GlyphType != GlyphType.Fallback)
{
if (j == 0)
{
// There should only be a single fallback glyph at this position from the previous collection.
this.glyphs.RemoveAt(i);
}

// We only want a single dimensional advance for positioning.
GlyphShapingBounds bounds = isVertical
? new(0, 0, 0, metrics.AdvanceHeight)
: new(0, 0, metrics.AdvanceWidth, 0);

// Track the number of inserted glyphs at the offset so we can correctly increment our position.
GlyphShapingBounds bounds = new(0, 0, metrics.AdvanceWidth, metrics.AdvanceHeight);
this.glyphs.Insert(i += replacementCount, new(offset, new(shape, true) { Bounds = bounds }, pointSize, metrics.CloneForRendering(shape.TextRun)));
replacementCount++;
}
Expand Down Expand Up @@ -259,6 +277,7 @@ public bool TryAdd(Font font, GlyphSubstitutionCollection collection)
hasFallBacks = true;
}

// We only want a single dimensional advance for positioning.
GlyphShapingBounds bounds = isVertical
? new(0, 0, 0, metrics.AdvanceHeight)
: new(0, 0, metrics.AdvanceWidth, 0);
Expand Down
8 changes: 7 additions & 1 deletion src/SixLabors.Fonts/Tables/AdvancedTypographic/GPosTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ public bool TryUpdatePositions(FontMetrics fontMetrics, GlyphPositioningCollecti
// We want to assign the same feature lookups to individual sections of the text rather
// than the text as a whole to ensure that different language shapers do not interfere
// with each other when the text contains multiple languages.
GlyphShapingData nextData = collection[i + 1];
int ni = i + 1;
GlyphShapingData nextData = collection[ni];
if (!collection.ShouldProcess(fontMetrics, ni))
{
break;
}

ScriptClass next = CodePoint.GetScriptClass(nextData.CodePoint);
if (next != current &&
current is not ScriptClass.Common and not ScriptClass.Unknown and not ScriptClass.Inherited &&
Expand Down
7 changes: 5 additions & 2 deletions src/SixLabors.Fonts/Tables/General/HorizontalMetricsTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ public ushort GetAdvancedWidth(int glyphIndex)
{
if (glyphIndex >= this.advancedWidths.Length)
{
return this.advancedWidths[0];
// Records are indexed by glyph ID. As an optimization, the number of records can
// be less than the number of glyphs, in which case the advance width value of the
// last record applies to all remaining glyph IDs.
return this.advancedWidths[^1];
}

return this.advancedWidths[glyphIndex];
Expand All @@ -29,7 +32,7 @@ internal short GetLeftSideBearing(int glyphIndex)
{
if (glyphIndex >= this.leftSideBearings.Length)
{
return this.leftSideBearings[0];
return this.leftSideBearings[^1];
}

return this.leftSideBearings[glyphIndex];
Expand Down
3 changes: 3 additions & 0 deletions tests/Images/ReferenceOutput/Test_Issue_469-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/SixLabors.Fonts.Tests/Fonts/arial.ttf
Binary file not shown.
73 changes: 73 additions & 0 deletions tests/SixLabors.Fonts.Tests/Issues/Issues_469.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.

using System.Text;

namespace SixLabors.Fonts.Tests.Issues;

public class Issues_469
{
[Fact]
public void Test_Issue_469()
{
const string arialFontName = "Arial";
const string inconsolataFontName = "Inconsolata";
const string nanumGothicCodingFontName = "NanumGothicCoding";
const string cousineFontName = "Cousine";
const string notoSansScThinFontName = "Noto Sans SC Thin";
const string notoSansJpThinFontName = "Noto Sans JP Thin";
const string notoNaskhArabicFontName = "Noto Naskh Arabic";
const string sarabunFontName = "Sarabun";
const string hindFontName = "Hind";

StringBuilder stringBuilder = new();
stringBuilder.AppendLine("Latin: The quick brown fox jumps over the lazy dog.")
.AppendLine("Cyrillic: Съешь же ещё этих мягких французских булок.")
.AppendLine("Greek: Ζαφείρι δέξου πάγκαλο, βαθῶν ψυχῆς τὸ σῆμα.")
.AppendLine("Chinese: 敏捷的棕色狐狸跳过了懒狗")
.AppendLine("Japanese: いろはにほへと ちりぬるを")
.AppendLine("Korean: 다람쥐 헌 쳇바퀴에 타고파")
.AppendLine("Arabic (RTL & Shaping): نص حكيم له سر قاطع وذو شأن عظيم")
.AppendLine("Hebrew (RTL): דג סקרן שט בים מאוכזב ולפתע מצא חברה")
.AppendLine("Thai (Complex): เป็นมนุษย์สุดประเสริฐเลิศคุณค่า")
.AppendLine("Devanagari (Conjuncts): ऋषियों को सताने वाले राक्षसों का अंत हो गया");

string text = stringBuilder.ToString();
FontCollection fontCollection = new();
fontCollection.Add(TestFonts.Arial);
fontCollection.Add(TestFonts.CousineRegular);
fontCollection.Add(TestFonts.HindRegular);
fontCollection.Add(TestFonts.NanumGothicCodingRegular);
fontCollection.Add(TestFonts.InconsolataRegular);
fontCollection.Add(TestFonts.NotoNaskhArabicRegular);
fontCollection.Add(TestFonts.NotoSansHKVariableFontWght);
fontCollection.Add(TestFonts.NotoSansJPRegular);
fontCollection.Add(TestFonts.NotoSansSCRegular);
fontCollection.Add(TestFonts.SarabunRegular);

FontFamily mainFontFamily = fontCollection.Get(arialFontName);
Font mainFont = mainFontFamily.CreateFont(30, FontStyle.Regular);

TextOptions options = new(mainFont)
{
FallbackFontFamilies =
[
fontCollection.Get(inconsolataFontName),
fontCollection.Get(nanumGothicCodingFontName),
fontCollection.Get(cousineFontName),
fontCollection.Get(notoSansScThinFontName),
fontCollection.Get(notoSansJpThinFontName),
fontCollection.Get(notoNaskhArabicFontName),
fontCollection.Get(sarabunFontName),
fontCollection.Get(hindFontName),
],
};

// There are too many metrics to validate here so we just ensure no exceptions are thrown
// and the rendering looks correct by inspecting the snapshot.
TextLayoutTestUtilities.TestLayout(
text,
options,
includeGeometry: false);
}
}
7 changes: 3 additions & 4 deletions tests/SixLabors.Fonts.Tests/SixLabors.Fonts.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<DebugSymbols>True</DebugSymbols>
<Platforms>AnyCPU;x64;x86</Platforms>
<LangVersion>10</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -29,8 +28,8 @@
Comment out this constant declaration to disable all tests based upon image generation.
This allows us to make breaking changes to the Fonts API without breaking the tests.
-->
<!--<DefineConstants>$(DefineConstants);SUPPORTS_DRAWING</DefineConstants>
<HasSupportForDrawing Condition="$(DefineConstants.Contains('SUPPORTS_DRAWING'))">true</HasSupportForDrawing>-->
<DefineConstants>$(DefineConstants);SUPPORTS_DRAWING</DefineConstants>
<HasSupportForDrawing Condition="$(DefineConstants.Contains('SUPPORTS_DRAWING'))">true</HasSupportForDrawing>
</PropertyGroup>

<ItemGroup Condition="$(HasSupportForDrawing) != true">
Expand All @@ -48,7 +47,7 @@
</ItemGroup>

<ItemGroup>
<!--<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.4" Condition="$(HasSupportForDrawing)" />-->
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="3.0.0-alpha.0.6" />
<PackageReference Include="Pegasus" Version="4.1.0" PrivateAssets="all" />
<Compile Include="..\..\src\UnicodeTrieGenerator\StateAutomation\DeterministicFiniteAutomata.cs" Link="Unicode\StateAutomation\DeterministicFiniteAutomata.cs" />
<Compile Include="..\..\src\UnicodeTrieGenerator\StateAutomation\Compile.cs" Link="Unicode\StateAutomation\Compile.cs" />
Expand Down
22 changes: 21 additions & 1 deletion tests/SixLabors.Fonts.Tests/TestFonts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,26 @@

public static string NotoColorEmojiRegular => GetFullPath("NotoColorEmoji-Regular.ttf");

public static string Arial => GetFullPath("arial.ttf");

public static string CousineRegular => GetFullPath("Cousine-Regular.ttf");

public static string HindRegular => GetFullPath("Hind-Regular.ttf");

public static string NanumGothicCodingRegular => GetFullPath("NanumGothicCoding-Regular.ttf");

public static string InconsolataRegular => GetFullPath("Inconsolata-Regular.ttf");

public static string NotoNaskhArabicRegular => GetFullPath("NotoNaskhArabic-Regular.ttf");

public static string NotoSansHKVariableFontWght => GetFullPath("NotoSansHK-VariableFont_wght.ttf");

public static string NotoSansJPRegular => GetFullPath("NotoSansJP-Regular.ttf");

public static string NotoSansSCRegular => GetFullPath("NotoSansSC-Regular.ttf");

public static string SarabunRegular => GetFullPath("Sarabun-Regular.ttf");

public static Stream TwemojiMozillaData() => OpenStream(TwemojiMozillaFile);

public static Stream SegoeuiEmojiData() => OpenStream(SegoeuiEmojiFile);
Expand Down Expand Up @@ -314,9 +334,9 @@
return ms;
}

private static string GetFullPath(string path)
public static string GetFullPath(string path)
{
string root = Path.GetDirectoryName(new Uri(typeof(TestFonts).GetTypeInfo().Assembly.CodeBase).LocalPath);

Check warning on line 339 in tests/SixLabors.Fonts.Tests/TestFonts.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

'Assembly.CodeBase' is obsolete: 'Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location.' (https://aka.ms/dotnet-warnings/SYSLIB0012)

Check warning on line 339 in tests/SixLabors.Fonts.Tests/TestFonts.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

'Assembly.CodeBase' is obsolete: 'Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location.' (https://aka.ms/dotnet-warnings/SYSLIB0012)

Check warning on line 339 in tests/SixLabors.Fonts.Tests/TestFonts.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, true)

'Assembly.CodeBase' is obsolete: 'Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location.' (https://aka.ms/dotnet-warnings/SYSLIB0012)

string[] paths = new[]
{
Expand Down
5 changes: 2 additions & 3 deletions tests/SixLabors.Fonts.Tests/TextLayoutTestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
using SixLabors.Fonts.Tables.AdvancedTypographic;
using SixLabors.Fonts.Tests.TestUtilities;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Drawing.Shapes.Text;
using SixLabors.ImageSharp.Drawing.Text;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
#endif
Expand Down Expand Up @@ -74,7 +73,7 @@ public static void TestLayout(
extended.Insert(0, "G");
using Image<Rgba32> img2 = new(Configuration.Default, imageWidth, imageHeight, Color.White.ToPixel<Rgba32>());

IReadOnlyList<GlyphPathCollection> glyphs = TextBuilder.GenerateGlyphs2(text, options);
IReadOnlyList<GlyphPathCollection> glyphs = TextBuilder.GenerateGlyphs(text, options);

img2.Mutate(ctx => ctx.Fill(Color.Black, glyphs));

Expand Down
Loading