Active
Project:
Drupal core
Version:
main
Component:
Admin theme
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Mar 2026 at 22:11 UTC
Updated:
6 May 2026 at 21:39 UTC
Jump to comment: Most recent
Found when performance testing Drupal CMS with Mercury/Gin but the same applies to the admin theme in core.
Mercury uses inter-var.woff2, but Gin uses inter.woff2 - this results in two fonts being downloaded for what is the same font. This happens on the Drupal CMS front page too - not entirely sure why Gin fonts are loaded on the front page, maybe to do with Canvas?
If we used a variable font everywhere, it should avoid the duplication, or at least make it easier to de-duplicate if it still happens.
Comments
Comment #2
godotislateCore Navigation uses inter-var as well, so it'd make sense to share between default_admin and navigation somehow and make it available to Mercury.
Per @catch in slack:
Comment #3
mherchelYeah, this definitely needs to be tackled.
We need some discussion on how, though.
Requirements
My first thought is to move the font file + accompanying CSS into core.libraries.yml. Then both the module and theme (and any other contrib) can reference them. Thoughts?
Comment #4
catchI'd thought about moving the font itself, but not the CSS yet, on the basis that if the font file is cached different font declarations would probably not result in a double load. But adding a core library for the CSS itself makes a lot of sense. If we subset the font it will increase the complexity of the CSS too so much easier to maintain in one place, will also mean preloading is centralised too etc.
Comment #5
pameeela commented