> No, even if you use monospace fonts, you can not assume that the number of > characters times the width of the font will give you the width of the string > that will be rendered on screen. There are characters and character > combinations in Unicode that need more or less pixels, even in monospaced > fonts! There are even character sequences that have different width in > different combinations, so simply adding up the width on each individual > character will not work.
Hmm, it's quite new thing for me! Could you tell me a sample of one of such combinations? > The only reliable way to get the width of whatever is printed is using > fl_width() after setting the font and size. I have no width of line in dots. I have only maximal length of string in characters. > Trust me, I know all that because I converted Fl_Text_Editor from ASCII to > UTF-8, and doing this, I learned much more about Unicode than I ever wanted > to know. Thanks, now I know that my method is not quite correct in all cases. > FLTK is an Open Source effort. I know it. And I sent how to fix found bugs. > We are really trying to keep the ball rolling, but we all have regular jobs > and some of us even regular kids ;-) . Please be patient. Our first goal is > to keep FLTK1 as stable and as bug-free as possible. Mine too. _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev