diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c92504b..140dabc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,8 @@ env: DOCS_BRANCH: ${{ secrets.DOCS_BRANCH }} # Snapshot baselines are per-platform and committed; a missing one is a gap, never a pass. ANGLESHARP_SNAPSHOT_STRICT: 1 - ANGLESHARP_VERSION: 1.8.1 - ANGLESHARP_CSS_VERSION: 1.2.0 + ANGLESHARP_VERSION: 1.8.5 + ANGLESHARP_CSS_VERSION: 1.2.1 jobs: can_document: diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index 6425e69..5778bec 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -15,8 +15,8 @@ permissions: contents: write env: - ANGLESHARP_VERSION: 1.8.1 - ANGLESHARP_CSS_VERSION: 1.2.0 + ANGLESHARP_VERSION: 1.8.5 + ANGLESHARP_CSS_VERSION: 1.2.1 jobs: # Keep this matrix identical to the `test` matrix in ci.yml, images included - a baseline diff --git a/AGENTS.md b/AGENTS.md index d5174f1..a2f33c8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,15 +37,17 @@ The renderer and test projects target `net8.0` and `net10.0`; both runtimes are 3. Installed families - host-dependent, never assert them in snapshots. 4. Bundled sans-serif as the last resort. +A character the resolved typeface has no glyph for falls back per character (`SplitFallbackRuns`, shared by measuring and painting): the next `font-family` entry that has it, then the bundled fonts, then `SKFontManager.MatchCharacter` (host-dependent, so never in snapshots). Text the typeface fully covers stays one run. + Never resolve named families with `SKTypeface.FromFamilyName`: it substitutes the host default for unknown names instead of returning null, swallowing the rest of the fallback list. Availability goes through a case-insensitive index of installed families (Skia's lookup is case-sensitive on Linux only). ## Upstream Policy (important) -**Never work around AngleSharp / AngleSharp.Css bugs locally.** Reproduce them with a failing test in the upstream project's own suite, fix them there, verify locally via a temporary `ProjectReference` to the sibling checkout, then revert to `PackageReference` once released. Wrong output in the meantime is acceptable. Current minimums: `AngleSharp` 1.8.1+, `AngleSharp.Css` 1.2.0+, set via `AngleSharpVersion`/`AngleSharpCssVersion` in the `.csproj` and the `ANGLESHARP_VERSION`/`ANGLESHARP_CSS_VERSION` env of `ci.yml` and `update-snapshots.yml` (which override the `.csproj`, so change all three together). Prefer delegating CSS grammar to AngleSharp.Css's public parsers (`TransformParser`, `FilterParser`, `GradientParser`, `GridParser`, `TimingFunctionParser`) and keeping only the conversion to backend-agnostic `Render*` types here. Hand-roll only what upstream genuinely lacks (e.g. `clip-path` basic shapes). +**Never work around AngleSharp / AngleSharp.Css bugs locally.** Reproduce them with a failing test in the upstream project's own suite, fix them there, verify locally via a temporary `ProjectReference` to the sibling checkout, then revert to `PackageReference` once released. Wrong output in the meantime is acceptable. Current minimums: `AngleSharp` 1.8.5+, `AngleSharp.Css` 1.2.1+, set via `AngleSharpVersion`/`AngleSharpCssVersion` in the `.csproj` and the `ANGLESHARP_VERSION`/`ANGLESHARP_CSS_VERSION` env of `ci.yml` and `update-snapshots.yml` (which override the `.csproj`, so change all three together). Prefer delegating CSS grammar to AngleSharp.Css's public parsers (`TransformParser`, `FilterParser`, `GradientParser`, `GridParser`, `TimingFunctionParser`) and keeping only the conversion to backend-agnostic `Render*` types here. Hand-roll only what upstream genuinely lacks (e.g. `clip-path` basic shapes). **Styling comes only from the computed style** (the render tree, cascaded with the UA stylesheet), never from tag names: no "`` is bold", "`h1` is 700", "`` is inline", "`