DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2941
Version: 1.3-feature
Would be nice if an alternate version of fl_text_extents() were available
that could handle crlfs in the string.
Probably wouldn't be too hard;
Hm, doesn't fl_measure() do all this already?
- chris
Would be nice if an alternate version of fl_text_extents() were available
that could handle crlfs in the string.
Probably wouldn't be too hard; just need to break the one string
into separate lines, then run the existing fl_text_extents() on
On 03/27/13 11:41, chris wrote:
Hm, doesn't fl_measure() do all this already?
No, fl_measure() measures typographical area,
whereas fl_text_extents() measures the 'inking area'.
These are very different.
See the test/unittests program, text rendering test for a
*Correction*
In particular how the two functions calculate differently the bounding
region
for the characters ('), (-), and (_); fl_measure() returns the *SAME*
x,y and height
for those characters, whereas fl_text_extents() does not.
Ah, I think I understand the difference now, will have a look at the test
tomorrow...
Though at now cannot imagine a use case for knowing the inking area.
Thanks for clarifying.
- chris
*Correction*
In particular how the two functions calculate differently the bounding
region
for
On 27 Mar 2013, at 20:16, chris wrote:
Ah, I think I understand the difference now, will have a look at the test
tomorrow...
Though at now cannot imagine a use case for knowing the inking area.
Ah, but it turns out that there are quite a lot of uses for knowing the inked
area of a
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2941
Version: 1.3-feature
Yes, I thought about that at the time, but chose not to do it.
The problem is, it is not obvious what the right answer is, for a string
that
Yes, I thought about that at the time, but chose not to do it.
The problem is, it is not obvious what the right answer is, for a string
that has carriage returns / line feeds in it.
I actually needed this feature in my app, which coincidentally, was
also rendering musical symbols. I took the
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2941
Version: 1.3-feature
@Ian, can't blame you -- impressed you took on fl_text_extents()
at all.. big job, multiple platforms!
But isn't the multiline issue simpler?