Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the FontSize affects what is captured on Hide/Show #420

Open
J-Bockhofer opened this issue Dec 9, 2023 · 2 comments
Open

Changing the FontSize affects what is captured on Hide/Show #420

J-Bockhofer opened this issue Dec 9, 2023 · 2 comments

Comments

@J-Bockhofer
Copy link

Description

Changing the FontSize affects what is captured between Hide and Show blocks.

Setup

I have a TUI, built with ratatui, with a couple of different "scenes".
After running into an issue with flickering #88 , I set the Framerate to the same as the TUI's internal one: 4fps.
So my settings are these:

Output examples/demo.gif

Set PlaybackSpeed 1.
Set Framerate 4
Set Width 1920
Set Height 1080
Set FontSize 10
Set CursorBlink false

The TUI has a startup scene that I want to ommit for this demo, so I hide the first couple of commands and leave ample time.


Hide
Type "cargo run" Enter
Sleep 10s
Tab@1s 1
Sleep 5s
Type "m"
Sleep 1s

After typing m a fullscreen map should be rendered by the TUI, which I want to show.


Show
Sleep 20s
Type "m"
Sleep 1s
Type "w"
Sleep 20s

Typing w brings up a help menu that should be displayed until the .gif ends.

Issue

With FontSize 10 it shows what should only be rendered during the Hide Section:

demo_fs10

With FontSize 16 it starts showing the map but not the help menu.

demo_fs16

And finally with FontSize 24 I get to see parts of the help menu and it starts in the correct scene.
Ofc now the font is too big to fit anything.

demo_fs24

I tried with multiple configurations of screens/ hiding & showing, sleep durations, framerates and setting the padding to 0, but I observed this behavior consistently.

I don't know what could be the cause of the issue here, but changing the FontSize had by far the biggest effect on the outcome.

I can also provide further information if necessary.

@J-Bockhofer
Copy link
Author

After thinking this through a bit more, I invoked the mighty htop and found, that while my machine is perfectly fine running the TUI itself with terminal fontsize set to 10, it is absolutely not fine rendering it in the headless chromium browser so I guess I'm just stuck for now.

If anyone else comes across this issue, you now know where to look.

@J-Bockhofer
Copy link
Author

I do however have this super sped up version that happened with a non-restricted framerate configuration.
So I am still a bit confused as to my conclusion, maybe there is more to it after all?

demo_coked

@J-Bockhofer J-Bockhofer reopened this Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant