|
|
I think the issue might've been that the vertical scroll bar was covering the text. I've added a little bit of extra space, it seems to be working now.
On Tuesday, June 22, 2021 at 4:32:00 AM UTC-7 Albrecht Schlosser wrote:
On 6/21/21 11:43 PM supsm17 wrote:
Thanks. I've noticed that widget->measure_label() and
fl_measure() have the same value, which isn't correct.
fl_text_extents() has a different value which is closer, but still
isn't the correct value. Do you know why this is?
As Greg already wrote, fl_text_extents() should be absolutely exact
but it's a little more difficult to use. You can see both
fl_measure() and fl_text_extents() "in action" in our
test/unittests.cxx demo program in the "rendering text" and "symbol
text" examples (the latter only with fl_measure()).
A potential problem with using these functions is that you need to
set the font before you call the measure functions.
Otherwise a random font will be used for measurement. This might
explain your differences.
If you can't find a solution, I suggest that you post your code in
form of a minimal, but compileable source code here. Then we can see
why it doesn't work for you and help.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/e40436c3-a2a6-44e1-b6c1-a74749628500n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |