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

Support Unicode box drawing #111

Open
amirgon opened this issue Jan 4, 2024 · 0 comments
Open

Support Unicode box drawing #111

amirgon opened this issue Jan 4, 2024 · 0 comments

Comments

@amirgon
Copy link

amirgon commented Jan 4, 2024

Unicode Box Drawing allows clean formatting of tables, including all types of corners.
These characters are also present on the Extended ASCII set with certain code pages, when not using wide characters.

In the example I can see you are using a dot character as a corner, which is not as clean.

I've attempted to achieve this with formatting:

        table.format().multi_byte_characters(true).locale(std::locale::classic().name());
        table.format().corner("").border("");
        table.format().border_left("").border_right("");
        table[0].format().corner_top_left("").corner_top_right("").border_top("").border_bottom("");
        table[1].format().border_top("").corner_top_left("").corner_top_right("");
        table[table.size() - 1].format().border_bottom("").corner_bottom_left("").corner_bottom_right("");

which yields something like this:

image

This result is not perfect and tedious for format.
Instead, it could be very useful to have a built-in support for Unicode box drawing.

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