ravachol / kew

A command-line music player
GNU General Public License v2.0
567 stars 21 forks source link

Album cover not centered in wezterm terminal #134

Closed Elias-Ainsworth closed 2 months ago

Elias-Ainsworth commented 2 months ago

OS: FreeBSD 14.1 Terminal Emulator: Wezterm File format: m4a

using image cover

20240617_14h21m40s_grim

using ascii

20240617_14h21m37s_grim

ravachol commented 2 months ago

Hi and thank you. Yes, this is a known issue with Wezterm, on certain terminal window sizes the indentation is ignored. Only the last line has an indentation.

The offending code is this:

in chafafunc.c:

void printSquareBitmapCentered(FIBITMAP bitmap, int baseHeight) { ... for (int i = 0; lines[i] != NULL; i++) { printf("\n%s%s", indentation, "", lines[i]); }

I think this is likely a problem with Wezterm but there might be a workaround.

Elias-Ainsworth commented 2 months ago

I see, apart from using a different terminal emulator are any workarounds known?

ravachol commented 2 months ago

Well, the bug only happens for certain window sizes at least for me, so if you can, resize the window, until the problem goes away.