Hi, I'd be interested in having what I would call "advanced text functions" and which in fact would allow to do more than what is currently possible with DrawString.
What I would like: ================== First I'd like to have text wrapping. This would take a string (char *) and a maxwidth (int) as arguments and would go back to the beginning of a new line whenever the width of current line would reach maxwidth. An even nicer function would not break words and would only make a new line between words. Another thing I'd like to have is justified text. Being able to have justified wrapped text would be ideal. Finally, the last feature I'd like to have is the possibility to specify a max width instead of a max length. Currently, DrawString has a "bytes" argument that allows to specify max length (a number of chars). What I'd like is a way to have a number of pixels instead, which would then truncate the string. What I have so far: =================== I have a wrapping function which takes a char* and an int (n, number of chars per line) and returns a char** and an int (number of lines). It's very basic, it is a loop that goes through the char* and fills a table of char* that are at most n chars long. The plan: ========= So now the question is, how should I implement things if I am to do them on my own? I think that the features I'd like can't be implemented on top of DirectFB so if I want to implement them, I guess I'll have to put them in the DirectFB code. Am I right? Can anyone give me any advice? Would by any chance someone want to implement them with me (or even do it in my place :P)? -- Alexandre Franke _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev