Use My Fonts

Use my custom fonts on the pages

23.09.2024 itibariyledir. En son verisyonu görün.

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

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 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.

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

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!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

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

// ==UserScript==
// @name                Use My Fonts
// @name:en-US          Use My Fonts
// @name:zh-CN          使用我的字体
// @description         Use my custom fonts on the pages
// @description:en-US   Use my custom fonts on the pages
// @description:zh-CN   在页面上使用我的自定义字体
// @namespace           use-my-fonts
// @version             2024.09.23
// @author              Akatsuki Rui
// @license             MIT License
// @grant               GM_addStyle
// @run-at              document-start
// @match               *://*/*
// ==/UserScript==

"use strict";

const css = String.raw;

// FONT_CSS is generated by use-my-fonts.scss
const FONT_CSS = css`
  @charset "UTF-8";
  @font-face {
    font-family: "Arial";
    src: local("Roboto");
  }

  @font-face {
    font-family: "Helvetica";
    src: local("Roboto");
  }

  @font-face {
    font-family: "Segoe UI";
    src: local("Roboto");
  }

  @font-face {
    font-family: "Microsoft YaHei";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "微软雅黑";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "NSimsun";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "新宋体";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "Simhei";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "宋体";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "Simsun";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "黑体";
    src: local("Noto Sans CJK SC");
  }

  @font-face {
    font-family: "Microsoft Jhenghei";
    src: local("Noto Sans CJK TC");
  }

  @font-face {
    font-family: "微軟正黑體";
    src: local("Noto Sans CJK TC");
  }

  @font-face {
    font-family: "ヒラギノ角ゴ Pro W3";
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: "Hiragino Kaku Gothic Pro";
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: Osaka;
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: メイリオ;
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: Meiryo;
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: "MS Pゴシック";
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: "MS PGothic";
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: "MS ゴシック";
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: "MS Gothic";
    src: local("Noto Sans CJK JP");
  }

  @font-face {
    font-family: "Malgun Gothic";
    src: local("Noto Sans CJK KR");
  }

  @font-face {
    font-family: "맑은 고딕";
    src: local("Noto Sans CJK KR");
  }

  @font-face {
    font-family: "Consolas";
    src: local("Cascadia Code");
  }
`;

GM_addStyle(FONT_CSS.trim());