Add word wrap

This commit is contained in:
Samuel Dudik 2020-08-01 21:34:48 +02:00
parent 7161997b6f
commit b8d4bb7003
2 changed files with 6 additions and 1 deletions

View file

@ -5,7 +5,7 @@ const static char *font_pattern = "Inconsolata:style=Medium:size=13";
const static unsigned line_spacing = 5;
const static unsigned int padding = 15;
const static unsigned int width = 200;
const static unsigned int width = 400;
const static unsigned int border_size = 2;
const static unsigned int pos_x = 30;
const static unsigned int pos_y = 50;

View file

@ -89,6 +89,11 @@ int main(int argc, char *argv[])
break;
}
while (body[eols[num_of_lines - 1] + eol] != ' ')
--eol;
eol++;
remainder -= eol;
if (eols_size < num_of_lines + 1)
{