From 09fc49a65e4bc2048290e2234eab1a0ce68ebcd9 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Thu, 30 Apr 2026 08:51:12 +0200 Subject: [PATCH] version 3.1.3-optiq01 - updated to SkiaSharp 3.119.1.0 - build pipeline --- .github/workflows/dotnet.yml | 25 ++- Svg.Editor.Avalon.CI.slnf | 14 ++ Svg.Editor.Avalon.sln | 10 +- .../Svg.Editor.Avalon.Forms.csproj | 4 +- .../Svg.Editor.Avalon.Views.csproj | 4 +- Svg.Editor.Core.Tests/PerformanceTests.cs | 8 +- .../Properties/AssemblyInfo.cs | 20 -- .../Svg.Editor.Core.Tests.csproj | 152 +++----------- .../SvgDrawingCanvasTests.cs | 2 +- Svg.Editor.Core/Svg.Editor.Core.csproj | 4 +- .../Svg.Tests.Benchmarks.csproj | 2 +- Svg.Tests.Win/Svg.Tests.Win.csproj | 1 - Svg.Tests.Win/SvgClipPathTest.cs | 11 +- Svg.Tests.Win/SvgDocumentTest.cs | 13 +- .../SvgVisualElementsExtensionsTests.cs | 11 +- .../SvgVisualElementExtensions.cs | 14 +- Svg/Platform/SkiaFont.cs | 2 +- Svg/Platform/SkiaFontFamily.cs | 23 +-- Svg/Platform/SkiaFontFamilyProvider.cs | 2 +- Svg/Svg.csproj | 192 +++++++++--------- 20 files changed, 225 insertions(+), 289 deletions(-) create mode 100644 Svg.Editor.Avalon.CI.slnf delete mode 100644 Svg.Editor.Core.Tests/Properties/AssemblyInfo.cs diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f6e871a4b..ec37a94ea 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,24 +5,33 @@ name: .NET on: push: - branches: [ "develop" ] + branches: [ "master", "develop" ] pull_request: - branches: [ "develop" ] + branches: [ "master", "develop" ] jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v4 - - name: Setup .NET + - name: Setup .NET (8 + 9) uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + dotnet-version: | + 8.0.x + 9.0.x - name: Restore dependencies - run: dotnet restore + run: dotnet restore Svg.Editor.Avalon.CI.slnf - name: Build - run: dotnet build --no-restore + run: dotnet build Svg.Editor.Avalon.CI.slnf --configuration Release --no-restore - name: Test - run: dotnet test --no-build --verbosity normal + run: dotnet test Svg.Editor.Avalon.CI.slnf --configuration Release --no-build --framework net9.0 --verbosity normal --logger "trx;LogFileName=test-results.trx" --results-directory ${{ github.workspace }}/TestResults + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results + path: ${{ github.workspace }}/TestResults/**/*.trx + if-no-files-found: warn diff --git a/Svg.Editor.Avalon.CI.slnf b/Svg.Editor.Avalon.CI.slnf new file mode 100644 index 000000000..c4d727e4c --- /dev/null +++ b/Svg.Editor.Avalon.CI.slnf @@ -0,0 +1,14 @@ +{ + "solution": { + "path": "Svg.Editor.Avalon.sln", + "projects": [ + "Svg\\Svg.csproj", + "Svg.Editor.Core\\Svg.Editor.Core.csproj", + "Svg.Editor.Avalonia.Forms\\Svg.Editor.Avalon.Forms.csproj", + "Svg.Editor.Avalonia.Views\\Svg.Editor.Avalon.Views.csproj", + "Svg.Editor.Core.Tests\\Svg.Editor.Core.Tests.csproj", + "Svg.Tests.Win\\Svg.Tests.Win.csproj", + "Svg.Tests.Benchmarks\\Svg.Tests.Benchmarks.csproj" + ] + } +} diff --git a/Svg.Editor.Avalon.sln b/Svg.Editor.Avalon.sln index d86f379a5..c3d029b12 100644 --- a/Svg.Editor.Avalon.sln +++ b/Svg.Editor.Avalon.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 -VisualStudioVersion = 18.3.11505.172 d18.3 +VisualStudioVersion = 18.3.11505.172 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Svg", "Svg", "{ACC8B9D3-7E55-4F2E-B0D1-955BDA751FCF}" EndProject @@ -35,6 +35,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Svg.Editor.CrossSample.Aval EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Svg.Editor.CrossSample.Avalon.iOS", "Svg.Editor.CrossSample.Avalon\Svg.Editor.CrossSample.Avalon.iOS\Svg.Editor.CrossSample.Avalon.iOS.csproj", "{61FC8A8D-0520-4881-94CC-CABD15A27B57}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution-items", "solution-items", "{A5712C80-A0CF-465C-8557-A28265B56E38}" + ProjectSection(SolutionItems) = preProject + .github\workflows\dotnet.yml = .github\workflows\dotnet.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -113,6 +118,9 @@ Global {897540BE-6373-4565-AEF4-41E19EB8DFEE} = {64382118-1FD0-4891-A24F-9C065103DEAB} {61FC8A8D-0520-4881-94CC-CABD15A27B57} = {64382118-1FD0-4891-A24F-9C065103DEAB} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {569660EA-F35A-4750-8199-48494389F23F} + EndGlobalSection GlobalSection(SharedMSBuildProjectFiles) = preSolution Svg.Tests\Svg.Tests.projitems*{92bce9d4-6968-4533-9785-a240ee123faa}*SharedItemsImports = 13 Svg.Tests\Svg.Tests.projitems*{ed6ab6fc-ad44-4dfa-afc4-b0f127b87d5e}*SharedItemsImports = 5 diff --git a/Svg.Editor.Avalonia.Forms/Svg.Editor.Avalon.Forms.csproj b/Svg.Editor.Avalonia.Forms/Svg.Editor.Avalon.Forms.csproj index ec647159f..326105b6a 100644 --- a/Svg.Editor.Avalonia.Forms/Svg.Editor.Avalon.Forms.csproj +++ b/Svg.Editor.Avalonia.Forms/Svg.Editor.Avalon.Forms.csproj @@ -3,8 +3,10 @@ net9.0 enable latest - 3.1.2-optiq06 + 3.1.3-optiq01 + #3.1.3-optiq01 + Updated SkiaSharp from 2.88.8 to 3.119.1 #3.1.2-optiq06 Fixed: Sketch, when setting text and cancel dialog, opens new dialog and asks for font size #3.1.2-optiq05 diff --git a/Svg.Editor.Avalonia.Views/Svg.Editor.Avalon.Views.csproj b/Svg.Editor.Avalonia.Views/Svg.Editor.Avalon.Views.csproj index 30c9b22df..0861c436e 100644 --- a/Svg.Editor.Avalonia.Views/Svg.Editor.Avalon.Views.csproj +++ b/Svg.Editor.Avalonia.Views/Svg.Editor.Avalon.Views.csproj @@ -3,8 +3,10 @@ net9.0 enable latest - 3.1.2-optiq06 + 3.1.3-optiq01 + #3.1.3-optiq01 + Updated SkiaSharp from 2.88.8 to 3.119.1 #3.1.2-optiq06 Fixed: Sketch, when setting text and cancel dialog, opens new dialog and asks for font size #3.1.2-optiq05 diff --git a/Svg.Editor.Core.Tests/PerformanceTests.cs b/Svg.Editor.Core.Tests/PerformanceTests.cs index 0504e2c68..931c0a8be 100644 --- a/Svg.Editor.Core.Tests/PerformanceTests.cs +++ b/Svg.Editor.Core.Tests/PerformanceTests.cs @@ -32,7 +32,7 @@ public async Task IfPointerIsMoved_AndNoElementIsSelected_NothingIsMoved() Canvas.CanvasInvalidated += async (sender, args) => { - using (var surface = SkiaSharp.SKSurface.Create(800, 600, SKImageInfo.PlatformColorType, SKAlphaType.Premul)) + using (var surface = SkiaSharp.SKSurface.Create(new SKImageInfo(800, 600, SKImageInfo.PlatformColorType, SKAlphaType.Premul))) { await Canvas.OnDraw(new SKCanvasRenderer(surface, 800, 600)); } @@ -69,7 +69,7 @@ public async Task IfPointerIsMoved_AndNoElementIsSelected_NothingIsMoved_OpenGL( Canvas.CanvasInvalidated += async (sender, args) => { - using (var surface = SkiaSharp.SKSurface.Create(GRContext.Create(GRBackend.OpenGL), new GRBackendRenderTargetDesc())) + using (var surface = SkiaSharp.SKSurface.Create(GRContext.CreateGl(), new GRBackendRenderTarget(800, 600, 0, 8, new GRGlFramebufferInfo()), GRSurfaceOrigin.BottomLeft, SKColorType.Rgba8888)) { await Canvas.OnDraw(new SKCanvasRenderer(surface, 800, 600)); } @@ -98,13 +98,13 @@ public async Task CachesSvgRendererAndUpdatesGraphics() Canvas.Document = d; // Act: draw 2x with different SKCanvasRenderers - using var surface1 = SkiaSharp.SKSurface.Create(800, 600, SKImageInfo.PlatformColorType, SKAlphaType.Premul); + using var surface1 = SkiaSharp.SKSurface.Create(new SKImageInfo(800, 600, SKImageInfo.PlatformColorType, SKAlphaType.Premul)); var renderer1 = new SKCanvasRenderer(surface1, 800, 600); await Canvas.OnDraw(renderer1); var svgR1 = d.UsedRenderers[0]; var svgR1Graphics = svgR1.Graphics; - using var surface2 = SkiaSharp.SKSurface.Create(800, 600, SKImageInfo.PlatformColorType, SKAlphaType.Premul); + using var surface2 = SkiaSharp.SKSurface.Create(new SKImageInfo(800, 600, SKImageInfo.PlatformColorType, SKAlphaType.Premul)); var renderer2 = new SKCanvasRenderer(surface2, 800, 600); await Canvas.OnDraw(renderer2); var svgR2 = d.UsedRenderers[1]; diff --git a/Svg.Editor.Core.Tests/Properties/AssemblyInfo.cs b/Svg.Editor.Core.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index bc211ec46..000000000 --- a/Svg.Editor.Core.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Svg.Editor.Core.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Svg.Editor.Core.Tests")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("18a8f892-730a-489c-9803-bcd9e2b67e6e")] - -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Svg.Editor.Core.Tests/Svg.Editor.Core.Tests.csproj b/Svg.Editor.Core.Tests/Svg.Editor.Core.Tests.csproj index 1ffe8b1d0..4360f64cc 100644 --- a/Svg.Editor.Core.Tests/Svg.Editor.Core.Tests.csproj +++ b/Svg.Editor.Core.Tests/Svg.Editor.Core.Tests.csproj @@ -1,122 +1,30 @@ - - - - - Debug - AnyCPU - {18A8F892-730A-489C-9803-BCD9E2B67E6E} - Library - Properties - Svg.Editor.Core.Tests - Svg.Editor.Core.Tests - v4.7.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - latest - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - latest - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - latest - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - latest - - - - ..\..\..\..\..\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v9.0\Mono.Android.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11.2.1 - - - 4.0.0 - - - 3.12.0 - - - - - PreserveNewest - - - PreserveNewest - - - - - {4cf34d1c-662c-400d-beaf-e87ce1d08fab} - Svg.Editor.Core - - - {2c5671c4-9c70-4d74-80dc-5e0ec17d27b4} - Svg - - - - - \ No newline at end of file + + + + net48;net9.0 + Library + Svg.Editor.Core.Tests + Svg.Editor.Core.Tests + latest + false + + + + + + + + + + + + + + + + + + + + + diff --git a/Svg.Editor.Core.Tests/SvgDrawingCanvasTests.cs b/Svg.Editor.Core.Tests/SvgDrawingCanvasTests.cs index c6b79005e..cf24211d4 100644 --- a/Svg.Editor.Core.Tests/SvgDrawingCanvasTests.cs +++ b/Svg.Editor.Core.Tests/SvgDrawingCanvasTests.cs @@ -228,7 +228,7 @@ public async Task CalculatesZoomFactorAndTranslateCorrectly( Canvas.ScreenHeight = screenHeight; Canvas.Document = d; - using var surface1 = SKSurface.Create(screenWidth, screenHeight, SKImageInfo.PlatformColorType, SKAlphaType.Premul); + using var surface1 = SKSurface.Create(new SKImageInfo(screenWidth, screenHeight, SKImageInfo.PlatformColorType, SKAlphaType.Premul)); var renderer1 = new SKCanvasRenderer(surface1, screenWidth, screenHeight); await Canvas.OnDraw(renderer1); diff --git a/Svg.Editor.Core/Svg.Editor.Core.csproj b/Svg.Editor.Core/Svg.Editor.Core.csproj index 9a9333a5b..7436d0217 100644 --- a/Svg.Editor.Core/Svg.Editor.Core.csproj +++ b/Svg.Editor.Core/Svg.Editor.Core.csproj @@ -4,9 +4,11 @@ Svg.Editor en-US netstandard2.0 - 3.1.2-optiq06 + 3.1.3-optiq01 latest + #3.1.3-optiq01 + Updated SkiaSharp from 2.88.8 to 3.119.1 #3.1.2-optiq06 Fixed: Sketch, when setting text and cancel dialog, opens new dialog and asks for font size #3.1.2-optiq05 diff --git a/Svg.Tests.Benchmarks/Svg.Tests.Benchmarks.csproj b/Svg.Tests.Benchmarks/Svg.Tests.Benchmarks.csproj index ebb3c308b..81d8f013e 100644 --- a/Svg.Tests.Benchmarks/Svg.Tests.Benchmarks.csproj +++ b/Svg.Tests.Benchmarks/Svg.Tests.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable diff --git a/Svg.Tests.Win/Svg.Tests.Win.csproj b/Svg.Tests.Win/Svg.Tests.Win.csproj index 6b9be7da2..22cc2ff33 100644 --- a/Svg.Tests.Win/Svg.Tests.Win.csproj +++ b/Svg.Tests.Win/Svg.Tests.Win.csproj @@ -6,7 +6,6 @@ Svg.Tests.Win Svg.Tests.Win latest - x86 false false diff --git a/Svg.Tests.Win/SvgClipPathTest.cs b/Svg.Tests.Win/SvgClipPathTest.cs index d1d091cef..43a464f83 100644 --- a/Svg.Tests.Win/SvgClipPathTest.cs +++ b/Svg.Tests.Win/SvgClipPathTest.cs @@ -1,4 +1,6 @@ -using System.Linq; +using System; +using System.IO; +using System.Linq; using Shouldly; using NUnit.Framework; using SkiaSharp; @@ -22,8 +24,8 @@ public void WhenClipPathRendered_GroupElementShouldBeCLipped() // Arrange var pngPath = "test_matrix.png"; var svgPath = "testBosPlan.svg"; - - var svgDoc = SvgDocument.Open("Assets\\"+ svgPath); + var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "Assets", svgPath); + var svgDoc = SvgDocument.Open(path); //var bitMap = svgDoc.Draw(); @@ -72,7 +74,8 @@ public void WhenGettingCliPathBounds_BasedOnClipPathsChildren_GetBounds() // Arrange var svgPath = "ClipPathBounds.svg"; - var svgDoc = SvgDocument.Open("Assets\\" + svgPath); + var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "Assets", svgPath); + var svgDoc = SvgDocument.Open(path); var clip = svgDoc.Children.First().Children.OfType().First(); diff --git a/Svg.Tests.Win/SvgDocumentTest.cs b/Svg.Tests.Win/SvgDocumentTest.cs index fdaca42ba..a383fdb8f 100644 --- a/Svg.Tests.Win/SvgDocumentTest.cs +++ b/Svg.Tests.Win/SvgDocumentTest.cs @@ -1,5 +1,6 @@ -using Shouldly; -using NUnit.Framework; +using NUnit.Framework; +using Shouldly; +using System.IO; using System.Linq; namespace Svg.Tests.Win @@ -181,10 +182,12 @@ public void WhenGettingDocumentBounds_AndChildrenHaveClipPath_GetBoundsBasedOnCh // Arrange var svgPath = "ClipPathBounds.svg"; - var svgDoc = SvgDocument.Open("Assets\\" + svgPath); + var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "Assets", svgPath); - Assert.AreEqual(200, svgDoc.CalculateDocumentBounds().Width); - Assert.AreEqual(50, svgDoc.CalculateDocumentBounds().Height); + var svgDoc = SvgDocument.Open(path); + var bounds = svgDoc.CalculateDocumentBounds(); + Assert.AreEqual(200, bounds.Width); + Assert.AreEqual(50, bounds.Height); } [Test] diff --git a/Svg.Tests.Win/SvgVisualElementsExtensionsTests.cs b/Svg.Tests.Win/SvgVisualElementsExtensionsTests.cs index 33edd6a9f..fae78313b 100644 --- a/Svg.Tests.Win/SvgVisualElementsExtensionsTests.cs +++ b/Svg.Tests.Win/SvgVisualElementsExtensionsTests.cs @@ -1,6 +1,7 @@ -using System.Linq; -using NUnit.Framework; +using NUnit.Framework; using Svg.Editor.Tests; +using System.IO; +using System.Linq; namespace Svg.Tests.Win; @@ -19,7 +20,8 @@ public void WhenGettingBoundsFromVisualElement_WithClipPathSmallerThanElement_Ge // Arrange var svgPath = "ClipPathBounds.svg"; - var svgDoc = SvgDocument.Open("Assets\\" + svgPath); + var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "Assets", svgPath); + var svgDoc = SvgDocument.Open(path); var rectangle = svgDoc.Children[1].Children.OfType().FirstOrDefault(); @@ -37,7 +39,8 @@ public void WhenGettingBoundsFromVisualElement_WithClipPathBiggerThanElement_Get // Arrange var svgPath = "ClipPathBounds.svg"; - var svgDoc = SvgDocument.Open("Assets\\" + svgPath); + var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "Assets", svgPath); + var svgDoc = SvgDocument.Open(path); var rectangle = svgDoc.Children[2].Children.OfType().FirstOrDefault(); diff --git a/Svg/Basic Shapes/SvgVisualElementExtensions.cs b/Svg/Basic Shapes/SvgVisualElementExtensions.cs index cd1d2d564..15422a4f3 100644 --- a/Svg/Basic Shapes/SvgVisualElementExtensions.cs +++ b/Svg/Basic Shapes/SvgVisualElementExtensions.cs @@ -10,13 +10,19 @@ public static class SvgVisualElementExtensions public static RectangleF GetBoundsWithClipPaths(this SvgVisualElement element) { var bounds = element.Path(null).GetBounds(); - if (element.ClipPath != null) + + SvgElement current = element; + while (current != null) { - SvgClipPath clipPath = element.OwnerDocument.GetElementById(element.ClipPath.OriginalString); - if (clipPath != null && (clipPath.Bounds.Width < bounds.Width || clipPath.Bounds.Height < bounds.Width)) + if (current is SvgVisualElement visual && visual.ClipPath != null) { - return clipPath.Bounds; + SvgClipPath clipPath = element.OwnerDocument.GetElementById(visual.ClipPath.OriginalString); + if (clipPath != null && (clipPath.Bounds.Width < bounds.Width || clipPath.Bounds.Height < bounds.Height)) + { + return clipPath.Bounds; + } } + current = current.Parent; } return bounds; diff --git a/Svg/Platform/SkiaFont.cs b/Svg/Platform/SkiaFont.cs index 296e7d6f4..8f2a482ed 100644 --- a/Svg/Platform/SkiaFont.cs +++ b/Svg/Platform/SkiaFont.cs @@ -42,7 +42,7 @@ public FontStyle Style set { _style = value; - _paint.Typeface = SKTypeface.FromTypeface(_fontFamily.Typeface, value.ToSKTypefaceStyle()); + _paint.Typeface = SKTypeface.FromFamilyName(_fontFamily.Typeface.FamilyName, value.ToSKFontStyle()); } } diff --git a/Svg/Platform/SkiaFontFamily.cs b/Svg/Platform/SkiaFontFamily.cs index baabeb00f..2fa813f16 100644 --- a/Svg/Platform/SkiaFontFamily.cs +++ b/Svg/Platform/SkiaFontFamily.cs @@ -20,7 +20,7 @@ public float GetCellAscent(FontStyle style) { using (var paint = new SKPaint()) { - paint.Typeface = SKTypeface.FromTypeface(_typeface, style.ToSKTypefaceStyle()); + paint.Typeface = SKTypeface.FromFamilyName(_typeface.FamilyName, style.ToSKFontStyle()); return paint.FontMetrics.Ascent; } } @@ -29,7 +29,7 @@ public float GetEmHeight(FontStyle style) { using (var paint = new SKPaint()) { - paint.Typeface = SKTypeface.FromTypeface(_typeface, style.ToSKTypefaceStyle()); + paint.Typeface = SKTypeface.FromFamilyName(_typeface.FamilyName, style.ToSKFontStyle()); return paint.FontMetrics.Top; } } @@ -52,21 +52,16 @@ public void Dispose() public static class TypeFaceExtensions { - public static SKTypefaceStyle ToSKTypefaceStyle(this FontStyle value) + public static SKFontStyle ToSKFontStyle(this FontStyle value) { - var tfs = SKTypefaceStyle.Normal; - if ((value & FontStyle.Bold) == FontStyle.Bold && (value & FontStyle.Italic) == FontStyle.Italic) - tfs = SKTypefaceStyle.BoldItalic; - else if ((value & FontStyle.Bold) == FontStyle.Bold) - tfs = SKTypefaceStyle.Bold; - else if ((value & FontStyle.Italic) == FontStyle.Italic) - tfs = SKTypefaceStyle.Italic; - else if ((value & FontStyle.Regular) == FontStyle.Regular) - tfs = SKTypefaceStyle.Normal; - - return tfs; + return SKFontStyle.BoldItalic; + if ((value & FontStyle.Bold) == FontStyle.Bold) + return SKFontStyle.Bold; + if ((value & FontStyle.Italic) == FontStyle.Italic) + return SKFontStyle.Italic; + return SKFontStyle.Normal; } } } diff --git a/Svg/Platform/SkiaFontFamilyProvider.cs b/Svg/Platform/SkiaFontFamilyProvider.cs index aab6b3295..933a40d35 100644 --- a/Svg/Platform/SkiaFontFamilyProvider.cs +++ b/Svg/Platform/SkiaFontFamilyProvider.cs @@ -12,7 +12,7 @@ public IEnumerable Families { return new List() { - new SkiaFontFamily(SKTypeface.FromFamilyName(string.Empty, SKTypefaceStyle.Normal), "Default"), GenericSerif, GenericSansSerif, GenericMonospace, + new SkiaFontFamily(SKTypeface.FromFamilyName(string.Empty, SKFontStyle.Normal), "Default"), GenericSerif, GenericSansSerif, GenericMonospace, }; } } diff --git a/Svg/Svg.csproj b/Svg/Svg.csproj index 0c486a62d..06ecfca17 100644 --- a/Svg/Svg.csproj +++ b/Svg/Svg.csproj @@ -1,12 +1,14 @@  - - netstandard2.0;net48;net9.0 - PackageReference - 3.1.2-optiq07 - gentledpp,zepr - Opti-Q GmbH - + + netstandard2.0;net48;net9.0 + PackageReference + 3.1.3-optiq01 + gentledpp,zepr + Opti-Q GmbH + + #3.1.3-optiq01 + Updated SkiaSharp from 2.88.8 to 3.119.1 #3.1.2-optiq07 Fixed clip path property being inherited #3.1.2-optiq06 @@ -62,94 +64,94 @@ #2.4.4.2 - fix: SvgDocument.DeepCopy<T> also copies stylesheets - - #2.4.4.1 - - major performance improvements by caching pens and paints - - support for custom OTF fonts - - text rendering improvements - - #2.4.3.16 - - Render tspan in textrenderer - - #2.4.3.15 - - Render tspan in textrenderer - - - #2.4.3.14 - - DrawAllContents with Original SvgDocument size - - #2.4.3.13 - - Texterendering renders with default size when no size available - - #2.4.3.10 - 11 - - add OnScreenSet event in SvgDrawingCanvas after Screen properties set in OnDraw method - - # 2.4.3.9 - - fix WebRequestSvc to handle path correctly (for real this time) - - # 2.4.3.7 - - bumped version for 2.4.3.6 - - # 2.4.3.6 - - fix WebRequestSvc to handle path correctly - - # 2.4.3.5 - - changed "Href" property of SvgImage from Uri to string, as System.Uri throws in case a url is too long - - # 2.4.3.4 - - antialiasing on by default - - # 2.4.3.3 - - netstandard multiplatform - - latest - - - - true - - true - true - true - true - snupkg - - true - - - - all - runtime; build; native; contentfiles; analyzers - - - - - Net4 - - - - - - - - - - - - - - - - - - - - - - - - - + + #2.4.4.1 + - major performance improvements by caching pens and paints + - support for custom OTF fonts + - text rendering improvements + + #2.4.3.16 + - Render tspan in textrenderer + + #2.4.3.15 + - Render tspan in textrenderer + + + #2.4.3.14 + - DrawAllContents with Original SvgDocument size + + #2.4.3.13 + - Texterendering renders with default size when no size available + + #2.4.3.10 - 11 + - add OnScreenSet event in SvgDrawingCanvas after Screen properties set in OnDraw method + + # 2.4.3.9 + - fix WebRequestSvc to handle path correctly (for real this time) + + # 2.4.3.7 + - bumped version for 2.4.3.6 + + # 2.4.3.6 + - fix WebRequestSvc to handle path correctly + + # 2.4.3.5 + - changed "Href" property of SvgImage from Uri to string, as System.Uri throws in case a url is too long + + # 2.4.3.4 + - antialiasing on by default + + # 2.4.3.3 + - netstandard multiplatform + + latest + + + + true + + true + true + true + true + snupkg + + true + + + + all + runtime; build; native; contentfiles; analyzers + + + + + Net4 + + + + + + + + + + + + + + + + + + + + + + + + +