Force Product Sans fonts on specific sites
// ==UserScript==
// @name Exo Font Engine
// @namespace exo.font.engine
// @version 1.0
// @description Force Product Sans fonts on specific sites
// @match *://open.spotify.com/*
// @match *://discord.com/*
// @match *://twitter.com/*
// @match *://x.com/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
const fontCSS = `
/* === PRODUCT SANS FONT SET === */
@font-face {
font-family: 'Product Sans';
src: url('https://fonts.gstatic.com/s/productsans/v5/pxiByp8kv8JHgFVrLBT5Z1xlEA.ttf') format('truetype');
font-weight: 400;
}
@font-face {
font-family: 'Product Sans Medium';
src: url('https://fonts.gstatic.com/s/productsans/v5/pxiEyp8kv8JHgFVrJJfecg.ttf') format('truetype');
font-weight: 500;
}
@font-face {
font-family: 'Product Sans Bold';
src: url('https://fonts.gstatic.com/s/productsans/v5/pxiByp8kv8JHgFVrLCz7Z1xlEA.ttf') format('truetype');
font-weight: 700;
}
/* === GLOBAL FONT OVERRIDE === */
* {
font-family: 'Product Sans', 'Product Sans Medium', 'Product Sans Bold', sans-serif !important;
-webkit-font-smoothing: antialiased !important;
text-rendering: optimizeLegibility !important;
}
/* === WEIGHT CONTROL === */
b, strong {
font-family: 'Product Sans Bold' !important;
font-weight: 700 !important;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Product Sans Bold' !important;
}
button, nav, .medium {
font-family: 'Product Sans Medium' !important;
font-weight: 500 !important;
}
`;
const style = document.createElement("style");
style.textContent = fontCSS;
document.head.appendChild(style);
})();