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

[STR New]

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


>> To demonstrate this ; use the multi line input in the input demo and
>> type:
>> abcdef
>> ghijkl

> Possibly related STR for the descenders issue:
> http://www.fltk.org/str.php?L2115

..specifically this part (I don't know how to link to a particular comment
in that STR). The reason for this recommendation is that fl_height(void)
[the documented call] does the larger amount of code, but this little
overload, fl_height(int,int), which is only used by Fl_Text_Editor and
undocumented AFAIK, uses the 'size' literally.. which is not what the more
used fl_height() does.

Here's the comment regarding the 'fix':

* * *
Changing this:
----
inline int fl_height(int, int size) {return size;}
----

    ..to instead be implemented [as]:

----
int fl_height(int font, int size) {
    if ( font == fl_font() && size == fl_size() ) return(fl_height());
    int tf = fl_font(), ts = fl_size();   // save
    fl_font(font,size);
    int height = fl_height();
    fl_font(tf,ts);                       // restore
    return(height);
}
----

    ..seems to solve the problem in Fl_Text_Display() and fluid for me.

    However, I do think lines like this in Fl_Text_Display should
    be double checked:

int lineHeight = mMaxsize ? mMaxsize : textsize_;

    ..as this appears to make direct use of "textsize_" as a pixel
    size, which should likely be replaced with an appropriate
    fl_height call.

* * *


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

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to