tuanchauict / MonoSketch

An ASCII graph drawing app
https://monosketch.io
Apache License 2.0
367 stars 9 forks source link

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

Open eveld opened 4 months ago

eveld commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

Thank you! I hope I can finish rewriting soon.

kizu commented 3 months ago

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

tuanchauict commented 3 months ago

If I remember correctly, we don't need to have any workaround but remove the if check in this code https://github.com/tuanchauict/MonoSketch/blob/1a01ec08b45d7afa6bf4e3008b8e62f9532cfa96/libs/monobitmap-manager/src/main/kotlin/mono/bitmap/manager/factory/TextBitmapFactory.kt#L68-L78