re: How can I determine if gnome_canvas_item_new() worked with a specified font?
- From: Antony Stace <antony claire co jp>
- To: Wolfgang Sourdeau <wolfgang ultim net>
- Cc: gnome-devel-list gnome org
- Subject: re: How can I determine if gnome_canvas_item_new() worked with a specified font?
- Date: Tue, 31 Oct 2000 19:05:04 +0900
Thanks for the reply Wolfgang. If it happens that NULL is returned then
I need to find another font to use right. I thought I would be able to
find a default font that always exists and use this default font when
NULL is returned, I haven't been able to find one yet, so what I want to
know is:
How do I find the name of a font that is always there so I can always
display some text, even if it may not be in a crash hot font. I have
tried
tem = gnome_canvas_item_new(rootGroup,
gnome_canvas_text_get_type(),
"text", "Test",
"x", (double) (30 ),
"y", (double) (85 ),
"fill_color", "black",
NULL);
hoping that it would use a default font, but alias it displays nothing.
It remains a mystery to me why this function does not use a default
font when it is called with the attribute "text" since the user surely
wants to display some text. Or am I calling this function incorrectly?
Once again, any help greatly appreciated.
Cheers
Tony
Cheers
Tony
Wolfgang Sourdeau wrote:
>
> La plume légère, à Tue, Oct 31, 2000 at 03:07:11PM +0900, heure d'inpiration,
> Antony Stace écrivait en ces mots:
> >
> > I need to know if a certain font exists on a computer. I need to write
> > some text to a gnome canvas but want to check if the font exists before
> > I do it, if it doesnt then I want to use the default font on the
> > computer. At present I have something like
>
> What you can do is use gdk_font_load. If the font is found, a pointer to a
> GdkFont struct will be returned, else NULL will be returned.
>
> W
> --
> A chicken is an egg's way of producing more eggs.
>
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]