Giter Site home page Giter Site logo

Comments (3)

vladdeSV avatar vladdeSV commented on June 22, 2024

The code works for Powershell 7-preview (powershell.exe) and Command Prompt (cmd.exe).

Correction: GetCurrentConsoleFont(...) returns an "invalid" font in Windows Terminal. The font has an id of 0 and a size of 0x16px which causes this line to exit early.

If that line is commented out the resizing happens, which is when the buffer bugs out.

from scone.

vladdeSV avatar vladdeSV commented on June 22, 2024

Update: Seems this issue is related to microsoft/terminal#5094

from scone.

vladdeSV avatar vladdeSV commented on June 22, 2024

According to microsoft/terminal#6395 (comment) getting the font size is not possible with the Windows Terminal by design. This means I cannot detect the size of the terminal. Because CMD/Powershell (unsure if I am using the terminology right?) cannot set the window size to something smaller than the minimum size I cannot ensure the resizing will go through.

However, it may become possible to resize the window later on using ANSI escape codes. If I can detect it the terminal is a Windows Terminal, I could provide a Windows Terminal specific interface Output which uses ANSI-codes instead.

But this is not possible yet. Not sure what to do.

from scone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.