does the emulator support Terminal?

Posted on
  • Hello!

    Whenever I try to use Terminal functions in the emulator, I get

    Uncaught ReferenceError: "Terminal" is not defined
    

    Are there plans to implement "Terminal" in the emulator?

    Thanks in advance for your effort!

    Kind regards,

    Andreas Rozek

  • Thanks for letting me know - I'll look into getting it added.

  • It's fixed now!

  • Great!

    So, now I can finally do what I planned as my very first step with the Bangle.js emulator:

    Terminal.println('Hello, World!');
    

    and it worked!

    Thanks a lot for all your effort!

    Kind regards,

    Andreas Rozek

  • Is there a way to change the Terminal font size from 4x6 to 6x8?
    It seems that g.setFont("6x8") doesn't work in that situation.

  • Seems so be hardcoded here https://github.com/espruino/Espruino/blo­b/master/libs/graphics/jswrap_terminal.c­#L35
    Maybe it wouldn't be so complicated to make it variable? However g is grapics buffer, maybe the font could be a property of the Terminal object itself so it could be different and unrelated to graphics.

  • Font when used is always related to graphics (register with Graphics after loading). The reason it started out with the 4x6 font is the memory consumption by (larger) loadable bit map fonts. 4x6 font is dedicated implemented in graphics (proprietary - other than the other bit map fonts - storage structure and render code). There are thoughts to make 4x6 be treated same as 6x8 and 6x8 used instead 4x6. Having it not fixed built into Graphics and the option to 'remove'/'exchange' it would be nice. Having it optional would free up enough space to total with less increase of memory footprint when (just) using 6x8.

    Espruino history speaking - AFAIK - The bit map fonts as modules came after vector font and the Graphics built-in 4x6 font.,, @Gordon would know for sure,

  • Is there a way to change the Terminal font size from 4x6 to 6x8

    The font should be 6x8 already? It's not on Pixl but if the 6x8 font is included it's used by default.

    If you draw in 4x6 you'll see how much smaller it actually is :)

  • The font should be 6x8 already?

    Indeed it is!
    And there is no way to make it larger with the current firmware as the font size is hard coded.

  • I should add that there's also a VT100 JS module here: http://www.espruino.com/VT100

    In that case you could modify it to use whatever fonts (or parts of the screen) you wanted :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

does the emulator support Terminal?

Posted by Avatar for Andreas_Rozek @Andreas_Rozek

Actions