|
|
FTR: to see that the style handling works in action, please load text with UTF-8 (i.e. non-ASCII) characters in the test/editor example program, for instance this pseudo C++ code:
#include <FL/Fl_Text_Display.H>
int main() {
// Style table
Fl_Text_Display::Style_Table_Entry stable[] = {
// ...
if (b€c and €) { // text with '€' note: 'and' in code should be highlighted
printf("This string with € and Umlauts %s is fine\n", "äöüßÄÖÜ");
} else { // another (incorrect) French comment: déjà vû §
printf("Incorrect French with German Umlauts %s. Déjà vû \n", "äöüß");
}
// Style for text with
sbuff->text("AAAAAAAAAA\n ¢ £ ¤ ¥ \nCCCCCCCC\nDDDDDDDDDD\n");
// still parses "return" fine:
return(Fl::run());
}
You can add and remove text with or without non-ASCII characters and the style update works (except for some special cases that are different, i.e. non-UTF-8 issues). A better working (although harder to use) example would be to load such text into fluid in FLTK 1.4.x (git) which does the style parsing somewhat better.
Screenshot attached:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |