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

Use half-height blocks to double vertical resolution #16

Closed
eddieantonio opened this issue Feb 9, 2018 · 3 comments
Closed

Use half-height blocks to double vertical resolution #16

eddieantonio opened this issue Feb 9, 2018 · 3 comments

Comments

@eddieantonio
Copy link
Owner

eddieantonio commented Feb 9, 2018

See Block Elements. More interesting things can be done with some of the other characters in this range, but it should be sufficient to use ▀ (U+2580)

@eddieantonio
Copy link
Owner Author

The plan:

— foreground gets assigned above; background gets assigned below.

CSI ... 38;5;<color> ... m — foreground color
CSI ... 48;5;<color> ... m — background color
printf "\033[38;5;%03d;48;5;%03dm▀\n" $FG $BG

Assuming pixels are zero-indexed, even rows set foreground color and odd rows
set background color.

Terminate with

CSI ... 39;49 ... m

39 resets default foreground color and 49 sets default background color.

@eddieantonio
Copy link
Owner Author

I've got it working in the half-height branch, but the rendering is off. Turns out the half-height is too wide horizontally, and too short vertically to combine with the background color, to truly color exactly half of the square. Take a look:

captura de pantalla 2018-06-02 a las 7 54 47 p m

(Taken in iTerm2, Build 3.1.6, 12pt Menlo, anti-aliased, 110% vertical spacing).

@eddieantonio
Copy link
Owner Author

eddieantonio commented Jun 3, 2018

It looks okay with a non-anti-aliased bitmap font, and 100% line spacing. Check it:

captura de pantalla 2018-06-02 a las 8 04 49 p m

Edit: Here's xterm:

captura de pantalla 2018-06-02 a las 8 11 23 p m

I think this feature might actually work for people who are not me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant