Re: [Tuxpaint-devel] Using libtextwrap in Tux Paint Config.
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Mark K. K. <mar...@gm...> - 2021-11-16 13:51:35
|
Hi Bill, On Mon, Nov 15, 2021 at 03:05:42PM -0800, Bill Kendrick wrote: > Mark, can you confirm that this library will build fine for you > on macOS? The library was built from https://github.com/adah1972/libunibreak without any trouble using autogen.sh. Compiling your test code, linebreak-test.c, though, required some extra flags. Most of the flags are supplied by pkg-config, so using pkg-config in Makefile if we use this library in Tux Paint would be preferable to directly passing `-l unibreak`. `-l libiconv` also needed to be passed manually but I think we already do this in Tux Paint Makefile. The resulting output is below. $ gcc linebreak-test.c -o linebreak-test $(pkg-config --cflags --libs libunibreak) -l iconv linebreak-test.c:20:23: warning: passing 'char *' to parameter of type 'const utf8_t *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] set_linebreaks_utf8(str, strlen(str), "ja_JP.utf-8", brks); ^~~ /opt/local/include/linebreak.h:67:23: note: passing argument to parameter 's' here const utf8_t *s, size_t len, const char *lang, char *brks); ^ 1 warning generated. $ ./linebreak-test タックスペイントを、ウィンドウ内ではなく、画面全体に表示します。ABC 123 3313313313313313313313313323313313313313313313313313313313323313313313313313313313313313313323312221224 111111112111111111121111111111212221224 タ~ッ~ク~ス~ペ~イ~ン~ト~を、~ウ~ィ~ン~ド~ウ~内~で~は~な~く、~画~面~全~体~に~表~示~し~ま~す。~ABC 123 $ Best, Mark |