Overleaf Editor Font Customizer

Customize your Overleaf editor's font family.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Overleaf Editor Font Customizer
// @name:zh-CN   Overleaf 编辑器字体修改
// @namespace    https://greasyfork.org/en/scripts/455589
// @version      1.0
// @description  Customize your Overleaf editor's font family.
// @description:zh-CN  该脚本允许你自定义 Overleaf 编辑器的字体。
// @author       billchen2k
// @license      MIT
// @match        https://www.overleaf.com/project/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=overleaf.com
// @grant        GM_addStyle
// ==/UserScript==

// Change this to your desired font family.
var fontFamily = "PragmataPro Liga, Consolas, CMU Typewriter Text, Songti SC";

(function() {
    'use strict';
    window.addEventListener('load', function() {
        GM_addStyle(`.cm-content {font-family: ${fontFamily} !important;}`);
    }, false);
})();