Exo Font Engine

Force Product Sans fonts on specific sites

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);

})();