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

Feature: Style text (separate item and inside box) #602

Open
eveld opened this issue Mar 27, 2024 · 5 comments
Open

Feature: Style text (separate item and inside box) #602

eveld opened this issue Mar 27, 2024 · 5 comments

Comments

@eveld
Copy link

eveld commented Mar 27, 2024

When adding text to a box, it would be nice if it was possible to style it, to for instance have spaces show with a black background as well, or changing the color (foreground/background).

For instance in this box I would really like the space between the words to also be with a black background, or I would like the entire text to have a black foreground and no background.

image
@tuanchauict
Copy link
Owner

I'm understanding that you want to make Space characters become non-transparent and will be rendered as other characters, is that correct?

This would be a good format option to have.

Besides, there are some other format features we can have like making the text rendered on the border, changing the padding values, etc.

The bottleneck of all functions that require having UI is the UI. I don't really want to write UI code with Kotlin now. As you can see, I'm rewriting the project into TypeScript with Svelte. #584

@eveld
Copy link
Author

eveld commented Mar 29, 2024

Yeah, was mostly suggesting these features for after you complete the rework in typescript. It would then even be easier for me to contribute some of these suggestions as pull requests instead :)

@tuanchauict
Copy link
Owner

Thank you!
I hope I can finish rewriting soon.

@kizu
Copy link

kizu commented May 21, 2024

As a quick workaround, it is possible to use non-breakable spaces as non-transparent ones.

@tuanchauict
Copy link
Owner

If I remember correctly, we don't need to have any workaround but remove the if check in this code

for (colIndex in row.indices) {
val char = row[colIndex]
if (char != ' ') {
put(
row = row0 + rowIndex,
column = col0 + colIndex,
visualChar = char,
directionChar = char
)
}
}

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

3 participants