DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L1977 Version: 2.0-current I've been having some inconsistant font sizing in my linux/x11 application written in fltk2 when it runs on various disroes. I finally found time to try and diagnose the problem and discovered a possible error in the documentation. -> http://fltk.org/doc-2.0/html/draw_8h.html#a80 I my app, I'm using drawtext() to custom draw some text on the window but the font sizing has been big on some machines and small on others (linux only here) It states that you should pass pixel size to fltk::setfont() and gives you a formula for converting your desired point size into a pixel size acceptable to fltk::setfont(). So I started a debugger to see what fltk itself passes to setfont() when it, for example, draws a widget's label. (src/Widget_draw.cxx -> draw_label()) I see it passing "12" to fltk::setfont() which seems like a reasonable point size. But moreover, then I traced into (all in src/x11/Font_xft.cxx) fltk::setfont() which calls fontopen() which calls XftFontOpen and passes it the size given to fltk::setFont() unmodified. And, the reference for XftOpenFont() indicates that it should be passed point size. http://linux.die.net/man/3/xft I don't know if this is an inconsitancy between, say, win32 and x11, or just an error in the docs for both platforms. Also, x11 has another font implementation in Font_xlfd.cxx (which I believe is much more rarely used), but I have not checked if xlfd's font opening/listing function deals natively with point or pixel sizes. Link: http://www.fltk.org/str.php?L1977 Version: 2.0-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
