Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm trying to get perl bindings for Xosd library going. It kinda works, but I cannot set bigger fonts. If I try that, it crashes. I probably don't know how to look what fonts are available and how to specify them properly. Here's my example code that works except setting different font.
#!perl -w use X::Osd ':all'; my $osd = X::Osd->new(1); # $osd->set_font("-monotype-arial-medium-r-normal-*-*-360-*-*-p-* +-iso8859-1"); #$osd->set_font("-*-lucidatypewriter-medium-r-normal-*-*-250-*-*-*-*-* +-*"); $osd->set_colour("Green"); $osd->set_timeout(30); $osd->set_horizontal_offset(0); $osd->set_vertical_offset(10); $osd->set_shadow_offset(2); $osd->string(0,'Hello World!'); sleep 5; $osd->set_horizontal_offset(0); $osd->set_vertical_offset(50); $osd->set_shadow_offset(2); $osd->percentage(0,56); sleep 5; $osd->set_horizontal_offset(0); $osd->set_vertical_offset(90); $osd->set_shadow_offset(2); $osd->slider(0,34); sleep 5;
Could anyone help me (I haven't found and examples on net).

Thanks in advance,

Robert.

Replies are listed 'Best First'.
Re: Perl and Xosd - problems with font setting ?
by Old_Gray_Bear (Bishop) on Mar 09, 2004 at 16:50 UTC
    Are you sure that there are "larger fonts" available on your system? Can you see them using a non-perl tool?

    What does the man() page say about retrieving fonts? Particularly what is supposed to happen if you request a non-existant font?

    What kind of "crashes" are you seeing? And where -- in Perl? Or in the Xosd library? Or elsewhere.

    As is usual with The Oracles, the more precisely you can define your question, the more likely the Answer is going to help.

    ----
    I Go Back to Sleep, Now.

    OGB