MediaWiki:Gadget-ohc-fonts.js: Difference between revisions
MediaWiki interface page
More languages
More actions
Content deleted Content added
Load ohc.network / Care·ui typefaces (via create-page on MediaWiki MCP Server) |
Bot: careui — no-op; fonts are now @font-face in Common.css, self-hosted variable Figtree/Geist Mono - Claude |
||
| Line 1: | Line 1: | ||
/** |
/** |
||
* ohc-fonts |
* ohc-fonts -- SUPERSEDED, intentionally a no-op. |
||
| ⚫ | |||
* Switzer (Fontshare, same link ohc.network uses) + Figtree & Geist Mono |
|||
* Figtree Variable and Geist Mono Variable are now declared as @font-face in |
|||
* (Google Fonts). Guarded so the <link> tags are injected only once; the |
|||
* |
* MediaWiki:Common.css, self-hosted from version-pinned @fontsource-variable |
||
* packages -- the same files careui itself uses. |
|||
* |
|||
* This gadget used to inject two third-party stylesheets (Fontshare for |
|||
* Switzer, Google Fonts for static-weight Figtree/Geist Mono) via |
|||
* mw.loader.load(). That guaranteed a flash of fallback text, and measurement |
|||
* showed the webfonts frequently never applied at all. Switzer has been |
|||
* dropped: careui is Figtree throughout. |
|||
* |
|||
* Left in place rather than deleted so MediaWiki:Gadgets-definition keeps |
|||
* resolving if the Gadgets extension is installed later. |
|||
* |
|||
* Reference: [[OHC Network Wiki:Design/careui]] |
|||
*/ |
*/ |
||
( function () { |
|||
'use strict'; |
|||
if ( window.ohcFontsLoaded ) { |
|||
return; |
|||
| ⚫ | |||
window.ohcFontsLoaded = true; |
|||
mw.loader.load( |
|||
'https://api.fontshare.com/v2/css?f%5B%5D=switzer@400,500,600,700&display=swap', |
|||
'text/css' |
|||
); |
|||
mw.loader.load( |
|||
'https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap', |
|||
'text/css' |
|||
); |
|||
}() ); |
|||