Skip to content

Commit

Permalink
Update refs, add MAUI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBobSquarePants committed Jul 31, 2024
1 parent 202a546 commit e53d0a0
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: git lfs pull

- name: Install DocFX
run: choco install docfx -y
run: dotnet tool install -g docfx

- name: Build
shell: pwsh
Expand Down
13 changes: 13 additions & 0 deletions articles/imagesharp/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,16 @@ If you are experiencing a significant performance gap between System.Drawing and
A few troubleshooting steps to try:

- Check the value of [Vector.IsHardwareAccelerated](https://docs.microsoft.com/en-us/dotnet/api/system.numerics.vector.ishardwareaccelerated?view=netcore-2.1&viewFallbackFrom=netstandard-2.0#System_Numerics_Vector_IsHardwareAccelerated). If the output is false, it means there is no SIMD support in your runtime!

### MAUI
ImageSharp performs well with MAUI on both iOS and Android in release mode when correctly configured. For Android we recommend enabling LLVM and AOT compilation in the project file:

```xml
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Release'">
<EnableLLVM>true</EnableLLVM>
<RunAOTCompilation>true</RunAOTCompilation>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
</PropertyGroup>
```

>[!NOTE] Android performance in Debug mode appears to be significantly slower than in Release mode, this is not due to issues within the library itself rather upstream issues in the .NET Runtime. The following [.NET Runtime issue](https://github.com/dotnet/runtime/issues/71210) contains more information.
20 changes: 15 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Ensure all submodules are currently checked out to the latest tag.
# Ensure all submodules are currently checked out to the latest commit/tag.
git submodule update --init --recursive
git submodule foreach git rm --cached -r .

Get-ChildItem ./ext -Directory | ForEach-Object {
$path = $_.FullName

Write-Host "Processing submodule: $path"

# Fetch tags and check out the latest tag
git -C "$path" fetch --tags
$lastTag = (git -C "$path" describe --tags $(git -C "$path" rev-list --tags --max-count=1)) | Out-String
$lastTag = $lastTag.Trim()

Write-Host "$path => $lastTag"
git -C "$path" reset --hard "$lastTag" --
# Get all tags, sort them alphabetically, and select the highest one
$highestTag = (git -C "$path" tag | Sort-Object -Descending)[0] | Out-String
$highestTag = $highestTag.Trim()
Write-Host "$path => $highestTag"

# Checkout the latest tag
git -C "$path" reset --hard "$highestTag"

# Forcefully clean the submodule directory, suppressing any prompts
git -C "$path" clean -fdx -q
}


# Ensure deterministic builds do not affect submodule build
# TODO: Remove first two values once all projects are updated to latest build props.
$env:CI = $false
Expand Down
12 changes: 6 additions & 6 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netcoreapp3.1"

}
},
{
Expand All @@ -27,7 +27,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netcoreapp3.1"

}
},
{
Expand All @@ -42,7 +42,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netcoreapp3.1"

}
},
{
Expand All @@ -57,7 +57,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netcoreapp3.1"

}
},
{
Expand All @@ -72,7 +72,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netcoreapp3.1"

}
},
{
Expand All @@ -87,7 +87,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netcoreapp3.1"

}
}
],
Expand Down
2 changes: 1 addition & 1 deletion ext/Fonts
Submodule Fonts updated 51 files
+9 −9 .github/workflows/build-and-test.yml
+24 −16 samples/DrawWithImageSharp/BoundingBoxes.cs
+4 −4 samples/DrawWithImageSharp/CustomGlyphBuilder.cs
+2 −2 samples/DrawWithImageSharp/DrawWithImageSharp.csproj
+74 −56 samples/DrawWithImageSharp/Program.cs
+1 −2 src/SixLabors.Fonts/ArrayBuilder{T}.cs
+3 −3 src/SixLabors.Fonts/FileFontMetrics.cs
+11 −10 src/SixLabors.Fonts/Font.cs
+4 −4 src/SixLabors.Fonts/FontMetrics.cs
+15 −1 src/SixLabors.Fonts/GlyphBounds.cs
+32 −15 src/SixLabors.Fonts/GlyphLayout.cs
+1 −33 src/SixLabors.Fonts/GlyphMetrics.cs
+1 −0 src/SixLabors.Fonts/GlyphShapingData.cs
+30 −0 src/SixLabors.Fonts/GlyphSubstitutionCollection.cs
+1 −1 src/SixLabors.Fonts/StreamFontMetrics.Cff.cs
+1 −1 src/SixLabors.Fonts/StreamFontMetrics.TrueType.cs
+54 −44 src/SixLabors.Fonts/StreamFontMetrics.cs
+1 −1 src/SixLabors.Fonts/SystemFonts.cs
+1 −1 src/SixLabors.Fonts/Tables/AdvancedTypographic/Shapers/UniversalShaper.cs
+1 −1 src/SixLabors.Fonts/Tables/AdvancedTypographic/UnicodeScriptTagMap.cs
+1 −2 src/SixLabors.Fonts/Tables/Cff/CffGlyphMetrics.cs
+1 −1 src/SixLabors.Fonts/Tables/Cff/CffOperator.cs
+9 −9 src/SixLabors.Fonts/Tables/General/Kern/KerningTable.cs
+1 −1 src/SixLabors.Fonts/Tables/TrueType/TrueTypeGlyphMetrics.cs
+2 −1 src/SixLabors.Fonts/Tables/Woff/Woff2Utils.cs
+97 −52 src/SixLabors.Fonts/TextLayout.cs
+8 −15 src/SixLabors.Fonts/TextMeasurer.cs
+12 −12 src/SixLabors.Fonts/Unicode/UnicodeData.cs
+33 −0 src/SixLabors.Fonts/Unicode/UnicodeUtility.cs
+2 −2 tests/Directory.Build.targets
+35 −5 tests/SixLabors.Fonts.Benchmarks/SixLabors.Fonts.Benchmarks/MeasureTextBenchmark.cs
+ tests/SixLabors.Fonts.Tests/Fonts/KellySlab-Regular.ttf
+ tests/SixLabors.Fonts.Tests/Fonts/PermanentMarker-Regular.ttf
+ tests/SixLabors.Fonts.Tests/Fonts/PermanentMarker-Regular.woff2
+ tests/SixLabors.Fonts.Tests/Fonts/PlantinStdRegular.otf
+ tests/SixLabors.Fonts.Tests/Fonts/courier-prime.woff2
+5 −5 tests/SixLabors.Fonts.Tests/GlyphTests.cs
+2 −2 tests/SixLabors.Fonts.Tests/Issues/Issues_180.cs
+1 −1 tests/SixLabors.Fonts.Tests/Issues/Issues_269.cs
+3 −3 tests/SixLabors.Fonts.Tests/Issues/Issues_32.cs
+5 −5 tests/SixLabors.Fonts.Tests/Issues/Issues_337.cs
+29 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_367.cs
+30 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_375.cs
+19 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_378.cs
+94 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_383.cs
+44 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_388_390.cs
+25 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_400.cs
+26 −0 tests/SixLabors.Fonts.Tests/Issues/Issues_403.cs
+1 −0 tests/SixLabors.Fonts.Tests/SixLabors.Fonts.Tests.csproj
+10 −0 tests/SixLabors.Fonts.Tests/TestFonts.cs
+365 −195 tests/SixLabors.Fonts.Tests/TextLayoutTests.cs
2 changes: 1 addition & 1 deletion ext/ImageSharp
Submodule ImageSharp updated 158 files
2 changes: 1 addition & 1 deletion ext/ImageSharp.Drawing
Submodule ImageSharp.Drawing updated 40 files
+11 −11 .github/workflows/build-and-test.yml
+2 −2 src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
+51 −8 src/ImageSharp.Drawing/Processing/ImageBrush.cs
+15 −1 src/ImageSharp.Drawing/Processing/Processors/Drawing/ClipPathProcessor{TPixel}.cs
+1 −3 src/ImageSharp.Drawing/Processing/Processors/Drawing/FillPathProcessor.cs
+1 −1 src/ImageSharp.Drawing/Processing/Processors/Drawing/FillPathProcessor{TPixel}.cs
+1 −1 src/ImageSharp.Drawing/Processing/Processors/Drawing/FillProcessor{TPixel}.cs
+2 −1 src/ImageSharp.Drawing/Processing/Processors/Text/RichTextGlyphRenderer.cs
+1 −2 src/ImageSharp.Drawing/Processing/RichTextOptions.cs
+35 −4 src/ImageSharp.Drawing/Shapes/OutlinePathExtensions.cs
+1 −0 tests/ImageSharp.Drawing.Tests/Drawing/ClipTests.cs
+73 −1 tests/ImageSharp.Drawing.Tests/Drawing/FillImageBrushTests.cs
+4 −4 tests/ImageSharp.Drawing.Tests/Drawing/Text/DrawTextOnImageTests.cs
+54 −0 tests/ImageSharp.Drawing.Tests/Issues/Issue_323.cs
+68 −0 tests/ImageSharp.Drawing.Tests/Issues/Issue_330.cs
+18 −0 tests/ImageSharp.Drawing.Tests/Issues/Issue_332.cs
+20 −2 tests/ImageSharp.Drawing.Tests/TestFontUtilities.cs
+3 −0 tests/Images/ReferenceOutput/Drawing/ClipTests/Clip_offset_x-20_y-100.png
+3 −0 tests/Images/ReferenceOutput/Drawing/FillImageBrushTests/CanDrawOffsetImage_Rgba32.png
+3 −0 tests/Images/ReferenceOutput/Drawing/FillImageBrushTests/CanOffsetImage_Rgba32.png
+3 −0 tests/Images/ReferenceOutput/Drawing/FillImageBrushTests/CanOffsetViaBrushImage_Rgba32.png
+2 −2 ...s/CanRotateFilledFont_Issue175_Solid300x200_(255,255,255,255)_F(OpenSans-Regular.ttf)-S(32)-A(75)-Quic).png
+2 −2 ...s/CanRotateFilledFont_Issue175_Solid300x200_(255,255,255,255)_F(OpenSans-Regular.ttf)-S(40)-A(90)-Quic).png
+2 −2 ...ateOutlineFont_Issue175_Solid300x200_(255,255,255,255)_F(OpenSans-Regular.ttf)-S(32)-A(75)-STR(1)-Quic).png
+2 −2 ...ateOutlineFont_Issue175_Solid300x200_(255,255,255,255)_F(OpenSans-Regular.ttf)-S(40)-A(90)-STR(2)-Quic).png
+2 −2 ...nceOutput/Drawing/Text/DrawTextOnImageTests/FallbackFontRendering_Rgba32_Solid400x200_(255,255,255,255).png
+2 −2 ...redCorrectlyWithAPenPatterned_Solid1100x200_(255,255,255,255)_pen_OpenSans-Regular.ttf-50-Sphi-(150,50).png
+2 −2 ...deredCorrectlyWithAPenPatterned_Solid200x150_(255,255,255,255)_pen_SixLaborsSampleAB.woff-50-ABAB-(0,0).png
+2 −2 ...enderedCorrectlyWithAPenPatterned_Solid900x150_(255,255,255,255)_pen_OpenSans-Regular.ttf-50-Sphi-(0,0).png
+3 −0 ...tput/Issue_323/DrawPolygonMustDrawoutlineOnly_Pattern_Rgba32_Solid300x300_(255,255,255,255)_scale-0.003.png
+3 −0 ...Output/Issue_323/DrawPolygonMustDrawoutlineOnly_Pattern_Rgba32_Solid300x300_(255,255,255,255)_scale-0.3.png
+3 −0 ...Output/Issue_323/DrawPolygonMustDrawoutlineOnly_Pattern_Rgba32_Solid300x300_(255,255,255,255)_scale-0.7.png
+3 −0 ...ceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Pattern_Rgba32_Solid300x300_(255,255,255,255)_scale-1.png
+3 −0 ...ceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Pattern_Rgba32_Solid300x300_(255,255,255,255)_scale-3.png
+3 −0 ...erenceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Rgba32_Solid300x300_(255,255,255,255)_scale-0.003.png
+3 −0 ...eferenceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Rgba32_Solid300x300_(255,255,255,255)_scale-0.3.png
+3 −0 ...eferenceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Rgba32_Solid300x300_(255,255,255,255)_scale-0.7.png
+3 −0 .../ReferenceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Rgba32_Solid300x300_(255,255,255,255)_scale-1.png
+3 −0 .../ReferenceOutput/Issue_323/DrawPolygonMustDrawoutlineOnly_Rgba32_Solid300x300_(255,255,255,255)_scale-3.png
+3 −0 tests/Images/ReferenceOutput/Issue_330/OffsetTextOutlines_Rgba32_Solid2084x2084_(138,43,226,255).png

0 comments on commit e53d0a0

Please sign in to comment.