wernight / powerline-web-fonts

Powerline Web Fonts for Chromebook
MIT License
209 stars 53 forks source link

VSCode.dev support #21

Open wernight opened 2 years ago

wernight commented 2 years ago

I didn't yet find a way to get it working, but what I got is close. However "Custom CSS and JS Loader" isn't available on vscode.dev (only VSCode desktop) and also not available on all forks. Maybe the only option right now is using a Chrome extension to inject a @import url("...");

Usage example for VSCode.dev

  1. Add extension Custom CSS and JS Loader.
  2. Add to settings.json the latest URI:

     "vscode_custom_css.imports": ["https://cdn.jsdelivr.net/gh/wernight/powerline-web-fonts..."]
  3. Change Setting > Terminal › "Integrated: Font Family" to something like: Iosevka, Inconsolata-g, Consolas, 'Courier New', monospace
wernight commented 2 years ago

Using Tampermonkey:

// ==UserScript==
// @name         Add Powerline web font.
// @namespace    https://github.com/wernight/powerline-web-fonts
// @version      0.1
// @description  Allows using Powerline web font on this page.
// @author       Wernight
// @match        https:///vscode.dev/*
// @match        https://*.gitpod.io/*
// @grant        GM_getResourceText
// @resource     css  https://cdn.jsdelivr.net/gh/wernight/powerline-web-fonts@ba4426cb0c0b05eb6cb342c7719776a41e1f2114/PowerlineFonts.css
// ==/UserScript==

(function() {
    'use strict';

    let link = document.createElement('link');
    link.rel = 'stylesheet';
    link.type = 'text/css';
    link.textContent = GM_getResourceText('css');

    document.querySelector('head').appendChild(link);
})();

Not yet fully tested.