DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2115
Version: 1.3-current


BTW, added fl_descent() to the text-box example code to fix a bug that was
hiding the problem a bit; with this fix, the text draws within all the
boxes except when the font size is used for the pixel size. Also changed
the font to FL_COURIER which shows the problem I'm seeing on linux pretty
well. I also added an 'E:' line that uses the font size as the pixel size,
to show how that technique is off from the others.

"text-with-box-fix.cxx" -- has the above fixes
"text-with-box-fix.png" -- screenshots of XFT on vs. off.
                           (green arrows show text drawing outside box)

Also, in the code it documents what the A/B/C/D/E lines are, but thought
I'd include the description here as well:

    A: USES draw(s,X,Y,W,H) + fl_measure()
    B: USES draw(s,X,Y) + fl_measure() + fl_descent()
    C: USES draw(s,X,Y) + fl_height() + fl_descent()
    D: USES draw(s,X,Y) + Ian's new fl_text_extents()
    E: USES draw(s,X,Y,W,H) + labelsize() for height, fl_width() for width

Note that only E draws outside the bounding box when XFT is on.


Link: http://www.fltk.org/str.php?L2115
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to