vhs icon indicating copy to clipboard operation
vhs copied to clipboard

Padding and FontSize not applied via Source

Open roele opened this issue 1 year ago • 1 comments

Describe the bug Padding and FontSize are not applied properly if i set them in another tape file which is imported via Source.

Setup

  • macOS 14.3
  • fish 3.7.0
  • iTerm 3.5.0beta19

To Reproduce Generate a recording from the example source code with and without using Source and compare results.

Source Code config.tape

Set Shell "fish"
Set Padding 10
Set FontSize 16
Set Width 800
Set Height 300
Set TypingSpeed 100ms

example.tape

Output ./example.gif

#Source ./config.tape

Set Shell "fish"
Set Padding 10
Set FontSize 16
Set Width 800
Set Height 300
Set TypingSpeed 100ms

Type "echo 'Hello World!'" Enter
Sleep 5s

Expected behavior Expecting same result as having the Set commands in the same file

Screenshots

example vs. example-source

roele avatar Jan 20 '24 15:01 roele

Expanding on this a bit with my own anecdote:

When I change the Width and Height from a Source'd file, it does appear to actually change the output size occasionally, but nothing rendered inside of it will actually detect that. I'm using BubbleTea to render out a viewport, and the internally determined height/width DO match what I changed them to, because the strings in the viewport start rendering way off the top. The viewport itself is visually limited to the default values though

Example: View

As you can see, the first line of the viewport is "all fifty stars...", which is the final sentence of the entire first paragraph, which is being rendered above the visible viewport.

DaltonSW avatar Aug 21 '24 16:08 DaltonSW