Exo Font Engine

Force Product Sans fonts on specific sites

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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

})();