manolo gouy wrote: > I tried it. It doesn't work well because writing a string larger > than the bitmap to a bitmap context gives strange results.
OK - I don't think I understand: why is the string larger than the bitmap? If the bitmap is measured to fit the string, then... Oh, is this because of the way that OSX anti-aliases the text as it renders it into the context, so that it ends up being bigger than it was measured, something like that? I have seen that with on-screen rendering with OSX, so I guess that would apply in this case too. Is that what you see happening? If so, even fl_measure may not be immune, as there's still the possibility that the rendered text can still spill out of the measured box if it has large ascenders or descenders, or unusually wide glyphs at the beginning or end of the string... Hmm, tricky... Maybe we need to build in a guard region just to be on the safe side? In that case I guess I'd favour using fl_text_extents with a couple of pixels of guard all around the edge. I don't think we'd need the guard on win32 or X11, FWIW, I don't *think* they spill like OSX does, so I guess they measure the glyphs differently, or maybe allow for the anti-aliasing, or something, already. _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
