Questions about gtkedit.c



Hi, Paul!

The current source of Midnight commander contains following code in the
file gtkedit.c, function gtk_edit_configure_font_dimensions:

    if (XTextWidth (f, "M", 1) == XTextWidth (f, "M", 1))
        gtk_edit_fixed_font = 1;
    else
        gtk_edit_fixed_font = 0;

The same function in cooledit-3.17.4 has:

    if (XmbTextEscapement (f, "M", 1) == XmbTextEscapement (f, "M", 1))
        gtk_edit_fixed_font = 1;
    else
        gtk_edit_fixed_font = 0;

My questions are:

1) Which code is newer?

2) Why do you expect XTextWidth or XmbTextEscapement to return different
results for the first and for the second call?

3) Isn't it a bug?  Shouldn't it be e.g. "I" the second time?

-- 
Regards,
Pavel Roskin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]