Skip to content
Open
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 .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
###############################################################################
# Handle image files by git lfs
###############################################################################
*.pdf filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.bmp filter=lfs diff=lfs merge=lfs -text
Expand Down Expand Up @@ -137,6 +138,12 @@
*.heic filter=lfs diff=lfs merge=lfs -text
*.hif filter=lfs diff=lfs merge=lfs -text
*.avif filter=lfs diff=lfs merge=lfs -text
*.hvc1 filter=lfs diff=lfs merge=lfs -text
*.hvcc filter=lfs diff=lfs merge=lfs -text
*.ivf filter=lfs diff=lfs merge=lfs -text
*.y4m filter=lfs diff=lfs merge=lfs -text
*.yuv filter=lfs diff=lfs merge=lfs -text
*.bit filter=lfs diff=lfs merge=lfs -text
###############################################################################
# Handle ICC files by git lfs
###############################################################################
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Git Pull LFS
shell: bash
run: git lfs pull

Build:
needs: WarmLFS
strategy:
Expand All @@ -64,42 +64,42 @@ jobs:
- ${{ contains(github.event.pull_request.labels.*.name, 'arch:arm32') || contains(github.event.pull_request.labels.*.name, 'arch:arm64') }}
options:
- os: ubuntu-latest
framework: net10.0
sdk: 10.0.x
framework: net11.0
sdk: 11.0.x
sdk-preview: true
runtime: -x64
codecov: false
- os: macos-latest
framework: net10.0
sdk: 10.0.x
framework: net11.0
sdk: 11.0.x
sdk-preview: true
runtime: -x64
codecov: false
- os: windows-latest
framework: net10.0
sdk: 10.0.x
framework: net11.0
sdk: 11.0.x
sdk-preview: true
runtime: -x64
codecov: false
- os: buildjet-4vcpu-ubuntu-2204-arm
framework: net10.0
sdk: 10.0.x
framework: net11.0
sdk: 11.0.x
sdk-preview: true
runtime: -x64
codecov: false
- os: ubuntu-latest
framework: net8.0
sdk: 8.0.x
framework: net10.0
sdk: 10.0.x
runtime: -x64
codecov: false
- os: macos-latest
framework: net8.0
sdk: 8.0.x
framework: net10.0
sdk: 10.0.x
runtime: -x64
codecov: false
- os: windows-latest
framework: net8.0
sdk: 8.0.x
framework: net10.0
sdk: 10.0.x
runtime: -x64
codecov: true
exclude:
Expand Down Expand Up @@ -154,14 +154,14 @@ jobs:
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x

- name: DotNet Setup Preview
if: ${{ matrix.options.sdk-preview == true }}
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.x
11.0.x

- name: DotNet Build
if: ${{ matrix.options.sdk-preview != true }}
Expand Down
110 changes: 0 additions & 110 deletions SixLabors.Fonts.sln

This file was deleted.

46 changes: 46 additions & 0 deletions SixLabors.Fonts.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Solution>
<Folder Name="/src/">
<File Path="src/Directory.Build.props" />
<File Path="src/Directory.Build.targets" />
<File Path="src/Fonts.ruleset" />
<Project Path="src/SixLabors.Fonts/SixLabors.Fonts.csproj" />
</Folder>
<Folder Name="/tests/">
<File Path="tests/Directory.Build.props" />
<File Path="tests/Directory.Build.targets" />
<Project Path="tests/SixLabors.Fonts.Benchmarks/SixLabors.Fonts.Benchmarks/SixLabors.Fonts.Benchmarks.csproj" />
<Project Path="tests/SixLabors.Fonts.Tests/SixLabors.Fonts.Tests.csproj" />
</Folder>
<Folder Name="/tests/UnicodeTestData/">
<File Path="tests/UnicodeTestData/BidiCharacterTest.txt" />
<File Path="tests/UnicodeTestData/BidiTest.txt" />
<File Path="tests/UnicodeTestData/GraphemeBreakTest.txt" />
<File Path="tests/UnicodeTestData/LineBreakTest.txt" />
<File Path="tests/UnicodeTestData/README.md" />
</Folder>
<Folder Name="/tools/">
<Project Path="src/UnicodeTrieGenerator/UnicodeTrieGenerator.csproj" />
</Folder>
<Folder Name="/_root/">
<File Path="ci-build.ps1" />
<File Path="ci-pack.ps1" />
<File Path="ci-test.ps1" />
<File Path="Directory.Build.props" />
<File Path="Directory.Build.targets" />
<File Path="NuGet.config" />
<File Path="README.md" />
<File Path="standards/.editorconfig" />
</Folder>
<Folder Name="/_root/.github/">
<File Path=".github/CONTRIBUTING.md" />
<File Path=".github/FUNDING.yml" />
<File Path=".github/PULL_REQUEST_TEMPLATE.md" />
</Folder>
<Folder Name="/_root/.github/ISSUE_TEMPLATE/">
<File Path=".github/ISSUE_TEMPLATE/config.yml" />
<File Path=".github/ISSUE_TEMPLATE/oss-bug-report.yml" />
</Folder>
<Folder Name="/_root/.github/workflows/">
<File Path=".github/workflows/build-and-test.yml" />
</Folder>
</Solution>
18 changes: 18 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Pins the .NET SDK to major version 10 or later for all SixLabors repositories.
// The build copies this file to consuming repositories together with .editorconfig and
// the other shared config files (see msbuild/targets/SixLabors.Src.targets).
{
"sdk": {
// The floor, not an exact build: resolution never selects an SDK below major 10.
"version": "10.0.0",

// Select the newest installed SDK at or above the floor. This spans feature bands,
// minor versions, and major versions, so a machine with only stable 10.0.x SDKs
// resolves the newest of those, and a machine with a newer SDK resolves that instead.
"rollForward": "latestMajor",

// Let the CLI and Visual Studio select preview SDKs when one is installed.
// Machines and CI lanes without a preview SDK are unaffected.
"allowPrerelease": true
}
}
4 changes: 2 additions & 2 deletions src/SixLabors.Fonts/SixLabors.Fonts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
<Choose>
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
</Otherwise>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ private static void InterpolateMissingDeltas(
IReadOnlyList<ushort> endPoints,
Span<float> adjustX,
Span<float> adjustY,
Span<byte> hasDelta)
ReadOnlySpan<byte> hasDelta)
{
if (points.Count == 0 || endPoints.Count == 0)
{
Expand Down
14 changes: 12 additions & 2 deletions src/SixLabors.Fonts/Tables/Cff/CffBoundsFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,21 @@ private void UpdateMinMax(float x0, float y0)
/// <summary>
/// Gets the computed bounding box from all tracked path coordinates.
/// </summary>
/// <returns>The <see cref="Bounds"/> representing the glyph bounding box.</returns>
/// <returns>
/// The <see cref="Bounds"/> representing the glyph bounding box, or <see cref="Bounds.Empty"/>
/// when the charstring never emitted a path operation (e.g. a space or other invisible glyph).
/// </returns>
public Bounds GetBounds()
=> new(
{
if (this.firstEval)
{
return Bounds.Empty;
}

return new Bounds(
(short)Math.Floor(this.minX),
(short)Math.Floor(this.minY),
(short)Math.Ceiling(this.maxX),
(short)Math.Ceiling(this.maxY));
}
}
2 changes: 1 addition & 1 deletion src/UnicodeTrieGenerator/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ private static readonly Dictionary<string, VerticalOrientationType> VerticalOrie
{ "Tr", VerticalOrientationType.TransformRotate }
};

private const string SixLaborsSolutionFileName = "SixLabors.Fonts.sln";
private const string SixLaborsSolutionFileName = "SixLabors.Fonts.slnx";
private const string InputRulesRelativePath = @"src\UnicodeTrieGenerator\Rules";
private const string OutputResourcesRelativePath = @"src\SixLabors.Fonts\Unicode\Resources";

Expand Down
4 changes: 2 additions & 2 deletions src/UnicodeTrieGenerator/UnicodeTrieGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<Choose>
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private void PrepareSkiaBuffer()
private static string GetRepositoryPath(string relativePath)
{
DirectoryInfo? directory = new(AppContext.BaseDirectory);
while (directory != null && !File.Exists(Path.Combine(directory.FullName, "SixLabors.Fonts.sln")))
while (directory != null && !File.Exists(Path.Combine(directory.FullName, "SixLabors.Fonts.slnx")))
{
directory = directory.Parent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public void Dispose()
private static string GetRepositoryPath(string relativePath)
{
DirectoryInfo? directory = new(AppContext.BaseDirectory);
while (directory != null && !File.Exists(Path.Combine(directory.FullName, "SixLabors.Fonts.sln")))
while (directory != null && !File.Exists(Path.Combine(directory.FullName, "SixLabors.Fonts.slnx")))
{
directory = directory.Parent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
<!--Mark members as static-->
<NoWarn>CA1822</NoWarn>
</PropertyGroup>

<Choose>
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="SkiaSharp" />
Expand Down
Loading
Loading