Discord
Login
Community
DARK THEME

Setting the console font

I'd like to set the console font to a monospace one to speed up my current research.

This is impossible with MicroStudio ( MicroScript 2.0 ).

If you have Node.js versions you can edit the files

e.g.: microstudio/static/css/server.css

probably for the HTML element called "terminal-lines" (I don't know anything about CSS or HTML).

If you don't have the offline version of MicroStudio, you can try to modify the page elements using the JavaScript code - but you need to know what branch a given element is on.

https://microstudio.io/i/Loginus/runtimeenvironment/

This code gives you access to the "window" object - the entire MicroStudio page (and every other page in the browser) is in it.

When you run the code and type "window" in the console, all methods and variables that are currently available will be displayed.

You can request any HTML element from the page.

init = function()
  getRuntime()
  // or getRuntimeMS()
  document = window.document
  elements = document.getElementsByName("terminal-lines")
  print( elements )
end

Unfortunately, I don't know how to change the graphic style in this code.

Thank you for your help!

Element style can be changed this way

let t = window.document.getElementById("terminal-lines");
  
t.style.fontFamily = "Impact,Charcoal,sans-serif";

It seems it is not possible to call this from init() function because the script must be living inside the iframe, I suppose, but it is not a problem.

I'll study the files of the offline version as you advised me ;)

Checked it. It is doable.

One has to edit #terminal-lines font-family in microstudio-win32-x64/resources/app/microstudio/static/terminal.css and change #terminal-lines to change the font.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community