I just like to say that my fl_text_extents patch was inspired by a lot
of the issues Matthias identified with current font handling. Basically,
when you ask for a font, you get what the platform's font engine thinks
you asked for - the text_extents stuff allows you to find out how big
that will actually be on the screen...
But that can be a slow thing to do, I don't think we can realistically
measure every string in that fashion[1].
It does seem that the current crop of text rendering engines try very
hard to render something, as best they are able, and often substituting
whatever font *they* think is a good match for what you actually asked
for. This does seem to result in text that isn't quite what you asked
for. 
This is made worse (I suspect) by us not selecting the fonts
consistently anyway.
I think that some of our font selection code is probably asking for
fonts in units other than pixels, so we get some variation in heights
there, too.

This whole is made worse, of course, by the fact that we can not know
what fonts a user has installed anyway, so even common faces like
"courier" can appear quite different between machines...

In the first instance, if we can ensure we are using the font metrics
consistently (i.e. always pixels or always points or whatever) that
would be a start. Some of the other issues might not be fixable at all?

-- 
Ian

[1]: Some languages, if we are doing the utf-8/i18n thing fully,
probably *have* to be measured after the string is composed, because we
can not know until the full string is composed, elided, formatted, etc.,
just how many glyphs will be drawn for the text, let alone how big it
will actually appear on the screen...



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-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to