> A very annoying problem is, that this true type fonts are not > displayed with the same dimensions on both platforms. Under > Windows the character spacing is in general smaller and the > font heigth of the same font say Verdana 14px is smaller than > in Linux.
Are they actually the same font? Or just fonts with the same name? That is, is it the same ttf file that is used in both cases...? In any case, you are always pretty much at the mercy of the font renderer in terms of how the font actually appears, how it is spaced, etc. This is provided by the display system, of course, not by fltk, so it does vary from host to host - the same font file may be rendered slightly differently, and any two fonts with "the same" name and size can actually appear quite different so... This is why systems like PDF were created, as they make more effort to control how the text actually appears. But it is a hard problem generally. > This makes it nearly impossible to design for example a > List-Box, because in Windows more lines are visible in the > same box, than in Linux. Yes, it is tricky... What I have done in the past is to use the fl_measure functions to find out how big a given font actually is on a particualr host, and then adjust things accordingly. I found it is best to do this at runtime - since as a general rule you have no idea what fonts the end-user actually has, or what unusual scaling they might have (e.g. if they have some very large font set as default for accessibility reasons or etc...) So, you set the font face and size you want, then take a "typical" fragment of your text, and you measure it in that font. If it is too big or too small, you try bumping the size up or down until the result is "close enough" and then hope for the best. Not great, but it is about the best you can do. You never really know what odd settings the end-user will have, so just because it looks fine on your box, you have no real way of knowing how it will look elsewhere! -- Ian SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

