Matthias Melcher wrote:
> On 06.01.2010, at 11:27, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>>> Just wondering aloud, to those that know the answer..
>>> why is it again that Fl::set_font() does not return an error
>>> if the font is not found?
>> I do not know - and I wrote some of that code...
>>
>> But yes, in principle it is possible to tell whether we got the font we
>> asked for or not. And I think (as you do) that we ought to report that
>> to the calling function - but then we are into API breakage and...
>
> The API in 1.3 is open. Feel free to change whatever you need to change!
I'd love to see Fl::set_font() return a success/fail integer.
This way the app code can fall back to some default, so as to
avoid things like 'upsidedown fonts', which is embarrassing
to the app programmer when a user reports it. (You can be sure
the user has shown the upsidedown program to everyone in the
room before reporting it as a bug)
Even if some platforms don't support error returns, at least
for the ones that do, it would help. Docs can allude to the
multi-platform details.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk