Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2bc6e7e
updated gitignore to ignore .vscode folder
hflexgrig Jan 26, 2026
ce02fc8
Created abstraction atom called UnderAnnotation for under annotations…
hflexgrig Jan 26, 2026
d2eabcb
Added basic latex parser for under annotation
hflexgrig Jan 26, 2026
64ee413
Merge branch 'master' into under_annotations
hflexgrig Jan 27, 2026
6ffa3e7
Merge branch 'verybadcat:master' into master
hflexgrig Jan 28, 2026
1a6629b
Created abstraction atom called UnderAnnotation for under annotations…
hflexgrig Jan 26, 2026
ddad85d
Added basic latex parser for under annotation
hflexgrig Jan 26, 2026
c98495b
Merge branch 'under_annotations' of https://github.com/hflexgrig/CSha…
hflexgrig Jan 28, 2026
92a5fb3
commented failing test
hflexgrig Jan 28, 2026
9227ea6
basic display of underbrace
hflexgrig Feb 1, 2026
9c55b71
add underbrace underlist to a latex parser
hflexgrig Feb 2, 2026
e981a2b
Finished implementation
hflexgrig Feb 2, 2026
6109461
Merge remote-tracking branch 'origin/master' into under_annotations
hflexgrig Feb 3, 2026
06c19f8
Implemented GetHorizontalGlyphAssembly
hflexgrig Feb 3, 2026
a0f06ef
ran dotnet format with fixups
hflexgrig Feb 3, 2026
374a442
fixed unittests
hflexgrig Feb 3, 2026
bf2e3cb
Add Typesetter tests for UnderAnnotation
Happypig375 Feb 3, 2026
fd8484b
merged from master and resolved conflicts
hflexgrig Feb 11, 2026
4bf254b
Merge branch 'master' into under_annotations
Happypig375 Feb 12, 2026
ee314a7
Format
Happypig375 Feb 12, 2026
24712ba
Fix head
Happypig375 Feb 12, 2026
d7a00f2
Use ref?
Happypig375 Feb 12, 2026
377f29e
sha?
Happypig375 Feb 12, 2026
3bce9c8
Check out pull request HEAD commit?
Happypig375 Feb 12, 2026
d2ca42e
fetch?
Happypig375 Feb 12, 2026
696dae0
Need origin?
Happypig375 Feb 12, 2026
8451047
Fetch all?
Happypig375 Feb 12, 2026
5fa3866
Use base_ref and head_ref given commit history
Happypig375 Feb 12, 2026
3109e54
Still need origin huh
Happypig375 Feb 12, 2026
2d20ff3
sha?
Happypig375 Feb 12, 2026
4f8f330
pull_request_target?
Happypig375 Feb 12, 2026
7012adf
Fix Labeller?
Happypig375 Feb 12, 2026
906323f
Fix warnings?
Happypig375 Feb 12, 2026
b9242ba
Underbrace rendering tests
Happypig375 Feb 12, 2026
bd680f9
Fix image baselines
Happypig375 Feb 13, 2026
759289a
Separate workflow change to #256
Happypig375 Feb 14, 2026
fb2e6e1
Merge branch 'master' into under_annotations
Happypig375 Feb 15, 2026
a326898
Fix under annotation measure
Happypig375 Jun 10, 2026
168e4f2
ci: enable MTP coverage and dynamic Xcode setup
Happypig375 Jul 22, 2026
b926e2d
Update all CI versions
Happypig375 Jul 22, 2026
361a9bd
Merge branch 'master' into under_annotations
Happypig375 Jul 22, 2026
556224b
ci: skip release drafter on pull requests
Happypig375 Jul 22, 2026
c2508c6
ci: match timestamped Coverlet reports
Happypig375 Jul 22, 2026
c569055
Fix coverlet
Happypig375 Jul 22, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/Benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Setup .NET
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
runs-on: windows-latest
steps:
- uses: actions/setup-dotnet@main
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.x'
workloads: maui-ios, maui-maccatalyst, maui-android, wasm-tools
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Check formatting (Fix with "dotnet format --exclude Typography" at repository root)
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/Label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ jobs:
permissions:
pull-requests: write # Allow adding a label to this pull request
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0 # Fetch all commit history and tags, instead of the default fetch of only one commit
ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR branch
- name: If there are changes in PublicAPI.Shipped.txt, fail the workflow
allow-unsafe-pr-checkout: true # We confirm that we want to checkout the PR branch even if it is from a forked repository, which is normally unsafe.
- name: If there are changes in PublicApi.Shipped.txt, fail the workflow
if: github.head_ref != 'action/ship-publicapi' # Same branch name specified in Release.yml
run: |
$changes = git diff --numstat --shortstat origin/${{ github.base_ref }}...HEAD -- '**/PublicAPI.Shipped.txt' # Note that ** must expand to at least one folder here, this doesn't check root
Expand Down
67 changes: 35 additions & 32 deletions .github/workflows/Nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ jobs:
permissions:
contents: write
packages: write
pull-requests: read
steps:
- name: Update draft on GitHub Releases
id: release_drafter
uses: release-drafter/release-drafter@v6.0.0 # Pinned to v6.0.0 to avoid v6.1.0 bug: https://github.com/release-drafter/release-drafter/issues/1425
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: release-drafter/release-drafter@v7
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: actions/setup-dotnet@main
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.x'
workloads: maui, wasm-tools
Expand All @@ -43,40 +45,41 @@ jobs:
$env:RELEASE_NOTES = $env:RELEASE_NOTES -replace ',','%2C' -replace ';','%3B'

dotnet build -c Not.Uno.Example -p:PackageReleaseNotes="$env:RELEASE_NOTES" -p:PackageVersion=${{ steps.release_drafter.outputs.tag_name || format('{0}-pr', github.event.number) }}-ci-${{ github.sha }}
- name: Test
run: dotnet test --no-build -c Release --solution CSharpMath.slnx
#### Awaiting coverlet.MTP at https://github.com/coverlet-coverage/coverlet/pull/1788
# # --collect:"XPlat Code Coverage" means collect test coverage with https://github.com/coverlet-coverage/coverlet
# # Coverlet settings come after --: https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md#advanced-options-supported-via-runsettings
# dotnet test --solution CSharpMath.slnx -c Release --collect:"XPlat Code Coverage" --results-directory .testcoverage -p:PackageReleaseNotes="$env:RELEASE_NOTES" -p:PackageVersion=${{ steps.release_drafter.outputs.tag_name || format('{0}-pr', github.event.number) }}-ci-${{ github.sha }} -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.IncludeTestAssembly=true
# shell: pwsh
#- name: Run ReportGenerator on Test Coverage results
# uses: danielpalme/ReportGenerator-GitHub-Action@5
# with:
# reports: '.testcoverage/**/*.*' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
# targetdir: '.testcoverage/report' # REQUIRED # The directory where the generated report should be saved.
# reporttypes: 'Html' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
# title: 'CSharpMath test coverage results' # Optional title.
# tag: ${{ steps.release_drafter.outputs.tag_name || format('{0}-pr', github.event.number) }}-ci-${{ github.sha }} # Optional tag or build version.
#- name: Upload CSharpMath test coverage results as CI artifacts
# uses: actions/upload-artifact@v4
# with:
# name: CSharpMath test coverage results
# path: .testcoverage/
#- name: Upload CSharpMath test coverage results to codecov.io
# uses: codecov/codecov-action@v4
# with:
# file: .testcoverage/**/*.xml # optional
# name: CSharpMath test coverage # optional
# fail_ci_if_error: false # optional (default = false)
# Coverlet.MTP emits one timestamped OpenCover report per test project below the results directory.
# Note: --coverlet-include-test-assembly is intentionally omitted because it cannot work in MTP mode
# (the test assembly DLL is the controller process and is locked). GitHubActionsTestLogger.dll will
# also be locked. When coverlet hits a locked file, it throws an AggregateException and the entire
# coverage collection is aborted — producing no coverage files at all.
- name: Test and collect coverage
run: dotnet test --no-build -c Release --solution CSharpMath.slnx --results-directory .testcoverage --coverlet --coverlet-output-format opencover --coverlet-exclude '[GitHubActionsTestLogger*]*'
shell: pwsh
- name: Run ReportGenerator on Test Coverage results
uses: danielpalme/ReportGenerator-GitHub-Action@5
with:
reports: '.testcoverage/**/*coverage.opencover.*.xml'
targetdir: '.testcoverage/report'
reporttypes: 'Html'
title: 'CSharpMath test coverage results'
tag: ${{ steps.release_drafter.outputs.tag_name || format('{0}-pr', github.event.number) }}-ci-${{ github.sha }}
- name: Upload CSharpMath test coverage results as CI artifacts
uses: actions/upload-artifact@v7
with:
name: CSharpMath test coverage results
path: .testcoverage/
- name: Upload CSharpMath test coverage results to codecov.io
uses: codecov/codecov-action@v7
with:
files: .testcoverage/**/*coverage.opencover.*.xml
name: CSharpMath test coverage
fail_ci_if_error: false
- name: Upload CSharpMath.Rendering.Tests results as CI artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always() # Run even when a previous step failed: https://stackoverflow.com/a/58859404/5429648
with:
name: CSharpMath.Rendering.Tests results
path: CSharpMath.Rendering.Tests/*/*.png
- name: Upload NuGet packages as CI artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: NuGet packages
Expand Down Expand Up @@ -116,4 +119,4 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
branch: gh-pages
directory: website/wwwroot
directory: website/wwwroot
4 changes: 2 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: actions/setup-dotnet@main
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.x'
workloads: maui, wasm-tools
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,29 @@ jobs:
os: [ubuntu-latest, macos-26] # windows-latest is tested in Nightly.yml. It also needs special handling with regards to CSharpMath.Uno.Example so it's omitted here.
runs-on: ${{ matrix.os }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(matrix.os, 'macos')
- uses: actions/checkout@v7
with:
# Check required Xcode version for latest "dotnet workload restore": https://github.com/dotnet/macios/releases
xcode-version: '26.2' # If this is to be changed, also check macos-version in matrix.os above
- uses: actions/setup-dotnet@main
submodules: recursive
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.x'
workloads: ${{ case(startsWith(matrix.os, 'ubuntu'), 'maui-android, wasm-tools', 'maui, wasm-tools') }}
- uses: actions/checkout@v6
- name: Select recommended Xcode version
id: ios-version
if: startsWith(matrix.os, 'macos')
shell: bash
# NOTE: .NET for iOS/tvOS/MacCatalyst checks the major.minor version of Xcode for version validation.
# Meanwhile, the available property for us (_RecommendedXcodeVersion) may include a build number like 26.6.1.
# We strip any patch component so setup-xcode uses semver range matching (bare "26.6" matches any 26.6.x).
# If we passed the full 3-component version like "26.6.1", Node.js's semver.satisfies would require
# an exact patch match, which could fail if the runner only has "26.6.0" (or vice versa).
# This property is more reliable than trying to derive the Xcode version from the workload version number, since the mapping is
# not always 1:1 (e.g. iOS 26.5 → Xcode 26.6), see https://github.com/dotnet/macios/issues/25818
run: echo "xcode-version=$(dotnet build CSharpMath.Maui.Example/CSharpMath.Maui.Example.csproj -getProperty:_RecommendedXcodeVersion -f net10.0-ios | cut -d. -f1-2)" >> "$GITHUB_OUTPUT"
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(matrix.os, 'macos')
with:
submodules: recursive
xcode-version: ${{ steps.ios-version.outputs.xcode-version }}
- name: Build Everything
run: dotnet build
- name: Run Tests
Expand Down
18 changes: 15 additions & 3 deletions CSharpMath.Core.Example/BackEnd/JsonMathTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class JsonMathTable : FontMathTable<TFont, TGlyph> {
/// typically loaded from a .json file.</summary>
private readonly JToken _mathTable;
private readonly JObject _constantsDictionary;
private readonly JObject _assemblyTable;
private readonly JObject _vAssemblyTable, _hAssemblyTable;
private readonly JObject _italicTable;
public TestFontMeasurer FontMeasurer { get; }
public TestGlyphNameProvider GlyphNameProvider { get; }
Expand All @@ -41,7 +41,8 @@ JObject GetTable(string name) =>
GlyphBoundsProvider = glyphBoundsProvider;
_mathTable = mathTable;
_constantsDictionary = GetTable("constants");
_assemblyTable = GetTable("v_assembly");
_vAssemblyTable = GetTable("v_assembly");
_hAssemblyTable = GetTable("h_assembly");
_italicTable = GetTable("italic");
}
// different from _ConstantFromTable in that the _ConstantFromTable requires
Expand Down Expand Up @@ -137,7 +138,18 @@ public override float RadicalExtraAscender(TFont font) =>
private const string _extenderKey = "extender";
private const string _glyphKey = "glyph";
public override IEnumerable<GlyphPart<TGlyph>>? GetVerticalGlyphAssembly(TGlyph rawGlyph, TFont font) =>
_assemblyTable[GlyphNameProvider.GetGlyphName(rawGlyph)]?[_assemblyPartsKey] is JArray parts
_vAssemblyTable[GlyphNameProvider.GetGlyphName(rawGlyph)]?[_assemblyPartsKey] is JArray parts
? parts.Select(partInfo =>
new GlyphPart<TGlyph>(
GlyphNameProvider.GetGlyph(partInfo[_glyphKey]!.Value<string>()!),
FontUnitsToPt(font, partInfo[_advanceKey]!.Value<int>()),
FontUnitsToPt(font, partInfo[_startConnectorKey]!.Value<int>()),
FontUnitsToPt(font, partInfo[_endConnectorKey]!.Value<int>()),
partInfo[_extenderKey]!.Value<bool>()))
// Should have been defined, but let's return null
: null;
public override IEnumerable<GlyphPart<TGlyph>>? GetHorizontalGlyphAssembly(TGlyph rawGlyph, TFont font) =>
_hAssemblyTable[GlyphNameProvider.GetGlyphName(rawGlyph)]?[_assemblyPartsKey] is JArray parts
? parts.Select(partInfo =>
new GlyphPart<TGlyph>(
GlyphNameProvider.GetGlyph(partInfo[_glyphKey]!.Value<string>()!),
Expand Down
7 changes: 4 additions & 3 deletions CSharpMath.Core.Example/CSharpMath.Core.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<StartupObject>CSharpMath.Core.Checker</StartupObject>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CSharpMath\CSharpMath.csproj" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<EmbeddedResource Include="Resources\latinmodern-math.json" />
<ProjectReference Include="..\CSharpMath\CSharpMath.csproj" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<EmbeddedResource Include="Resources\latinmodern-math.json" />
<None Include="Resources\MathTableExport.py" />
</ItemGroup>
</Project>
Loading
Loading