Repository navigation
packages/fonts: consolidate the RedHat and PatternFly icon faces into @goauthentik/fonts - #24461
Conversation
There was a problem hiding this comment.
Pull request overview
This PR consolidates the font assets and @font-face declarations used by the web/ frontend into a new pnpm workspace package, @goauthentik/fonts, and adjusts the web build so assets imported from outside web/ don’t land in paths that get excluded from the Go outpost embed.
Changes:
- Introduces
packages/fontsto centralize Red Hat variable faces and the PatternFly 4 icon font faces (pficon,Font Awesome 5 Free) behindfaces.cssandicons.css. - Updates
web/global stylesheet entrypoints to import fonts from@goauthentik/fonts, and removes@font-faceblocks from vendored PatternFly icon CSS (leaving only the icon classes). - Pins ESBuild
outbaseto the monorepo root to prevent_.._path sanitization from breaking//go:embed dist/*for outpost builds.
Reviewed changes
Copilot reviewed 9 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/src/styles/interface.global.css | Switches global interface entrypoint to import font faces/icons from @goauthentik/fonts. |
| web/src/styles/flows.global.css | Switches global flows entrypoint to import font faces/icons from @goauthentik/fonts. |
| web/src/styles/global/vendor/patternfly-pf-icons.css | Removes pficon @font-face from vendored CSS, leaving only icon classes and a note. |
| web/src/styles/global/vendor/patternfly-fa-icons.css | Removes Font Awesome @font-face from vendored CSS, leaving only icon classes and a note. |
| web/src/styles/global/vendor/assets/pficon/pficon.scss | Deletes unreferenced vendored Sass source for pficon. |
| web/scripts/build-web.mjs | Sets ESBuild outbase to the monorepo root to avoid _.._ path segments that break Go embedding. |
| web/package.json | Removes the #fonts import mapping and adds a dependency on @goauthentik/fonts. |
| web/pnpm-lock.yaml | Records the new @goauthentik/fonts workspace link for web/. |
| pnpm-workspace.yaml | Adds packages/fonts to the workspace. |
| pnpm-lock.yaml | Adds the packages/fonts importer entry. |
| packages/fonts/package.json | Adds the @goauthentik/fonts package manifest and publish configuration. |
| packages/fonts/faces.css | Provides @font-face rules for Red Hat variable faces. |
| packages/fonts/icons.css | Provides @font-face rules for pficon and Font Awesome, previously in vendored PatternFly CSS. |
| packages/fonts/OFL.txt | Adds an OFL license text file (currently Red Hat-specific). |
| packages/fonts/.prettierignore | Adds a Prettier ignore file for the new package. |
| packages/fonts/RedHatMonoVF.woff2 | Adds the Red Hat Mono variable font asset. |
| packages/fonts/RedHatMonoVF-Italic.woff2 | Adds the Red Hat Mono italic variable font asset. |
| packages/fonts/pficon.woff2 | Adds the PatternFly pficon font asset (woff2). |
| packages/fonts/pficon.woff | Adds the PatternFly pficon font asset (woff). |
| packages/fonts/fa-solid-900.woff2 | Adds the Font Awesome solid font asset (woff2). |
| packages/fonts/fa-solid-900.woff | Adds the Font Awesome solid font asset (woff). |
| packages/fonts/RedHatDisplayVF.woff2 | Adds the Red Hat Display variable font asset. |
| packages/fonts/RedHatDisplayVF-Italic.woff2 | Adds the Red Hat Display italic variable font asset. |
| packages/fonts/RedHatTextVF.woff2 | Adds the Red Hat Text variable font asset. |
| packages/fonts/RedHatTextVF-Italic.woff2 | Adds the Red Hat Text italic variable font asset. |
| CODEOWNERS | Adds code ownership for /packages/fonts. |
Files not reviewed (2)
- pnpm-lock.yaml: Generated file
- web/pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24461 +/- ##
=======================================
Coverage 91.22% 91.22%
=======================================
Files 1128 1128
Lines 70739 70739
Branches 3874 3874
=======================================
+ Hits 64533 64534 +1
+ Misses 6171 6170 -1
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
01ec5f5 to
b8a3cc5
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-061c102f17d80d8145a4c3c16bd9bf73a3b71e84
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-061c102f17d80d8145a4c3c16bd9bf73a3b71e84Afterwards, run the upgrade commands from the latest release notes. |
…onts The RedHat typefaces were checked in twice: web/fonts/RedHat held the six variable faces the app actually loads, and packages/theme carried its own copy of those plus twenty-four static weights. The variable files were byte-identical in both places, but the two @font-face sets disagreed on naming — web bound "RedHatText" to the variable face while the theme bound it to the static Regular and used "RedHatTextVF" for the variable one. Move web's set, which is the canonical one, into a new assets-only package and drop the theme's copy entirely. The theme now only names the families; @goauthentik/fonts binds them to files. Nothing about what the browser loads changes: same bytes, same family names, same vendor layer. The package has no build step, and only faces.css needs an exports entry — the url() references beside it resolve relative to that file in both ESBuild and Vite. ESBuild's `outbase` is now pinned to the monorepo root. Assets pulled from a workspace package outside web/ otherwise land under a `..` segment, which ESBuild sanitizes to `_.._`; Go's `//go:embed dist/*` in static_outpost.go skips any segment starting with `_`, so the faces would have gone missing from the embedded outpost build.
The pficon and Font Awesome faces were declared inside the vendored PatternFly icon stylesheets, with the font files sitting beside them under web/src/styles/global/vendor/assets/. That put font bytes in three places across the repo and tied the faces to stylesheets we re-vendor whenever PatternFly moves. Move both families next to the RedHat faces and declare them in a new icons.css, kept separate from faces.css so a consumer can take the brand text faces without the icon fonts. The icon classes stay with PatternFly — only the @font-face rules and the files move. Same bytes: the emitted assets keep their content hashes. pficon.scss went too. It was an unreferenced Sass source whose `$pf-global--fonticon-path` variable had nothing to resolve against. The copies in shadow/patternfly-base.css are left alone. They come from the PatternFly package and their font URLs are already stubbed out by the bundled-text loader, because @font-face has no effect inside a shadow root — components inherit the faces registered on the document.
The package declared MIT and shipped only Red Hat's OFL text, which
described neither what it redistributes nor what redistribution requires.
Three upstreams are bundled, under three different terms:
RedHat text faces OFL-1.1, (c) The Red Hat Project Authors
pficon MIT, (c) Red Hat, Inc., via PatternFly
Font Awesome 5 Free OFL-1.1 for the font files, CC-BY-4.0 for the
icons they encode, (c) Fonticons, Inc.
Declare that as an SPDX expression, add the package's own MIT text, and
ship each upstream's license alongside a NOTICE.md recording provenance
per file. OFL 1.1 requires the copyright notice and license to travel
with any redistributed copy, and CC BY 4.0 requires attribution where the
icons are displayed; `files` now carries all of it into the tarball.
Two things NOTICE.md is explicit about rather than papering over:
@patternfly/patternfly ships no license file, so the MIT text here is Red
Hat's own copied from the sibling @patternfly/icons package; and Font
Awesome's published license carries a copyright line tracking its current
release rather than the 5.x release these files came from.
b8a3cc5 to
061c102
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 32 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- pnpm-lock.yaml: Generated file
- web/pnpm-lock.yaml: Generated file
Suppressed comments (2)
packages/fonts/NOTICE.md:36
NOTICE.mdsays the CC BY 4.0 license is included in full vialicenses/FontAwesome-Free.txt, but that file only references CC BY 4.0 by URL and does not include the CC BY 4.0 license text. Since the package’s SPDX expression includesCC-BY-4.0, consider vendoring the CC BY 4.0 license text (either as a dedicatedlicenses/CC-BY-4.0.txtor appended toFontAwesome-Free.txt) and updateNOTICE.mdto point at the correct file(s).
- Copyright Fonticons, Inc., <https://fontawesome.com>
- Font files: SIL Open Font License 1.1. Reserved Font Name: "Font Awesome"
- The icons the fonts encode: CC BY 4.0, <https://creativecommons.org/licenses/by/4.0/>
- Full text in `licenses/FontAwesome-Free.txt`
web/docs/arch/2026-06-18-How-CSS-Is-Made-And-Next-Steps.md:38
- This architecture doc still says the PatternFly icon stylesheets provide the icon
@font-facerules, but those were moved to@goauthentik/fonts/icons.css(the PatternFly files now only contain the icon classes). Updating this list avoids future confusion when tracing where icon fonts are registered.
4. @patternfly/.../patternfly-fa-icons.css, patternfly-pf-icons.css — icon @font-face + classes
5. @patternfly/.../components/Spinner/spinner.css
6. @goauthentik/fonts/faces.css — RedHat @font-face
Consolidates every font authentik ships into one package. Split out of #23341 so the theme package and the fonts land separately.
The RedHat text faces
They were checked in twice:
web/fonts/RedHatheld the six variable faces the app actually loads, and the theme package carried its own copy of those plus twenty-four static weights. The variable files were byte-identical in both places, but the two@font-facesets disagreed on naming — web boundRedHatTextto the variable face, the theme bound it to the static Regular and usedRedHatTextVFfor the variable one.Web's set is canonical, so it moves into the new package and the theme's copy is dropped. The theme now only names the families;
@goauthentik/fontsbinds them to files.The icon faces
pficonandFont Awesome 5 Freewere declared inside the vendored PatternFly icon stylesheets, with the font files beside them underweb/src/styles/global/vendor/assets/. That put font bytes in a third place and tied the faces to stylesheets we re-vendor whenever PatternFly moves.Both families move next to the RedHat faces, declared in
icons.css— kept separate fromfaces.cssso a consumer can take the brand text faces without the icon fonts. The icon classes stay with PatternFly; only the@font-facerules and the files move.pficon.scsswent with them. It was an unreferenced Sass source whose$pf-global--fonticon-pathvariable had nothing to resolve against.No rendering change
Same bytes throughout — the emitted assets keep their content hashes across the move. Same family names, same
vendorlayer, one@font-faceper family in each bundle (verified in the built CSS: six RedHat, onepficon, one Font Awesome, no duplicates).The copies in
shadow/patternfly-base.cssare left alone. They come from the PatternFly package and their font URLs are already stubbed out by the bundled-text loader, because@font-facehas no effect inside a shadow root — components inherit the faces registered on the document.ESBuild
outbaseoutbaseis now pinned to the monorepo root. Assets resolved from outsideweb/otherwise land under a..segment, which ESBuild sanitizes to_.._, and Go's//go:embed dist/*instatic_outpost.goskips any path segment starting with_.This is not new with the fonts. On
maintoday, twelve MDX-pulled files underwebsite/docs/already build todist/assets/_.._/website/docs/...and are therefore missing from embedded outpost builds. Moving the fonts out ofweb/would have added them to that set; pinningoutbasefixes both.It does shift other emitted assets under an
assets/web/prefix. The hardcoded/static/dist/assets/{icons,images}/...paths in Python and TS are copied verbatim rather than emitted by ESBuild, so they are unaffected.Note for follow-up: a handful of those MDX partials have basenames starting with
_(_nginx_ingress.mdand friends).outbasecannot help there — Go's embed excludes them by filename — so they remain absent from the outpost embed.Licensing
Addressing review feedback: the package declared MIT and shipped only Red Hat's OFL text, which described neither what it redistributes nor what redistribution requires.
licenseis now the SPDX expressionMIT AND OFL-1.1 AND CC-BY-4.0, and the tarball carries the package's own MIT text, aNOTICE.mdrecording provenance per file, and each upstream's license underlicenses/. OFL 1.1 requires the copyright notice and license to travel with any redistributed copy; CC BY 4.0 requires attribution where the icons are displayed.Two things
NOTICE.mdstates plainly rather than papering over:@patternfly/patternflyships no license file, so the MIT text included is Red Hat's own copied from the sibling@patternfly/iconspackage; and Font Awesome's published license carries a copyright line tracking its current release rather than the 5.x release these files came from.