Skip to content

Add color font palette selection support - #554

Merged
JimBobSquarePants merged 2 commits into
mainfrom
js/font-palette
Aug 8, 2026
Merged

Add color font palette selection support#554
JimBobSquarePants merged 2 commits into
mainfrom
js/font-palette

Conversation

@JimBobSquarePants

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Introduce FontPalette and FontPaletteOverride, expose palette selection on text and glyph options, and thread it through glyph metrics, shaping, COLR rendering, and renderer cache keys so palette variants render correctly. The change also adds CPAL palette caching/override behavior tests, glyph rendering coverage, and a reference image for inverted emoji palettes.

Introduce `FontPalette` and `FontPaletteOverride`, expose palette selection on text and glyph options, and thread it through glyph metrics, shaping, COLR rendering, and renderer cache keys so palette variants render correctly. The change also adds CPAL palette caching/override behavior tests, glyph rendering coverage, and a reference image for inverted emoji palettes.
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.57895% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 81%. Comparing base (316db92) to head (04707c1).

Files with missing lines Patch % Lines
...s.Fonts/Tables/General/Colr/ColrGlyphSourceBase.cs 50% 6 Missing and 2 partials ⚠️
src/SixLabors.Fonts/FontPaletteOverride.cs 63% 3 Missing and 1 partial ⚠️
src/SixLabors.Fonts/FontPalette.cs 90% 2 Missing and 1 partial ⚠️
src/SixLabors.Fonts/MemoryFontMetrics.cs 0% 3 Missing ⚠️
...xLabors.Fonts/Rendering/GlyphRendererParameters.cs 40% 3 Missing ⚠️
...nts/Tables/AdvancedTypographic/GPos/AnchorTable.cs 0% 2 Missing and 1 partial ⚠️
...Tables/AdvancedTypographic/Shapers/HangulShaper.cs 50% 0 Missing and 3 partials ⚠️
src/SixLabors.Fonts/StreamFontMetrics.Cff.cs 0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #554   +/-   ##
=====================================
  Coverage     81%     81%           
=====================================
  Files        403     405    +2     
  Lines      35515   35612   +97     
  Branches    5516    5548   +32     
=====================================
+ Hits       28848   28933   +85     
- Misses      5479    5484    +5     
- Partials    1188    1195    +7     
Flag Coverage Δ
unittests 81% <81%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JimBobSquarePants
JimBobSquarePants merged commit 7e13fdf into main Aug 8, 2026
13 checks passed
@JimBobSquarePants
JimBobSquarePants deleted the js/font-palette branch August 8, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant