MrGlockenspiel / activate-linux

The "Activate Windows" watermark ported to Linux
GNU General Public License v3.0
4.41k stars 92 forks source link

No line breaks in long messages #57

Closed NetherQuartz closed 2 years ago

NetherQuartz commented 2 years ago

I wanted it to show the original message from Windows in Russian, which should look like this: image

But long lines just go out of screen with no breaks: image

And I haven't found any ways to insert line breaks manually, they're always disappearing.

NetherQuartz commented 2 years ago

If I pass line break as $'...\n...': ./bin/activate-linux 'Активация Linux' $'Чтобы активировать Linux,\nперейдите в раздел "Параметры"', \n is being replaced with a square: image

Ruby-Dragon commented 2 years ago

this is probably our highest priority issue rn

MrGlockenspiel commented 2 years ago

yeah im looking into it now

MrGlockenspiel commented 2 years ago

as much as i dont want to drag in another dependency, i might have to for this https://lists.cairographics.org/archives/cairo/2008-September/015049.html

Ruby-Dragon commented 2 years ago

We could probably do it ourselves, it would just take a bit of effort

BeautyyuYanli commented 2 years ago

https://github.com/MrGlockenspiel/activate-linux/blob/a5cbacea74f9550a86b1141a9f793e9c2d5ad340/src/activate_linux.c#L49

can we handle '\n' manually here?

Ruby-Dragon commented 2 years ago

The draw function does not allow for newlines, it will draw a box instead

NetherQuartz commented 2 years ago

It's probably possible to split the string by '\n' and draw a text box for each line

BeautyyuYanli commented 2 years ago

I've made a draft and it's the preview image image

MrGlockenspiel commented 2 years ago

fixed with #117