Eric Liao wrote:
> 2. Did you add error checking to the font calls in the test program I posted?
>
> I just copied your source code. No error checking was added. Besides, I
> don't know how to do the error checking. If not bothering, please show
> me how it is done.
By this I mean, check the return value of fltk::font()
to see if it's valid.
So for instance, below this line:
fltk::Font *f = fltk::font("Kochi Gothic", 0);
..check if 'f' is NULL, eg:
if ( f == NULL ) {
printf("Font error\n");
exit(1);
}
If with that change, you run the program and it simply exits
with "Font error", then the question would be /why/ is fltk::font()
failing the font lookup.. and at that point you'd have to dip into
FLTK's source code for that function, fltk::font() in
src/list_fonts.cxx,
copy that code into your own app, and start looking for the failure.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev