// ==UserScript== // @name Muse — Google Sans Flex + M PLUS Rounded 1c // @namespace kamatama // @version 1.0 // @description muse.ai 全体のフォントを Google Sans Flex(欧文)+ M PLUS Rounded 1c Medium(日本語)に変更する // @match https://muse.ai/* // @run-at document-start // @grant none // ==/UserScript== (function () { 'use strict'; // Google Fonts から2フォントを読み込む // - Google Sans Flex: バリアブルフォント全ウェイト(欧文担当) // - M PLUS Rounded 1c: Medium(500) のみ読み込む。 // このファミリーで使えるウェイトが 500 だけになるため、 // 日本語グリフは通常文でも太字指定でも常に Medium で描画される(仕様どおりの挙動) const link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&family=M+PLUS+Rounded+1c:wght@500&display=swap'; (document.head || document.documentElement).appendChild(link); // フォントスタックを全体に適用する // 欧文は Google Sans Flex、日本語は M PLUS Rounded 1c にフォールバックする // コードブロック(pre / code / kbd / samp)は等幅フォントを維持するため除外 const style = document.createElement('style'); style.textContent = ` *:not(pre):not(code):not(kbd):not(samp) { font-family: 'Google Sans Flex', 'M PLUS Rounded 1c', sans-serif !important; } `; (document.head || document.documentElement).appendChild(style); })();