> > 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... > > I understand, that the shapes may appear different with > differnt renderers, but why cant they at least render all the > same height? Is there no general rule for a given font and > pixel-size of how to calculate the line height?
You might well think (or expect!) so - but in practice, no. How fonts actually get drawn is a tricky thing indeed... There's centuries of printing lore about how to set moveable type, and different software takes different paths to emulate that knowledge. Or just miss big chunks of it out. In particular, how the different renderers interpret and handle kerning can make a big difference in how your text is spaced on the display - which may be what you are seeing? Is the effect still as bad if you use a fixed pitch font? That should be less susceptible to kerning issues than a standard proportional font would be. That and of course X and Win32 display systems have slightlty different ideas about sizes and so forth anyway... > But that changes the look even more. The rendering of the > characters is pretty identical, only the spacing an line > heights are different. Yes. The ttf file describes what the face is, and some hints about kerning, spacing, etc. The renderer then decides where to actually draw the glyphs, so it does the spacing, scaling and so forth. > If had to use a 12px font to achieve > the same heigth than a 14px font, the characters are much smaller. Yes, it is difficult. How does 13px look? :-) > If I only knew, where I could "screw" around to make the > renderer (Freetype2 I guess) behave differently with the > spacing. I found nothing to this problem in the net. I'm not really sure that is feasible... Not without changing the renderer - this stuff (kerning rules I mean) tends not to be parameterised! And changing the renderer will have all sorts of consequences for other apps so... Sorry - don't know what else to suggest. The solutions basically run to: 1. Use fl_measure to pick a font the "right size". -OR- 2. Use fl_measure to find out how big the font you are using actually is, then resize your widgets to fit the font you have (note, this is often easier than (1) in many cases.) -OR- 3. Try lots of different fonts until you find one that is close enough on both platforms. In particular, fixed pitch fonts can often be more consistent. But they look less pleasing to the eye, since people are used to seeing proportional fonts in printed materials. -OR- 4. Something else... -- 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

